diff --git a/.gitignore b/.gitignore index de4d1f0..8a396b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist node_modules +testing diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f3876f --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +primitive images built with: + +go install github.com/fogleman/primitive@latest +~/go/bin/primitive -i /mnt/c/Users/Adam/Desktop/laputa-png.png -o output3.svg -n 250 -bg 5F8F58 -s 2471 -j 8 -m 3 \ No newline at end of file diff --git a/assets/laputa.svg b/assets/laputa.svg new file mode 100644 index 0000000..370dc3f --- /dev/null +++ b/assets/laputa.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/build.js b/src/build.js index 63b7ec6..57e1cb5 100644 --- a/src/build.js +++ b/src/build.js @@ -41,7 +41,8 @@ for (const [name, f] of Object.entries(fonts)) { const laputa = await readFile('assets/laputa.webp'); const outName = `static/laputa.${makeHash(laputa)}.webp`; await writeFile('dist/' + outName, laputa); - html = html.replace('LAPUTA', outName); + const svg = await readFile('assets/laputa.svg'); + html = html.replace('LAPUTA_WEBP', outName).replace('LAPUTA_SVG', 'data:image/svg+xml;base64,' + svg.toString('base64')); } await writeFile('dist/index.html', html); diff --git a/src/index.html b/src/index.html index 74fb478..50f1b7d 100644 --- a/src/index.html +++ b/src/index.html @@ -9,13 +9,12 @@ box-sizing: border-box; } body { - background-image: url(LAPUTA); + background-image: url(LAPUTA_WEBP), URL(LAPUTA_SVG); /* todo: revist image-set */ background-position-x: center; background-size: cover; color: white; - margin-top: 2em; font-family: Inter, sans-serif; font-size: 14px;