From 748825bcf87f4502aade95c0f6e01bf7eaec0ace Mon Sep 17 00:00:00 2001 From: teddit Date: Sat, 23 Jan 2021 11:23:14 +0100 Subject: [PATCH] mv before & after buttons before search, fix #130 --- views/index.pug | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/views/index.pug b/views/index.pug index 222176a..aedd28a 100644 --- a/views/index.pug +++ b/views/index.pug @@ -112,6 +112,13 @@ html != unescape(link.selftext_html) a(href="" + link.permalink + "", class="comments") | #{link.num_comments} comments + if json.info.before || json.info.after + .view-more-links + - var subreddit = 'all' + if(user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits)) + - subreddit = user_preferences.subbed_subreddits.join('+') + if json.info.after + a(href="/r/" + subreddit + "/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next › #search form(action="/r/all/search", method="GET") div @@ -121,11 +128,4 @@ html label(for="nsfw") include NSFW results input(type="checkbox", name="nsfw", id="nsfw", checked="checked") input(type="submit", value="search") - if json.info.before || json.info.after - .view-more-links - - var subreddit = 'all' - if(user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits)) - - subreddit = user_preferences.subbed_subreddits.join('+') - if json.info.after - a(href="/r/" + subreddit + "/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next › include includes/footer.pug