Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fw 6130 update favicon dark light mode #648

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed responsive favicon and replaced with black and white version
Cara-Barter committed Oct 24, 2024
commit 92f83cedf83948d0c6b80f311ed96e7039a13c16
45 changes: 6 additions & 39 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -16,51 +16,18 @@
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=4, user-scalable=yes"
/>
<script>
const setFavicon = () => {
let favicon = document.querySelector('link[rel="icon"]')
// if (!favicon) {
// favicon = document.createElement('favicon')
// favicon.rel = 'icon'
// document.head.appendChild(favicon)
// }
favicon.href = window.matchMedia('(prefers-color-scheme: dark)').matches
? 'favicons/favicon-white-32x32.png'
: 'favicons/favicon-black-32x32.png'
}
setFavicon()
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', setFavicon)
</script>
<!-- <link
<link
rel="icon"
type="image/png"
sizes="32x32"
href="<%=require('favicons/favicon-white-32x32.png')%>"
media="(prefers-color-scheme: dark)"
/> -->
<!-- <link
href="<%=require('favicons/favicon-32x32.png')%>"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="<%=require('favicons/favicon-white-16x16.png')%>"
media="(prefers-color-scheme: dark)"
/> -->
<!-- <link
rel="icon"
type="image/png"
sizes="32x32"
href="<%=require('favicons/favicon-black-32x32.png')%>"
media="(prefers-color-scheme: light)"
/> -->
<!-- <link
rel="icon"
type="image/png"
sizes="16x16"
href="<%=require('favicons/favicon-black-16x16.png')%>"
media="(prefers-color-scheme: light)"
/> -->
href="<%=require('favicons/favicon-16x16.png')%>"
/>
<!-- Default meta tags for FB sharing -->
<meta property="og:url" content="https://www.firstvoices.com" />
<meta property="og:type" content="website" />
Binary file added src/assets/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/favicons/favicon-black-16x16.png
Binary file not shown.
Binary file removed src/assets/favicons/favicon-black-32x32.png
Binary file not shown.
Binary file removed src/assets/favicons/favicon-white-16x16.png
Binary file not shown.
Binary file removed src/assets/favicons/favicon-white-32x32.png
Binary file not shown.