chore: update deps
This commit is contained in:
parent
c9448f1a3b
commit
de40e51577
3 changed files with 23 additions and 6 deletions
|
@ -85,5 +85,22 @@
|
|||
<style>.client-side {display:none}</style>
|
||||
</noscript>
|
||||
</head>
|
||||
<body>{{ content }}</body>
|
||||
<body>
|
||||
<script>
|
||||
(() => {
|
||||
const currentTheme = sessionStorage?.getItem('theme');
|
||||
if (!currentTheme) sessionStorage?.setItem('theme', (this.prefersDarkScheme ? 'dark' : 'light'))
|
||||
if (currentTheme === 'dark') {
|
||||
document.body.classList.add('theme__dark')
|
||||
} else if (currentTheme === 'light') {
|
||||
document.body.classList.add('theme__light')
|
||||
} else if (this.prefersDarkScheme) {
|
||||
document.body.classList.add('theme__dark')
|
||||
} else if (!this.prefersDarkScheme) {
|
||||
document.body.classList.add('theme__light')
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{{ content }}
|
||||
</body>
|
||||
</html>
|
Reference in a new issue