selfhostable, read-only reddit client
16
fork

Configure Feed

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

fix annoyingly oversized link

a > h1 results in big text, big link, h1 > a, results in big text, small
link, and keeps people with fat thumbs happy

Akshay db4adf16 13589cb7

+8 -5
+4 -2
src/routes/index.js
··· 14 14 router.get('/r/:subreddit', async (req, res) => { 15 15 var subreddit = req.params.subreddit; 16 16 var query = req.query? req.query : {}; 17 - var sort = query.sort? query.sort : 'hot'; 17 + if (!query.sort) { 18 + query.sort = 'hot'; 19 + } 18 20 19 - var postsReq = G.getSubmissions(sort, `${subreddit}`, query); 21 + var postsReq = G.getSubmissions(query.sort, `${subreddit}`, query); 20 22 var aboutReq = G.getSubreddit(`${subreddit}`); 21 23 22 24 var [posts, about] = await Promise.all([postsReq, aboutReq]);
+4 -3
src/views/index.pug
··· 44 44 45 45 div.hero 46 46 div.sub-title 47 - a(href=`/r/${subreddit}`) 48 - h1 r/#{subreddit} 47 + h1 48 + a(href=`/r/${subreddit}`) 49 + | r/#{subreddit} 49 50 div#button-container 50 51 if about 51 52 p #{about.public_description} 52 53 details 53 - summary sort by 54 + summary sorting by #{query.sort + (query.t?' '+query.t:'')} 54 55 div.sort-opts 55 56 a(href=`/r/${subreddit}?sort=hot`) hot 56 57 a(href=`/r/${subreddit}?sort=new`) new