1
0

Add preference for configuring sticky navbar

Fixes #1354
This commit is contained in:
Zed
2026-02-09 17:32:03 +01:00
parent 0a6e79e626
commit 5d28bd18c6
9 changed files with 26 additions and 15 deletions
+1 -6
View File
@@ -17,13 +17,8 @@ template cookiePrefs*(): untyped {.dirty.} =
template cookiePref*(pref): untyped {.dirty.} =
getPref(cookies(request), pref)
template themePrefs*(): Prefs =
var res = defaultPrefs
res.theme = cookiePref(theme)
res
template showError*(error: string; cfg: Config): string =
renderMain(renderError(error), request, cfg, themePrefs(), "Error")
renderMain(renderError(error), request, cfg, cookiePrefs(), "Error")
template getPath*(): untyped {.dirty.} =
$(parseUri(request.path) ? filterParams(request.params))
+1 -1
View File
@@ -10,7 +10,7 @@ export feature
proc createUnsupportedRouter*(cfg: Config) =
router unsupported:
template feature {.dirty.} =
resp renderMain(renderFeature(), request, cfg, themePrefs())
resp renderMain(renderFeature(), request, cfg, cookiePrefs())
get "/about/feature": feature()
get "/login/?@i?": feature()