Skip to content

Commit 53faae2

Browse files
kvlongeampagent
andauthored
fix(website): make the favicon larger and legible on light tabs (#5)
The favicon now uses shorter speed lines, so the artwork is 86 instead of 76 of 128 pixels tall. An SVG favicon shows the dark logo ink on light browser themes and the white art on dark ones, with the PNG as fallback. Amp-Thread-ID: https://ampcode.com/threads/T-01a18b8a-340f-717d-9ca7-6dcf564a065a Co-authored-by: Amp <amp@ampcode.com>
1 parent 14a4d2a commit 53faae2

5 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎website/astro.config.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export default defineConfig({
1616
dark: './src/assets/logo-dark.png',
1717
replacesTitle: true,
1818
},
19-
favicon: '/favicon.png',
19+
favicon: '/favicon.svg',
2020
head: [
21+
// PNG fallback for browsers without SVG favicons; the SVG favicon uses dark ink on light tabs and white on dark.
22+
{ tag: 'link', attrs: { rel: 'icon', type: 'image/png', sizes: '128x128', href: '/favicon.png' } },
2123
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://sqlclean.io/assets/og-sqlclean-docs.png' } },
2224
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1200' } },
2325
{ tag: 'meta', attrs: { property: 'og:image:height', content: '630' } },

‎website/public/assets/icon.png‎

2.34 KB
Loading

‎website/public/favicon.png‎

2.34 KB
Loading

‎website/public/favicon.svg‎

Lines changed: 5 additions & 0 deletions
Loading

‎website/public/index.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<meta property="og:image:alt" content="SQLClean: fast SQL linting, safe fixes and one canonical format." />
1919
<meta name="twitter:card" content="summary_large_image" />
2020
<meta name="twitter:image" content="https://sqlclean.io/assets/og-sqlclean.png" />
21-
<link rel="icon" type="image/png" href="assets/icon.png" />
21+
<link rel="icon" type="image/png" sizes="128x128" href="assets/icon.png" />
22+
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
2223
<link rel="preload" href="/fonts/inter-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin />
2324
<link rel="stylesheet" href="styles.css" />
2425
<script>

0 commit comments

Comments
 (0)