add primitize image
This commit is contained in:
parent
10f841d1b7
commit
df21e4ffb5
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
|
testing
|
||||||
|
4
README.md
Normal file
4
README.md
Normal file
@ -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
|
8
assets/laputa.svg
Normal file
8
assets/laputa.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 14 KiB |
@ -41,7 +41,8 @@ for (const [name, f] of Object.entries(fonts)) {
|
|||||||
const laputa = await readFile('assets/laputa.webp');
|
const laputa = await readFile('assets/laputa.webp');
|
||||||
const outName = `static/laputa.${makeHash(laputa)}.webp`;
|
const outName = `static/laputa.${makeHash(laputa)}.webp`;
|
||||||
await writeFile('dist/' + outName, laputa);
|
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);
|
await writeFile('dist/index.html', html);
|
||||||
|
@ -9,13 +9,12 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
background-image: url(LAPUTA);
|
background-image: url(LAPUTA_WEBP), URL(LAPUTA_SVG);
|
||||||
/* todo: revist image-set */
|
/* todo: revist image-set */
|
||||||
background-position-x: center;
|
background-position-x: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
||||||
color: white;
|
color: white;
|
||||||
margin-top: 2em;
|
|
||||||
|
|
||||||
font-family: Inter, sans-serif;
|
font-family: Inter, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
Loading…
Reference in New Issue
Block a user