chore: simplify toggle

This commit is contained in:
Cory Dransfeldt 2024-02-28 14:57:32 -08:00
parent a4755dc4c4
commit d4edb1faeb
No known key found for this signature in database
3 changed files with 17 additions and 18 deletions

8
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "6.6.4",
"license": "MIT",
"dependencies": {
"@cdransf/theme-toggle": "^1.1.4",
"@cdransf/theme-toggle": "^1.2.0",
"@daviddarnes/mastodon-post": "^1.1.1",
"@remy/webmention": "^1.5.0",
"@zachleat/pagefind-search": "^1.0.3",
@ -1230,9 +1230,9 @@
}
},
"node_modules/@cdransf/theme-toggle": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.1.4.tgz",
"integrity": "sha512-D7c3hYr8dD0wgwtR0eMX/xRNqcrVNJUGtQo3baBnwFRoEjWJyRcEHBncWPcy8s37a3LNxquRKTVvOviO0bR9Ng=="
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@cdransf/theme-toggle/-/theme-toggle-1.2.0.tgz",
"integrity": "sha512-f1wAu6QOuUfeWUsJw+2pgmR43iyxd8mWb8UwSTUqAsc5qH0+wHfsVUu7QUB9P06Ly6XsAd7XpZvhfOU1dM0vpw=="
},
"node_modules/@daviddarnes/mastodon-post": {
"version": "1.1.1",

View file

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

View file

@ -3,7 +3,8 @@
{% render "../../../assets/styles/components/theme-toggle.css" %}
{% endcapture %}
<style>{{ css }}</style>
<template id="theme-toggle-template">
<li class="client-side">
<theme-toggle>
<button
class="theme__toggle"
aria-label="Toggle site theme">
@ -14,7 +15,5 @@
{% tablericon "moon" "Toggle dark theme" %}
</span>
</button>
</template>
<li class="client-side">
<theme-toggle></theme-toggle>
</theme-toggle>
</li>