chore: simplify toggle
This commit is contained in:
parent
a4755dc4c4
commit
d4edb1faeb
3 changed files with 17 additions and 18 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -3,18 +3,17 @@
|
|||
{% render "../../../assets/styles/components/theme-toggle.css" %}
|
||||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
<template id="theme-toggle-template">
|
||||
<button
|
||||
class="theme__toggle"
|
||||
aria-label="Toggle site theme">
|
||||
<span class="light">
|
||||
{% tablericon "sun" "Toggle light theme" %}
|
||||
</span>
|
||||
<span class="dark">
|
||||
{% tablericon "moon" "Toggle dark theme" %}
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<li class="client-side">
|
||||
<theme-toggle></theme-toggle>
|
||||
<theme-toggle>
|
||||
<button
|
||||
class="theme__toggle"
|
||||
aria-label="Toggle site theme">
|
||||
<span class="light">
|
||||
{% tablericon "sun" "Toggle light theme" %}
|
||||
</span>
|
||||
<span class="dark">
|
||||
{% tablericon "moon" "Toggle dark theme" %}
|
||||
</span>
|
||||
</button>
|
||||
</theme-toggle>
|
||||
</li>
|
Reference in a new issue