From 560623b4025741d68d7738afc71b12d4bad13d3d Mon Sep 17 00:00:00 2001 From: Zed Date: Tue, 8 Oct 2019 13:07:53 +0200 Subject: [PATCH] Fix navbar referer path Fixes #57 --- src/views/general.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/general.nim b/src/views/general.nim index e022e4b..efeaa4c 100644 --- a/src/views/general.nim +++ b/src/views/general.nim @@ -9,8 +9,8 @@ import jester const doctype = "\n" proc renderNavbar*(title, rss: string; req: Request): VNode = - var path = $(parseUri(req.path) ? filterParams(req.params)) - path = "https://twitter.com" & path.replace("after=", "max_position=") + let path = $(parseUri(req.path) ? filterParams(req.params)) + let twitPath = "https://twitter.com" & path.replace("after=", "max_position=") buildHtml(nav): tdiv(class="inner-nav"): @@ -24,7 +24,7 @@ proc renderNavbar*(title, rss: string; req: Request): VNode = if rss.len > 0: icon "rss-feed", title="RSS Feed", href=rss if "/search" notin path: - icon "bird", title="Open in Twitter", href=path + icon "bird", title="Open in Twitter", href=twitPath icon "info-circled", title="About", href="/about" iconReferer "cog", "/settings", path, title="Preferences"