initHeader
This commit is contained in:
@@ -100,6 +100,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
const globalState = JSON.parse(window.localStorage.getItem("cn-global"));
|
||||
if (globalState) {
|
||||
const dot = document.querySelectorAll(".dot i");
|
||||
const html = document.querySelector("html");
|
||||
dot.forEach(item => (item.style.background = globalState.primary));
|
||||
if (globalState.isDark) html.style.background = "#141414";
|
||||
}
|
||||
</script>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user