WIP
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
doctype html
|
||||
html(data-theme=user_settings.theme)
|
||||
doctype html
|
||||
html(data-theme=user_agent_settings.theme)
|
||||
head
|
||||
link(rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css")
|
||||
script(src="https://unpkg.com/htmx.org@1.9.12" integrity="sha384-ujb1lZYygJmzgSwoxRggbCHcjc0rB2XoQrxeTUQyRjrOnlCoYta87iKBWq3EsdM2" crossorigin="anonymous")
|
||||
|
||||
@@ -2,6 +2,7 @@ extends base.pug
|
||||
|
||||
block content
|
||||
main
|
||||
include user-agent-theme-switch.pug
|
||||
form(hx-post=links.identifier_form hx-swap="outerHTML")
|
||||
fieldset
|
||||
input(type="hidden" name="state" value=state)
|
||||
4
core/views/user-agent-theme-switch.pug
Normal file
4
core/views/user-agent-theme-switch.pug
Normal file
@@ -0,0 +1,4 @@
|
||||
- var isChecked = user_agent_settings.theme === 'dark'
|
||||
div#themeToggleContainer
|
||||
input(name="terms" type="checkbox" role="switch" hx-put=user_agent_settings.links.toggle_theme hx-swap="innerHTML" hx-select='div#themeToggleContainer' checked=isChecked)
|
||||
span Toggle Light/Dark Mode
|
||||
Reference in New Issue
Block a user