This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { lazyLoadFullImg } from "../scripts/lazy-load-full-img.js"; | |
export let project; | |
</script> | |
<style> | |
.header-row { | |
display: flex; | |
align-items: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:latest | |
stages: | |
- test | |
- export | |
- deploy | |
cache: | |
paths: | |
- node_modules |