Move SVG out of assets

This commit is contained in:
Thibault “Adædra” Hamel 2024-06-12 20:51:19 +02:00
parent 9801bb9c7a
commit 7803df674c
2 changed files with 4 additions and 3 deletions

View File

@ -145,7 +145,8 @@ export const articles = () =>
export const images = () => src("src/*.avif", { encoding: false }).pipe(dest("dist/_assets/"));
export const svg = () => src("src/*.svg").pipe(dest("dist/_assets/"));
// SVG use has no way of allowing cross-origin, so we need to keep them with the HTML files.
export const svg = () => src("src/*.svg").pipe(dest("dist/"));
export const css = () => src("src/index.css").pipe(postcss()).pipe(dest("dist/_assets/"));

View File

@ -17,8 +17,8 @@ ul.index-list
h2 Find me elsewhere
ul.index-list
li: a(href="https://gitea.adaedra.eu/adaedra" target="_blank")
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-label="Gitea Logo"): use(href=`${asset("logos.svg")}#gitea`)/
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-label="Gitea Logo"): use(href="/logos.svg#gitea")/
| Gitea
li: a(href="https://nerdculture.de/@adaedra" target="_blank" rel="noopener")
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74 79" aria-label="Mastodon Logo"): use(href=`${asset("logos.svg")}#mastodon`)/
svg(xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74 79" aria-label="Mastodon Logo"): use(href="/logos.svg#mastodon")/
| Mastodon