threadr.lostcave.ddnss.de/templates/pages/preferences.html

39 lines
1.4 KiB
HTML

{{define "preferences"}}
<!DOCTYPE html>
<html>
<head>
<title>{{.Title}}</title>
<link rel="stylesheet" href="{{.StaticPath}}/style.css">
<script src="{{.StaticPath}}/app.js" defer></script>
</head>
<body>
{{template "navbar" .}}
<main>
<header>
<h2>Preferences</h2>
</header>
{{if .ShowSuccess}}
<div class="notification success" style="position: static; margin-bottom: 1em; animation: none;">
Preferences saved successfully!
</div>
{{end}}
<section>
<form method="post" action="{{.BasePath}}/preferences/">
<h3>Draft Auto-Save</h3>
<label for="auto_save_drafts" style="display: flex; align-items: center; gap: 0.5em; cursor: pointer;">
<input type="checkbox" id="auto_save_drafts" name="auto_save_drafts" {{if .Preferences.AutoSaveDrafts}}checked{{end}}>
<span>Automatically save drafts while typing in chat</span>
</label>
<p style="margin-left: 1.5em; margin-top: 0.25em; font-size: 0.9em; opacity: 0.8;">
Drafts are saved to your browser's local storage and restored when you return to chat.
</p>
<input type="submit" value="Save Preferences" style="margin-top: 2em;">
</form>
</section>
</main>
{{template "cookie_banner" .}}
</body>
</html>
{{end}}