mirror of
https://github.com/dsec-hub/dsec-notebook.git
synced 2026-09-22 15:43:58 +00:00
updated meta theme colour
This commit is contained in:
parent
8028650ade
commit
948899e130
3 changed files with 2 additions and 6 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Notebook" />
|
<meta name="apple-mobile-web-app-title" content="Notebook" />
|
||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ea4c65" />
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
var stored = localStorage.getItem("dsec_theme");
|
var stored = localStorage.getItem("dsec_theme");
|
||||||
|
|
@ -17,8 +17,6 @@
|
||||||
var root = document.documentElement;
|
var root = document.documentElement;
|
||||||
root.classList.toggle("dark", dark);
|
root.classList.toggle("dark", dark);
|
||||||
root.style.colorScheme = dark ? "dark" : "light";
|
root.style.colorScheme = dark ? "dark" : "light";
|
||||||
var meta = document.querySelector('meta[name="theme-color"]');
|
|
||||||
if (meta) meta.setAttribute("content", dark ? "#131014" : "#ffffff");
|
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<link rel="manifest" href="/manifest.webmanifest" />
|
<link rel="manifest" href="/manifest.webmanifest" />
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ function applyTheme(value: Theme) {
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
root.classList.toggle("dark", value === "dark");
|
root.classList.toggle("dark", value === "dark");
|
||||||
root.style.colorScheme = value;
|
root.style.colorScheme = value;
|
||||||
const meta = document.querySelector('meta[name="theme-color"]');
|
|
||||||
if (meta) meta.setAttribute("content", value === "dark" ? "#131014" : "#ffffff");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toggleTheme() {
|
export function toggleTheme() {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export default defineConfig({
|
||||||
scope: "/",
|
scope: "/",
|
||||||
display: "standalone",
|
display: "standalone",
|
||||||
background_color: "#ffffff",
|
background_color: "#ffffff",
|
||||||
theme_color: "#ffffff",
|
theme_color: "#ea4c65",
|
||||||
lang: "en",
|
lang: "en",
|
||||||
},
|
},
|
||||||
pwaAssets: {
|
pwaAssets: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue