selfhostable, read-only reddit client
16
fork

Configure Feed

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

more fixes for galleries

Akshay dff02621 6555c541

+25 -14
+11 -13
src/mixins/post.pug
··· 7 7 a(href=`/comments/${p.id}`) 8 8 != p.title 9 9 span.domain (#{p.domain}) 10 + div.info-container 11 + p 12 + | ↑ #{fmtnum(p.ups)} 13 + |  ·  14 + a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)} replies 15 + |  ·  16 + a(href=`/r/${p.subreddit}`) r/#{p.subreddit} 17 + span.post-author 18 + |  ·  19 + by u/#{p.author} 10 20 div.media-preview 11 21 if p.is_gallery && p.is_gallery == true 12 22 if p.gallery_data ··· 20 30 else if p.post_hint == "hosted:video" 21 31 - var url = p.secure_media.reddit_video.dash_url 22 32 video(src=url data-dashjs-player width='100px' height='100px' onclick=`toggleDetails('${p.id}')`) 23 - div.info-container 24 - p 25 - | ↑ #{fmtnum(p.ups)} 26 - |  ·  27 - | 💬  28 - a(href=`/comments/${p.id}`) #{fmtnum (p.num_comments)} 29 - |  ·  30 - a(href=`/r/${p.subreddit}`) r/#{p.subreddit} 31 - span.post-author 32 - |  ·  33 - by u/#{p.author} 34 33 35 34 if p.is_gallery && p.is_gallery == true 36 35 if p.gallery_data ··· 52 51 details(id=`${p.id}`) 53 52 summary expand video 54 53 - var url = p.secure_media.reddit_video.dash_url 55 - a(href=url) 56 - video(src=url controls data-dashjs-player).post-media 54 + video(src=url controls data-dashjs-player).post-media 57 55 button(onclick=`toggleDetails('${p.id}')`) close 58 56
+7
src/public/styles.css
··· 235 235 .footer { 236 236 padding-bottom: 40px; 237 237 } 238 + 239 + a { 240 + white-space: normal; 241 + word-wrap: break-word; 242 + overflow-wrap: break-word; 243 + } 244 +
+7 -1
src/views/comments.pug
··· 14 14 h4 r/#{post.subreddit} 15 15 h2 #{post.title} 16 16 17 - if post.post_hint == 'image' 17 + if post.is_gallery && post.is_gallery == true 18 + if post.gallery_data 19 + if post.gallery_data.items 20 + each item in post.gallery_data.items 21 + - var url = `https://i.redd.it/${item.media_id}.jpg` 22 + img(src=url).post-media 23 + if (post.post_hint == "image" || post.post_hint == "link") && post.thumbnail && post.thumbnail != "self" && post.thumbnail != "default" 18 24 img(src=post.url).post-media 19 25 else if post.post_hint == 'hosted:video' 20 26 - var url = post.secure_media.reddit_video.dash_url