Skip to content

Commit

Permalink
Add the dark mode icon to public; Make the icon in the title of page …
Browse files Browse the repository at this point in the history
…change with the color theme of system
  • Loading branch information
JihengLi committed Apr 19, 2024
1 parent 48b2d67 commit 8f0b536
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="favicon.ico" media="(prefers-color-scheme: dark)" />
<link rel="icon" type="image/x-icon" href="favicon_black.ico" media="(prefers-color-scheme: light)" />
<title>{pageProps.title}</title>
</Head>
<SessionProvider session={pageProps.session}>
Expand Down
Binary file added public/favicon_black.ico
Binary file not shown.

0 comments on commit 8f0b536

Please sign in to comment.