aboutsummaryrefslogtreecommitdiff
path: root/src/views/index.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/index.pug')
-rw-r--r--src/views/index.pug33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/views/index.pug b/src/views/index.pug
index 0f00efe..a35837b 100644
--- a/src/views/index.pug
+++ b/src/views/index.pug
@@ -2,6 +2,8 @@ include ../mixins/post
2include ../mixins/header 2include ../mixins/header
3include ../mixins/head 3include ../mixins/head
4include ../utils 4include ../utils
5 - var viewQuery = query && query.view ? query.view : 'compact'
6 - var sortQuery = query && query.sort ? query.sort + (query.t ? '&t=' + query.t : '') : 'hot'
5doctype html 7doctype html
6html 8html
7 +head("home") 9 +head("home")
@@ -14,9 +16,9 @@ html
14 div.sub-title 16 div.sub-title
15 h1 17 h1
16 if isMulti 18 if isMulti
17 a(href=`/`) lurker 19 a(href=`/?sort=${sortQuery}&view=${viewQuery}`) lurker
18 else 20 else
19 a(href=`/r/${subreddit}`) 21 a(href=`/r/${subreddit}?sort=${sortQuery}&view=${viewQuery}`)
20 | r/#{subreddit} 22 | r/#{subreddit}
21 if !isMulti 23 if !isMulti
22 div#button-container 24 div#button-container
@@ -32,27 +34,34 @@ html
32 a(href="https://donate.stripe.com/dR62bTaZH1295Da4gg") oppiliappan 34 a(href="https://donate.stripe.com/dR62bTaZH1295Da4gg") oppiliappan
33 |, author of lurker 35 |, author of lurker
34 hr 36 hr
35 details 37 details.sort-details
36 summary.sorting sorting by #{query.sort + (query.t?' '+query.t:'')} 38 summary.sorting sorting by #{query.sort + (query.t?' '+query.t:'')}
37 div.sort-opts 39 div.sort-opts
38 div 40 div
39 a(href=`/r/${subreddit}?sort=hot`) hot 41 a(href=`/r/${subreddit}?sort=hot&view=${viewQuery}`) hot
40 div 42 div
41 a(href=`/r/${subreddit}?sort=new`) new 43 a(href=`/r/${subreddit}?sort=new&view=${viewQuery}`) new
42 div 44 div
43 a(href=`/r/${subreddit}?sort=rising`) rising 45 a(href=`/r/${subreddit}?sort=rising&view=${viewQuery}`) rising
44 div 46 div
45 a(href=`/r/${subreddit}?sort=top`) top 47 a(href=`/r/${subreddit}?sort=top&view=${viewQuery}`) top
46 div 48 div
47 a(href=`/r/${subreddit}?sort=top&t=day`) top day 49 a(href=`/r/${subreddit}?sort=top&t=day&view=${viewQuery}`) top day
48 div 50 div
49 a(href=`/r/${subreddit}?sort=top&t=week`) top week 51 a(href=`/r/${subreddit}?sort=top&t=week&view=${viewQuery}`) top week
50 div 52 div
51 a(href=`/r/${subreddit}?sort=top&t=month`) top month 53 a(href=`/r/${subreddit}?sort=top&t=month&view=${viewQuery}`) top month
52 div 54 div
53 a(href=`/r/${subreddit}?sort=top&t=year`) top year 55 a(href=`/r/${subreddit}?sort=top&t=year&view=${viewQuery}`) top year
54 div 56 div
55 a(href=`/r/${subreddit}?sort=top&t=all`) top all 57 a(href=`/r/${subreddit}?sort=top&t=all&view=${viewQuery}`) top all
58 details.view-details
59 summary.viewing viewing as #{viewQuery}
60 div.view-opts
61 div
62 a(href=`/r/${subreddit}?sort=${sortQuery}&view=compact`) compact
63 div
64 a(href=`/r/${subreddit}?sort=${sortQuery}&view=card`) card
56 65
57 if posts 66 if posts
58 each child in posts.posts 67 each child in posts.posts