workding memory of dark on the toggle
This commit is contained in:
parent
5bb6ac9d5f
commit
9e5ef69aeb
2 changed files with 56 additions and 44 deletions
|
|
@ -41,13 +41,22 @@
|
|||
{% endif %}
|
||||
|
||||
|
||||
<div class='toggle-switch'>
|
||||
<div class='toggle-dark'>
|
||||
<label>
|
||||
<input type='checkbox' _="on click or load if me.checked
|
||||
<input type='checkbox' _="on click
|
||||
log(the first <body/>) then
|
||||
if me.checked
|
||||
log('checked')
|
||||
add .dark to the closest <body/>
|
||||
else
|
||||
remove .dark from the closest <body/>
|
||||
end
|
||||
end
|
||||
on load
|
||||
if (the first <body/> match .dark)
|
||||
log('loaded as dark') then
|
||||
set me.checked to true then
|
||||
log(me)
|
||||
">
|
||||
<span class='slider'></span>
|
||||
</label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue