blob: c6e249f56d1e9996e976c13644025bd625b91ff4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<template>
<div :class="$colorMode.preference">
<VHeader />
<main>
<Nuxt />
</main>
</div>
</template>
<script>
export default {
created() {
setTimeout(() => {
const dark = document.querySelector("#__layout .dark");
console.log(dark);
if (dark) {
document.querySelector("body").className = "dark";
} else {
document.querySelector("body").className = "";
}
}, 1000);
},
};
</script>
|