* 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>
* 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>
* HLS video playback
Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>
* Add LibreJS compliance
* Locally host hls.js
* Notification about HLS under videos that support it
Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>
* Use .contains() instead of .find() == None
* Make list of preferences constant
* Change headers_keys from Vector into Array
* Fix incorrect detecting of # in paths
* Remove trailing-slash-appending if statement
* Change HLS notification styling
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>