aboutsummaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/comments.pug3
-rw-r--r--src/views/index.pug13
2 files changed, 12 insertions, 4 deletions
diff --git a/src/views/comments.pug b/src/views/comments.pug
index 2b2b76e..7bd1f9e 100644
--- a/src/views/comments.pug
+++ b/src/views/comments.pug
@@ -10,8 +10,7 @@ html
10 body 10 body
11 main#content 11 main#content
12 div.hero 12 div.hero
13 a(href=`/r/${post.subreddit}`) 13 h4 r/#{post.subreddit}
14 h4 ← r/#{post.subreddit}
15 h2 #{post.title} 14 h2 #{post.title}
16 15
17 if post.post_hint == 'image' 16 if post.post_hint == 'image'
diff --git a/src/views/index.pug b/src/views/index.pug
index 8bbef65..9ac34a4 100644
--- a/src/views/index.pug
+++ b/src/views/index.pug
@@ -27,6 +27,13 @@ html
27 b.appendChild(button); 27 b.appendChild(button);
28 } 28 }
29 29
30 function toggleDetails(details_id) {
31 var detailsElement = document.getElementById(details_id);
32 if (detailsElement) {
33 detailsElement.open = !detailsElement.open;
34 }
35 }
36
30 document.addEventListener('DOMContentLoaded', ()=>updateButton("#{subreddit}")); 37 document.addEventListener('DOMContentLoaded', ()=>updateButton("#{subreddit}"));
31 body 38 body
32 main#content 39 main#content
@@ -44,8 +51,10 @@ html
44 if about 51 if about
45 p #{about.public_description} 52 p #{about.public_description}
46 div#button-container 53 div#button-container
54 a(href=`/r/${subreddit}`)
47 55
48 each child in posts.posts 56 if posts
49 +post(child.data) 57 each child in posts.posts
58 +post(child.data)
50 59
51 script(src='https://unpkg.com/[email protected]') 60 script(src='https://unpkg.com/[email protected]')