From c3ce3972809ec7c9d405c01b82c574b9e651b0fd Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 26 Oct 2019 17:21:35 +0200 Subject: [PATCH] Add tweet focus to referer paths --- src/routes/status.nim | 2 +- src/views/general.nim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/status.nim b/src/routes/status.nim index 45fcf54..a02492a 100644 --- a/src/routes/status.nim +++ b/src/routes/status.nim @@ -27,7 +27,7 @@ proc createStatusRouter*(cfg: Config) = let title = pageTitle(conversation.tweet.profile) desc = conversation.tweet.text - html = renderConversation(conversation, prefs, getPath()) + html = renderConversation(conversation, prefs, getPath() & "#m") if conversation.tweet.video.isSome(): let thumb = get(conversation.tweet.video).thumb diff --git a/src/views/general.nim b/src/views/general.nim index 49f911a..a9392b1 100644 --- a/src/views/general.nim +++ b/src/views/general.nim @@ -9,8 +9,9 @@ import jester const doctype = "\n" proc renderNavbar*(title, rss: string; req: Request): VNode = - let path = $(parseUri(req.path) ? filterParams(req.params)) let twitterPath = getTwitterLink(req.path, req.params) + var path = $(parseUri(req.path) ? filterParams(req.params)) + if "/status" in path: path.add "#m" buildHtml(nav): tdiv(class="inner-nav"):