selfhostable, read-only reddit client
16
fork

Configure Feed

Select the types of activity you want to include in your feed.

support video preview and playback with hls streams

Akshay 9547d3d6 8b5db5e1

+29 -8
+3
src/mixins/comment.pug
··· 10 10 div.comment-info-container 11 11 div.info-item u/#{data.author} 12 12 div.info-item ↑ #{fmtnum(data.ups)} 13 + if data.collapsed_reason_code == "DELETED" 14 + div.info-item 15 + a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete 13 16 div.comment-body 14 17 != data.body_html 15 18 div.replies
+7 -6
src/mixins/post.pug
··· 4 4 div.post-container 5 5 div.post-text 6 6 div.title-container 7 - != p.title 7 + a(href=`/comments/${p.id}`) 8 + != p.title 8 9 span.domain (#{p.domain}) 9 10 div.info-container 10 11 div.info-item ↑ #{fmtnum(p.ups)} ··· 17 18 if p.post_hint == "image" || p.post_hint == "link" 18 19 if p.thumbnail && p.thumbnail != "self" || p.thumbnail != "default" 19 20 a(href=p.url) 20 - img(src=p.thumbnail width='100px') 21 - else if p.post_hint == "hosted:video" 22 - - var url = p.secure_media.reddit_video.fallback_url 23 - a(href=url) 24 - video(src=url height='100px') 21 + img(src=p.thumbnail width='100px' height='100px') 22 + else if p.post_hint == "hosted:video" 23 + - var url = p.secure_media.reddit_video.dash_url 24 + a(href=url) 25 + video(src=url controls data-dashjs-player="" width='100px' height='100px') 25 26
+9
src/public/styles.css
··· 134 134 margin-bottom: 10px; 135 135 } 136 136 137 + .title-container > a { 138 + color: black; 139 + text-decoration: none; 140 + } 141 + 142 + .title-container > a:visited { 143 + color: #999; 144 + } 145 + 137 146 .comment-info-container { 138 147 margin-bottom: -12px; 139 148 }
+7 -2
src/views/comments.pug
··· 6 6 meta(charset='UTF-8') 7 7 title reddit 8 8 link(rel='stylesheet', href='/styles.css') 9 + script(src="https://cdn.dashjs.org/latest/dash.all.min.js") 9 10 body 10 11 main#content 11 12 div.hero 12 13 a(href=`/r/${post.subreddit}`) 13 14 h4 ← r/#{post.subreddit} 14 15 h2 #{post.title} 16 + 15 17 if post.post_hint == 'image' 16 18 img(src=post.url).post-media 17 19 else if post.post_hint == 'hosted:video' 18 - video(src=post.url).post-media 19 - p.self-text !{post.selftext_html} 20 + - var url = post.secure_media.reddit_video.dash_url 21 + video(controls data-dashjs-player src=`${url}`).post-media 22 + 23 + if post.selftext_html 24 + p.self-text !{post.selftext_html} 20 25 21 26 div.comments-container 22 27 each child in comments
+3
src/views/index.pug
··· 7 7 meta(charset='UTF-8') 8 8 title reddit 9 9 link(rel='stylesheet', href='/styles.css') 10 + script(src="https://cdn.dashjs.org/latest/dash.all.min.js") 10 11 11 12 +subMgmt() 12 13 script. ··· 34 35 a(href=`/`) home 35 36 div.header-item 36 37 a(href=`/subs`) subscriptions 38 + div.header-item 39 + a(href=`/r/popular`) popular 37 40 38 41 div.hero 39 42 a(href=`/r/${subreddit}`)