* add new instance
I want to add my own instance - i'm new to selfhosting so i can't guarantee it will be running all the time but i can guarantee whenever it's down i will fix it within hours!
* Fix onion protocol for instance
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Parse video data from cross_post_parent_list as vanilla Reddit does.
introduce testdata directory for testing JSON parsing functions.
refactor Media::parse for slightly more readability.
Add various test cases.
* Trim down to just refactoring
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Initial work on filtering subreddits and users
* Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics)
* Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment"
* Filter search results
* Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered"
* Remove unnecessary check
* Clean up
* Cargo format
* Collapse comments from filtered users
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Initial implementation of award parsing
* Posts: Implement awards as part of post
* Posts: remove parse_awards dead code
* Posts: initial implementation of displaying Awards at the post title
* Posts: Proxy static award images
* Client: i.redd.it should take path as argument not ID
* Posts: Just like Reddit make award size 16px
* Templates: limit the awards to 4 awards to increase performance
* Comments: Make awards a property of comments and display them
* Format and correct /img/:id
* Update comment.html
* [Optimization] Awards is not longer async
* [Revert] Posts can now display more than 4 awards again
* [Implementation] Awards not display on the frontpage
* [Implementation] Display count on awards
* Post: Start working on awards css
* Awards: Move the image size to css
* Awards: Start implementing tooltips
* Refactor awards code and tweak CSS indentation
* Unify Awards::new and Awards::parse
* Use native tooltips and brighten awards background
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Render markdown correctly in text post previews by using selftext_html.
I was mistakenly under the impression that we somehow render markdown ourselves, but turns out we just take whatever HTML reddit gives us, and we also need to do this for text previews.
Use CSS to limit the size of the previews instead of truncating in the template.
Fix table CSS.
* Fix post_body padding and trim post_previews
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Format post and comment votes with a decimal place, like vanilla reddit does.
Before this change, a vote count of 1999 was displayed as 1k, which is a pretty big gap. The displayed count also differed from what Reddit does. Now, the behaviour is consistent.
Added some tests for format_num.
* Provide more space for post scores
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Add text post previews.
* Add mask gradient over post preview text
* Increase post title font weight for contrast
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Collapse bot comments by default.
Comments are considered bot comments if they are posted by a moderator and are stickied. Some false positives are expected.
* Remove unneeded String conversion
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>