* 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>
* Pass the url parameter to all templates. Add a reddit_link to the navbar, which opens the current url on reddit.
* Add icon for reddit link
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Add the poster attribute even if a post claims to be type gif. Default to none-preloading for gifs like video-typed posts do.
* Disable autoplay for videos in feeds
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Encode HTML characters in flairs
* Encode HTML characters in flairs
* Use esc! macro for HTML escaping
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>