mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-12-03 14:09:27 +01:00
fix prev/next links on index
This commit is contained in:
parent
f3eceae1f3
commit
8685588df8
@ -10,21 +10,24 @@ html
|
|||||||
p #{JSON.stringify(http_status_code)}
|
p #{JSON.stringify(http_status_code)}
|
||||||
p #{JSON.stringify(http_statustext)}
|
p #{JSON.stringify(http_statustext)}
|
||||||
else
|
else
|
||||||
|
- var subreddit = ''
|
||||||
|
if(user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits))
|
||||||
|
- subreddit = '/r/' + user_preferences.subbed_subreddits.join('+')
|
||||||
header
|
header
|
||||||
a(href="/", class="main")
|
a(href="/", class="main")
|
||||||
h1 teddit
|
h1 teddit
|
||||||
.bottom
|
.bottom
|
||||||
ul.tabmenu
|
ul.tabmenu
|
||||||
li(class=!sortby || sortby == 'hot' ? 'active' : '')
|
li(class=!sortby || sortby == 'hot' ? 'active' : '')
|
||||||
a(href="/") hot
|
a(href="" + subreddit + "/") hot
|
||||||
li(class=sortby === 'new' ? 'active' : '')
|
li(class=sortby === 'new' ? 'active' : '')
|
||||||
a(href="/new") new
|
a(href="" + subreddit + "/new") new
|
||||||
li(class=sortby === 'rising' ? 'active' : '')
|
li(class=sortby === 'rising' ? 'active' : '')
|
||||||
a(href="/rising") rising
|
a(href="" + subreddit + "/rising") rising
|
||||||
li(class=sortby === 'controversial' ? 'active' : '')
|
li(class=sortby === 'controversial' ? 'active' : '')
|
||||||
a(href="/controversial") controversial
|
a(href="" + subreddit + "/controversial") controversial
|
||||||
li(class=sortby === 'top' ? 'active' : '')
|
li(class=sortby === 'top' ? 'active' : '')
|
||||||
a(href="/top") top
|
a(href="" + subreddit + "/top") top
|
||||||
if !before && !after && sortby === 'hot'
|
if !before && !after && sortby === 'hot'
|
||||||
#intro
|
#intro
|
||||||
h1 Welcome to teddit
|
h1 Welcome to teddit
|
||||||
@ -112,8 +115,9 @@ html
|
|||||||
input(type="submit", value="search")
|
input(type="submit", value="search")
|
||||||
if json.info.before || json.info.after
|
if json.info.before || json.info.after
|
||||||
.view-more-links
|
.view-more-links
|
||||||
if json.info.before && !subreddit_front
|
- var subreddit = 'all'
|
||||||
a(href="/r/all/" + sortby + "?t="+ (past ? past : '') +"&before=" + json.info.before + "") ‹ prev
|
if(user_preferences.subbed_subreddits && Array.isArray(user_preferences.subbed_subreddits))
|
||||||
|
- subreddit = user_preferences.subbed_subreddits.join('+')
|
||||||
if json.info.after
|
if json.info.after
|
||||||
a(href="/r/all/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next ›
|
a(href="/r/" + subreddit + "/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next ›
|
||||||
include includes/footer.pug
|
include includes/footer.pug
|
||||||
|
Loading…
Reference in New Issue
Block a user