From eae5094ea241cc69b38cce328b73e858e6ff63de Mon Sep 17 00:00:00 2001 From: PortableProgrammer Date: Mon, 30 Dec 2024 21:17:57 +0000 Subject: Feat: Card View Initial Commit --- src/views/comments.pug | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/views/comments.pug') diff --git a/src/views/comments.pug b/src/views/comments.pug index 17af45a..1caf65a 100644 --- a/src/views/comments.pug +++ b/src/views/comments.pug @@ -6,6 +6,8 @@ include ../utils - var post = data.post - var comments = data.comments +- var viewQuery = 'view=' + (query && query.view ? query.view : 'compact') +- var sortQuery = 'sort=' + (query && query.sort ? query.sort + (query.t ? '&t=' + query.t : '') : 'hot') doctype html html +head(post.title) @@ -27,7 +29,7 @@ html |    | ยท |    - a(href=`/r/${post.subreddit}`) r/#{post.subreddit} + a(href=`/r/${post.subreddit}?${sortQuery}&${viewQuery}`) r/#{post.subreddit} div.info-container - var domain = (new URL(post.url)).hostname @@ -65,7 +67,7 @@ html if post.selftext_html div.self-text - != post.selftext_html + != convertInlineImageLinks(post.selftext_html) hr -- cgit v1.2.3