diff options
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/comments.pug | 12 | ||||
-rw-r--r-- | src/views/index.pug | 19 | ||||
-rw-r--r-- | src/views/subs.pug | 7 |
3 files changed, 26 insertions, 12 deletions
diff --git a/src/views/comments.pug b/src/views/comments.pug index e335cae..d7a8ab4 100644 --- a/src/views/comments.pug +++ b/src/views/comments.pug | |||
@@ -1,4 +1,5 @@ | |||
1 | include ../mixins/comment | 1 | include ../mixins/comment |
2 | include ../mixins/header | ||
2 | 3 | ||
3 | doctype html | 4 | doctype html |
4 | html | 5 | html |
@@ -10,8 +11,11 @@ html | |||
10 | script(src="https://cdn.dashjs.org/latest/dash.all.min.js") | 11 | script(src="https://cdn.dashjs.org/latest/dash.all.min.js") |
11 | body | 12 | body |
12 | main#content | 13 | main#content |
14 | +header() | ||
13 | div.hero | 15 | div.hero |
14 | h4 r/#{post.subreddit} | 16 | h3 |
17 | a(href=`/r/${post.subreddit}`) r/#{post.subreddit} | ||
18 | |||
15 | h2 #{post.title} | 19 | h2 #{post.title} |
16 | 20 | ||
17 | if post.is_gallery && post.is_gallery == true | 21 | if post.is_gallery && post.is_gallery == true |
@@ -28,6 +32,12 @@ html | |||
28 | 32 | ||
29 | if post.selftext_html | 33 | if post.selftext_html |
30 | p.self-text !{post.selftext_html} | 34 | p.self-text !{post.selftext_html} |
35 | div.info-container | ||
36 | p | ||
37 | | #{fmtnum(post.ups)} ↑ | ||
38 | | · by u/#{post.author} | ||
39 | |||
40 | hr | ||
31 | 41 | ||
32 | div.comments-container | 42 | div.comments-container |
33 | each child in comments | 43 | each child in comments |
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 → |
diff --git a/src/views/subs.pug b/src/views/subs.pug index a6bbb7b..2d2ee4f 100644 --- a/src/views/subs.pug +++ b/src/views/subs.pug | |||
@@ -1,4 +1,5 @@ | |||
1 | include ../mixins/sub | 1 | include ../mixins/sub |
2 | include ../mixins/header | ||
2 | 3 | ||
3 | doctype html | 4 | doctype html |
4 | html | 5 | html |
@@ -29,5 +30,7 @@ html | |||
29 | document.addEventListener('DOMContentLoaded', buildSubList); | 30 | document.addEventListener('DOMContentLoaded', buildSubList); |
30 | body | 31 | body |
31 | main#content | 32 | main#content |
32 | h1 subscriptions | 33 | +header() |
33 | div#subList | 34 | div.hero |
35 | h1 subscriptions | ||
36 | div#subList | ||