chore: update deps
This commit is contained in:
parent
bc561bcb27
commit
75882730b2
4 changed files with 38 additions and 16 deletions
|
@ -1,5 +1,10 @@
|
|||
<script type="module" src="/assets/scripts/components/api-text.js?v={% appVersion %}" crossorigin="anonymous"></script>
|
||||
<api-text api-url="/api/now-playing" display="inline" storage="local">
|
||||
<api-text
|
||||
api-url="/api/now-playing"
|
||||
display="inline"
|
||||
storage="local"
|
||||
transition-duration="10ms"
|
||||
>
|
||||
<span class="loading client-side"> {{ nowPlaying }}</span>
|
||||
<span class="content"></span>
|
||||
<noscript>
|
||||
|
|
|
@ -53,8 +53,13 @@
|
|||
document.querySelector("theme-toggle")?.getAttribute("storage") === "local"
|
||||
? localStorage
|
||||
: sessionStorage;
|
||||
|
||||
const currentTheme = storageType.getItem("theme") || "auto";
|
||||
const metaColorScheme = document.querySelector('meta[name="color-scheme"]');
|
||||
const lightIcon = document.querySelector(".light");
|
||||
const darkIcon = document.querySelector(".dark");
|
||||
const autoIcon = document.querySelector(".auto");
|
||||
|
||||
if (currentTheme === "auto") {
|
||||
metaColorScheme.setAttribute("content", "light dark");
|
||||
document.documentElement.style.colorScheme = "";
|
||||
|
@ -62,6 +67,18 @@
|
|||
metaColorScheme.setAttribute("content", currentTheme);
|
||||
document.documentElement.style.colorScheme = currentTheme;
|
||||
}
|
||||
|
||||
lightIcon.style.display = "none";
|
||||
darkIcon.style.display = "none";
|
||||
autoIcon.style.display = "none";
|
||||
|
||||
if (currentTheme === "light") {
|
||||
lightIcon.style.display = "inline";
|
||||
} else if (currentTheme === "dark") {
|
||||
darkIcon.style.display = "inline";
|
||||
} else {
|
||||
autoIcon.style.display = "inline";
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<div class="main-wrapper">
|
||||
|
|
Reference in a new issue