diff --git a/data/logos.js b/data/logos.js new file mode 100644 index 0000000..4533c4f --- /dev/null +++ b/data/logos.js @@ -0,0 +1,21 @@ +module.exports = async () => + Object.fromEntries( + await Promise.all( + [ + "logo-color.svg", + "logo-monochrome.svg", + "logo-outline.svg", + "logo-sticker.svg", + ].map((filename) => { + console.log("fetching:", filename); + return fetch( + `https://raw.githubusercontent.com/chaosdorf/chaosdorf-design/main/logos/${filename}` + ).then(async (r) => { + if (!r.ok) { + throw new Error(`invalid status: ${r.status}`); + } + return [filename, await r.text()]; + }); + }) + ) + ); diff --git a/layouts/base.njk b/layouts/base.njk index b4f9134..3d53c4f 100644 --- a/layouts/base.njk +++ b/layouts/base.njk @@ -30,6 +30,7 @@