diff options
Diffstat (limited to 'src/views/index.pug')
-rw-r--r-- | src/views/index.pug | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/views/index.pug b/src/views/index.pug index 3df82f7..3f284f3 100644 --- a/src/views/index.pug +++ b/src/views/index.pug | |||
@@ -1,5 +1,6 @@ | |||
1 | include ../mixins/post | 1 | include ../mixins/post |
2 | include ../mixins/sub | 2 | include ../mixins/sub |
3 | include ../mixins/header | ||
3 | - var subs = [] | 4 | - var subs = [] |
4 | doctype html | 5 | doctype html |
5 | html | 6 | html |
@@ -38,13 +39,7 @@ html | |||
38 | document.addEventListener('DOMContentLoaded', ()=>updateButton("#{subreddit}")); | 39 | document.addEventListener('DOMContentLoaded', ()=>updateButton("#{subreddit}")); |
39 | body | 40 | body |
40 | main#content | 41 | main#content |
41 | div.header | 42 | +header() |
42 | div.header-item | ||
43 | a(href=`/`) home | ||
44 | div.header-item | ||
45 | a(href=`/subs`) subscriptions | ||
46 | div.header-item | ||
47 | a(href=`/r/popular`) popular | ||
48 | 43 | ||
49 | div.hero | 44 | div.hero |
50 | a(href=`/r/${subreddit}`) | 45 | a(href=`/r/${subreddit}`) |
@@ -52,11 +47,17 @@ html | |||
52 | if about | 47 | if about |
53 | p #{about.public_description} | 48 | p #{about.public_description} |
54 | div#button-container | 49 | div#button-container |
55 | a(href=`/r/${subreddit}`) | 50 | ul |
51 | li | ||
52 | a(href=`/r/${subreddit}/hot`) hot | ||
53 | li | ||
54 | a(href=`/r/${subreddit}/top`) top | ||
55 | li | ||
56 | a(href=`/r/${subreddit}/top?t=all`) top all | ||
56 | 57 | ||
57 | if posts | 58 | if posts |
58 | each child in posts.posts | 59 | each child in posts.posts |
59 | +post(child.data) | 60 | +post(child.data) |
60 | div.footer | 61 | div.footer |
61 | div.footer-item | 62 | div.footer-item |
62 | a(href=`/r/${subreddit}?after=${posts.after}`) next | 63 | a(href=`/r/${subreddit}?after=${posts.after}`) next → |