feat(webui): bootstrap account settings management with light and dark mode
This commit is contained in:
parent
ab043d8617
commit
98c7d6f578
13 changed files with 136 additions and 14 deletions
|
@ -16,6 +16,10 @@
|
|||
<i>home_storage</i>
|
||||
<span>States</span>
|
||||
</a>
|
||||
<a href="/settings"{{ if eq .Page.Section "settings" }} class="fill"{{ end}}>
|
||||
<i>settings</i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
<a href="/logout">
|
||||
<i>logout</i>
|
||||
<span>Logout</span>
|
||||
|
@ -32,7 +36,7 @@
|
|||
<link href="https://cdn.jsdelivr.net/npm/beercss@3.8.0/dist/cdn/beer.min.css" rel="stylesheet">
|
||||
<title>TFSTATED - {{ .Page.Title }}</title>
|
||||
</head>
|
||||
<body class="dark">
|
||||
<body class="{{ if .Page.LightMode }}light{{ else }}dark{{ end }}">
|
||||
<nav class="left drawer l">{{ template "nav" . }}</nav>
|
||||
<nav class="left m">{{ template "nav" . }}</nav>
|
||||
<nav class="bottom s">{{ template "nav" . }}</nav>
|
||||
|
|
25
pkg/webui/html/settings.html
Normal file
25
pkg/webui/html/settings.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
<main class="responsive">
|
||||
<form action="/settings" method="post">
|
||||
<fieldset>
|
||||
<div class="field middle-align">
|
||||
<nav>
|
||||
<div class="max">
|
||||
<h6>Dark Mode</h6>
|
||||
</div>
|
||||
<label class="switch icon">
|
||||
<input {{ if not .Settings.LightMode }} checked{{ end }}
|
||||
name="dark-mode"
|
||||
type="checkbox"
|
||||
value="1" />
|
||||
<span>
|
||||
<i>dark_mode</i>
|
||||
</span>
|
||||
</label>
|
||||
</nav>
|
||||
</div>
|
||||
<button class="small-round" type="submit" value="login">Save</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</main>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue