chore: update deps

This commit is contained in:
Cory Dransfeldt 2024-02-28 11:50:31 -08:00
parent c9448f1a3b
commit de40e51577
No known key found for this signature in database
3 changed files with 23 additions and 6 deletions

8
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "6.6.3", "version": "6.6.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/theme-toggle": "^1.0.8", "@cdransf/theme-toggle": "^1.1.1",
"@daviddarnes/mastodon-post": "^1.1.1", "@daviddarnes/mastodon-post": "^1.1.1",
"@remy/webmention": "^1.5.0", "@remy/webmention": "^1.5.0",
"@zachleat/pagefind-search": "^1.0.3", "@zachleat/pagefind-search": "^1.0.3",
@ -1230,9 +1230,9 @@
} }
}, },
"node_modules/@cdransf/theme-toggle": { "node_modules/@cdransf/theme-toggle": {
"version": "1.0.8", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.0.8.tgz", "resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.1.1.tgz",
"integrity": "sha512-i4/oFQ75GszVQuR8YF1hkA1AXSNQiIL7+7tbjTzVgEzZTacrfvuAGO1Wxk7RO2dunsusg/OKNpzsx6vwehmNOg==" "integrity": "sha512-WUUj8rr6tf2vegJNFL31afWfHe9t05Ow8C5uK/sNLN3TXcNLlsG2oaYGQAajXkP2XOoaYte83RYu0wTCpdF58Q=="
}, },
"node_modules/@daviddarnes/mastodon-post": { "node_modules/@daviddarnes/mastodon-post": {
"version": "1.1.1", "version": "1.1.1",

View file

@ -20,7 +20,7 @@
"author": "Cory Dransfeldt", "author": "Cory Dransfeldt",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/theme-toggle": "^1.0.8", "@cdransf/theme-toggle": "^1.1.1",
"@daviddarnes/mastodon-post": "^1.1.1", "@daviddarnes/mastodon-post": "^1.1.1",
"@remy/webmention": "^1.5.0", "@remy/webmention": "^1.5.0",
"@zachleat/pagefind-search": "^1.0.3", "@zachleat/pagefind-search": "^1.0.3",

View file

@ -85,5 +85,22 @@
<style>.client-side {display:none}</style> <style>.client-side {display:none}</style>
</noscript> </noscript>
</head> </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> </html>