diff --git a/src/demo/css/toggle-dark.css b/src/demo/css/toggle-dark.css index 227a54ed..fdd2a2fc 100644 --- a/src/demo/css/toggle-dark.css +++ b/src/demo/css/toggle-dark.css @@ -15,6 +15,7 @@ a.darkmode { 0 0 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%); transition: 0.2s ease-in box-shadow; + text-decoration: none; } a.darkmode:hover { diff --git a/src/demo/index.php b/src/demo/index.php index 81e97011..c3d44bfe 100644 --- a/src/demo/index.php +++ b/src/demo/index.php @@ -46,7 +46,6 @@ function gtag() { gtag('config', 'G-48CYVH0XEF'); GitHub Readme Streak Stats Demo - "> "> @@ -281,7 +280,13 @@ function gtag() { - "> + + + 🌞 + + 🌙 + + diff --git a/src/demo/js/toggle-dark.js b/src/demo/js/toggle-dark.js index e72d97b2..d97715ca 100644 --- a/src/demo/js/toggle-dark.js +++ b/src/demo/js/toggle-dark.js @@ -39,7 +39,7 @@ function getCookie(name) { * Turn on dark mode */ function darkmode() { - document.querySelector(".darkmode i").className = "gg-sun"; + document.querySelector("#darkmode-icon").innerText = "🌞"; setCookie("darkmode", "on", 9999); document.body.setAttribute("data-theme", "dark"); } @@ -48,7 +48,7 @@ function darkmode() { * Turn on light mode */ function lightmode() { - document.querySelector(".darkmode i").className = "gg-moon"; + document.querySelector("#darkmode-icon").innerText = "🌙"; setCookie("darkmode", "off", 9999); document.body.removeAttribute("data-theme"); }