Skip to content

Commit

Permalink
Add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Jun 8, 2024
1 parent 8316d53 commit 00a23a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions data/logos.js
Original file line number Diff line number Diff line change
@@ -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()];
});
})
)
);
1 change: 1 addition & 0 deletions layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</head>
<body>
<main>
{{ logos["logo-monochrome.svg"] | safe }}
<article>
{{ content | safe }}
</article>
Expand Down

0 comments on commit 00a23a3

Please sign in to comment.