working toggle via hyperscript
This commit is contained in:
parent
df35f5e736
commit
5bb6ac9d5f
2 changed files with 24 additions and 49 deletions
|
|
@ -40,15 +40,20 @@
|
|||
src="/flag-for-united-kingdom-svgrepo-com.svg"></a>
|
||||
{% endif %}
|
||||
|
||||
<button _="on click toggle .dark on the closest <body/>"> toggle </button>
|
||||
|
||||
<div class='toggle-switch'>
|
||||
<label>
|
||||
<input type='checkbox'>
|
||||
<input type='checkbox' _="on click or load if me.checked
|
||||
log('checked')
|
||||
add .dark to the closest <body/>
|
||||
else
|
||||
remove .dark from the closest <body/>
|
||||
">
|
||||
<span class='slider'></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if i am <:checked/> -->
|
||||
</nav>
|
||||
{% endmacro render_header %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue