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.pug13
1 files changed, 11 insertions, 2 deletions
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]')