refactor the preferences page
parent
5553a8af01
commit
56416b78ec
|
|
@ -69,6 +69,7 @@ func PreferencesHandler(app *App) http.HandlerFunc {
|
|||
BasePath: app.Config.ThreadrDir,
|
||||
StaticPath: app.Config.ThreadrDir + "/static",
|
||||
CurrentURL: r.URL.Path,
|
||||
ContentTemplate: "preferences-content",
|
||||
},
|
||||
Preferences: prefs,
|
||||
ShowSuccess: showSuccess,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
{{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>
|
||||
{{define "preferences"}}{{template "base" .}}{{end}}
|
||||
|
||||
{{define "preferences-content"}}
|
||||
<header>
|
||||
<h2>Preferences</h2>
|
||||
</header>
|
||||
|
|
@ -31,8 +23,4 @@
|
|||
<input type="submit" value="Save Preferences" style="margin-top: 2em;">
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
{{template "cookie_banner" .}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue