Skip to content

Commit

Permalink
Add favicon (#161)
Browse files Browse the repository at this point in the history
* Add favicon

* Minify svg

* Simplify favicon and line up with pixel grid
  • Loading branch information
paulcretu authored Jul 29, 2023
1 parent 081d0e9 commit 6ac9fa7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
Binary file modified ui/public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions ui/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions ui/public/vercel.svg

This file was deleted.

11 changes: 10 additions & 1 deletion ui/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ export default function MyDocument({ emotionStyleTags }: MyDocumentProps) {
<Head>
{/* PWA primary color */}
<meta name="theme-color" content={theme.palette.primary.main} />
<link rel="shortcut icon" href="/favicon.ico" />
{/*
prefer svg favicon but use ico as fallback
svg will change color based on prefers-color-scheme media query
fallback ico is colorful to provide contrast on both light and dark
`sizes` attribute is required for Chrome to pick svg over multi-size ico
(see https://bugs.chromium.org/p/chromium/issues/detail?id=1450857 and
https://bugs.chromium.org/p/chromium/issues/detail?id=1162276)
*/}
<link rel="icon" href="/favicon.ico?v=2" sizes="48x48"/>
<link rel="icon" href="/favicon.svg?v=2" type="image/svg+xml" />
<meta name="emotion-insertion-point" content="" />
{emotionStyleTags}
</Head>
Expand Down

0 comments on commit 6ac9fa7

Please sign in to comment.