This sets the target of the "code" link to `_blank`, so that it will
open in a new tab in browsers. Because the GitHub page is a different
context from libreddit, and accessing the repository doesn't imply that
the user is finished browsing libreddit, this seemed reasonable. This
also changes the link from `spikecodes/libreddit` to
`libreddit/libreddit`.
* Fix 'all_posts_hidden_nsfw' when there are no posts.
If a search query yielded no results and the user set nsfw posts to be
hidden, libreddit would show 'All posts are hidden because they are NSFW.
Enable "Show NSFW posts" in settings to view'. This is fixed by
verifying tnat posts.len > 0 before setting 'all_posts_hidden_nsfw' to
true.
* Add a message when no posts were found.
* Delete 2
* Use singular form of "comment" for posts with 1 comment
* Fix incorrect text on comment count tooltip
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Fix sorting buttons on r/all and r/popular
* Bump version to v0.22.2
* Fix empty sidebar in r/all and r/popular
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Fix regression with comments from deleted mods
Starting with https://github.com/spikecodes/libreddit/pull/367/files
comments from deleted moderators and admins(?) aren't highlighted.
* Highlight mod and admin usernames in posts
Works like on reddit + shows highlight for mods on the search page.
* 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>
* 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>