stylistic changes

This commit is contained in:
Mitarashi 2022-01-14 20:35:01 +02:00
parent ac0edc0a41
commit d29186bf8f
2 changed files with 3 additions and 5 deletions

View File

@ -4,9 +4,7 @@ import jester, karax/vdom
import ".."/[types, api], ../views/[embed, tweet, general]
import router_utils
export api, embed, vdom
export tweet, general
export router_utils
export api, embed, vdom, tweet, general, router_utils
proc createEmbedRouter*(cfg: Config) =
router embed:
@ -26,7 +24,7 @@ proc createEmbedRouter*(cfg: Config) =
if convo == nil or convo.tweet == nil:
resp Http404
resp $renderEmbeddedTweet(convo.tweet, cfg, request, prefs, path)
resp $renderTweetEmbed(convo.tweet, prefs, path, cfg, request)
get "/embed/Tweet.html":
let id = @"id"

View File

@ -356,7 +356,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
a(class="show-thread", href=("/i/status/" & $tweet.threadId)):
text "Show this thread"
proc renderEmbeddedTweet*(tweet: Tweet; cfg: Config; req: Request; prefs: Prefs; path: string): VNode =
proc renderTweetEmbed*(tweet: Tweet; prefs: Prefs; path: string; cfg: Config; req: Request): VNode =
buildHtml(tdiv(class="tweet-embed")):
renderHead(prefs, cfg, req)
renderTweet(tweet, prefs, path, mainTweet=true)