|
@@ -11,7 +11,7 @@ const
|
|
|
doctype = "<!DOCTYPE html>\n"
|
|
doctype = "<!DOCTYPE html>\n"
|
|
|
lp = readFile("public/lp.svg")
|
|
lp = readFile("public/lp.svg")
|
|
|
|
|
|
|
|
-proc renderNavbar*(title, rss: string; req: Request): VNode =
|
|
|
|
|
|
|
+proc renderNavbar*(cfg: Config, rss: string; req: Request): VNode =
|
|
|
let twitterPath = getTwitterLink(req.path, req.params)
|
|
let twitterPath = getTwitterLink(req.path, req.params)
|
|
|
var path = $(parseUri(req.path) ? filterParams(req.params))
|
|
var path = $(parseUri(req.path) ? filterParams(req.params))
|
|
|
if "/status" in path: path.add "#m"
|
|
if "/status" in path: path.add "#m"
|
|
@@ -19,13 +19,13 @@ proc renderNavbar*(title, rss: string; req: Request): VNode =
|
|
|
buildHtml(nav):
|
|
buildHtml(nav):
|
|
|
tdiv(class="inner-nav"):
|
|
tdiv(class="inner-nav"):
|
|
|
tdiv(class="nav-item"):
|
|
tdiv(class="nav-item"):
|
|
|
- a(class="site-name", href="/"): text title
|
|
|
|
|
|
|
+ a(class="site-name", href="/"): text cfg.title
|
|
|
|
|
|
|
|
a(href="/"): img(class="site-logo", src="/logo.png", alt="Logo")
|
|
a(href="/"): img(class="site-logo", src="/logo.png", alt="Logo")
|
|
|
|
|
|
|
|
tdiv(class="nav-item right"):
|
|
tdiv(class="nav-item right"):
|
|
|
icon "search", title="Search", href="/search"
|
|
icon "search", title="Search", href="/search"
|
|
|
- if rss.len > 0:
|
|
|
|
|
|
|
+ if cfg.enableRSS and rss.len > 0:
|
|
|
icon "rss-feed", title="RSS Feed", href=rss
|
|
icon "rss-feed", title="RSS Feed", href=rss
|
|
|
icon "bird", title="Open in Twitter", href=twitterPath
|
|
icon "bird", title="Open in Twitter", href=twitterPath
|
|
|
a(href="https://liberapay.com/zedeus"): verbatim lp
|
|
a(href="https://liberapay.com/zedeus"): verbatim lp
|
|
@@ -58,7 +58,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; titleText=""; desc=""; video="";
|
|
|
link(rel="search", type="application/opensearchdescription+xml", title=cfg.title,
|
|
link(rel="search", type="application/opensearchdescription+xml", title=cfg.title,
|
|
|
href=opensearchUrl)
|
|
href=opensearchUrl)
|
|
|
|
|
|
|
|
- if rss.len > 0:
|
|
|
|
|
|
|
+ if cfg.enableRSS and rss.len > 0:
|
|
|
link(rel="alternate", type="application/rss+xml", href=rss, title="RSS feed")
|
|
link(rel="alternate", type="application/rss+xml", href=rss, title="RSS feed")
|
|
|
|
|
|
|
|
if prefs.hlsPlayback:
|
|
if prefs.hlsPlayback:
|
|
@@ -121,7 +121,7 @@ proc renderMain*(body: VNode; req: Request; cfg: Config; prefs=defaultPrefs;
|
|
|
renderHead(prefs, cfg, titleText, desc, video, images, banner, ogTitle, theme, rss)
|
|
renderHead(prefs, cfg, titleText, desc, video, images, banner, ogTitle, theme, rss)
|
|
|
|
|
|
|
|
body:
|
|
body:
|
|
|
- renderNavbar(cfg.title, rss, req)
|
|
|
|
|
|
|
+ renderNavbar(cfg, rss, req)
|
|
|
|
|
|
|
|
tdiv(class="container"):
|
|
tdiv(class="container"):
|
|
|
body
|
|
body
|