Skip to content

Instantly share code, notes, and snippets.

<script>
import { lazyLoadFullImg } from "../scripts/lazy-load-full-img.js";
export let project;
</script>
<style>
.header-row {
display: flex;
align-items: center;
export const lazyLoadFullImg = (node, data) => {
const loaded = new Map();
// use bigger image file if warranted
const fileSize = window.devicePixelRatio > 1 ? '-2x' : '-1x'
const correctImg = `${data.path + fileSize}.${data.type}`
if (loaded.has(correctImg)) {
node.setAttribute("src", correctImg);
@pjbrown11
pjbrown11 / .gitlab-ci.yml
Created July 22, 2019 18:52
Example of Cypress running end to end tests through Gitlab CI.
image: node:latest
stages:
- test
- export
- deploy
cache:
paths:
- node_modules