Skip to content

Commit

Permalink
fix dark mode handling
Browse files Browse the repository at this point in the history
  • Loading branch information
abjunior92 committed Apr 15, 2024
1 parent 2e3d112 commit b0cfc47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ import { XIcon } from "./icons/XIcon";
const footerLogo = document.getElementById("footer-logo");
const theme = localStorage.getItem("theme");

if (theme === "dark") {
if (
theme === "dark" ||
(!theme && window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
footerLogo.src = "/assets/logo_white_big.png";
} else {
footerLogo.src = "/assets/logo.png";
Expand Down

0 comments on commit b0cfc47

Please sign in to comment.