feat: add SVG favicon with lowercase 'b' using site font; configure head to use it with .ico fallback

This commit is contained in:
2025-08-16 09:50:31 -06:00
parent eff9aa55cf
commit 738f5a348a
2 changed files with 21 additions and 1 deletions

View File

@@ -9,7 +9,10 @@ export default defineNuxtConfig({
},
app: {
head: {
link: []
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{ rel: 'alternate icon', type: 'image/x-icon', href: '/favicon.ico' }
]
}
}
})

17
public/favicon.svg Normal file
View File

@@ -0,0 +1,17 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
<defs>
<style>
.bg { fill: #111111; }
.txt {
fill: #ffffff;
font-family: "Roboto Slab Variable", Roboto, "Helvetica Neue", Arial, sans-serif;
font-weight: 700;
font-size: 88px;
}
</style>
</defs>
<rect class="bg" x="0" y="0" width="128" height="128" rx="24" ry="24" />
<text class="txt" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">b</text>
</svg>

After

Width:  |  Height:  |  Size: 499 B