Commit Graph

266 Commits

Author SHA1 Message Date
Daniel Valentine
37d1939dc0
Fix #658.
Dimensions for embedded video in post are explicitly set only when defined by Reddit.

c/o: NKIPSC <15067635+NKIPSC@users.noreply.github.com>
2022-12-13 21:15:28 -07:00
Daniel Valentine
e579b97442
List post duplicates (resolves #574). 2022-12-03 01:08:36 -07:00
Macic
618b074ad5
Fix embeds (#648) 2022-11-27 11:42:34 -07:00
Daniel Valentine
d86cebf975 Request CSS with explicit version.
base.html will now request with a query parameter `v=` whose value is
the current version of Libreddit. This will cause the browser to request
the stylesheet for a specific version of Libreddit, bypassing the cache.
A new version of Libreddit will cause the browser to fetch a new
stylesheet.

Resolves #622. Credit is due to GitHub user @chloekek for offering this
solution in the following post:
        https://github.com/libreddit/libreddit/issues/622#issuecomment-1315961742
2022-11-23 14:43:36 -07:00
NKIPSC
fade305f90 Blur NSFW posts.
Reimplementation of libreddit/libreddit#482.

Co-authored by: Daniel Valentine <Daniel-Valentine@users.noreply.github.com>
2022-11-09 08:49:39 -07:00
NKIPSC
e62d33ccae Blur NSFW posts.
Reimplementation of libreddit/libreddit#482.

Co-authored by: Daniel Valentine <Daniel-Valentine@users.noreply.github.com>
2022-11-08 09:01:12 -07:00
Daniel Valentine
465d9b7ba7
Implement 'posts hidden because of NSFW'. (Resolves #159) (#619) 2022-11-07 20:54:49 -07:00
Daniel Valentine
8348e20724
Use permalink offered by Reddit (fixes #613). (#614) 2022-11-03 21:08:36 -07:00
arthomnix
1a1ff2e600
Use singular form of "comment" for posts with 1 comment (#567)
* 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>
2022-10-31 18:36:24 -07:00
Connor Holloway
6d49858d59 Fixed navbar: Add preference to settings restore link 2022-06-18 23:05:36 +01:00
Connor Holloway
6c202a59b0 Make the fixed navbar optional
Adds another on/off preference (default: on, keeps same
behaviour) for the fixed navbar.
When off the navbar will not remain at the top of the
page when scrolling.
This is useful for small displays such as phones where
otherwise the navbar takes up a sizeable portion of
the viewport.
2022-06-18 22:53:30 +01:00
spikecodes
50665bbeb3
Switch titles to <h1>s (Fixes #444) 2022-05-21 15:47:58 -07:00
spikecodes
d558127306
Add keyboard shortcuts to nav buttons (closes #466) 2022-05-20 23:10:11 -07:00
spikecodes
7f5bfc04b3
Always show Feeds dropdown (Fixes #408) 2022-05-20 22:42:05 -07:00
Nick Lowery
322aa97a18
Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
mikupls
60c7b6b23f
Embed css themes to simplify adding and testing new themes (#489) 2022-05-21 01:41:31 +00:00
Nick Lowery
c3dade257d
Restore post sorting preference by link (#406) 2022-05-17 03:11:01 +00:00
spikecodes
9eb42932df
Hide empty sidebar 2022-03-24 21:19:21 -07:00
Nick Lowery
f0a6bdc21b
Fix sorting buttons on r/all and r/popular (#402)
* 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>
2022-03-15 03:39:39 +00:00
Nick Lowery
70ff150ab4
Add user listing buttons (#400)
* Add user listing buttons

* Update to v0.22

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-03-13 19:06:27 +00:00
674Y3r
91bff826f0
Fix and improve admin/mod distinguishers (#386)
* 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.
2022-01-09 02:50:53 +00:00
Andrew Kaufman
9c325c2cbf
Search fixes (#384)
* Default to searching within subreddit

* Redirect to subreddit from search
2022-01-05 14:06:41 -08:00
spikecodes
6b59976fcf
Fix #376 2021-12-27 23:16:01 -08:00
spikecodes
3188f9d8e7
Tweak settings page design 2021-12-27 13:43:44 -08:00
spikecodes
7aeabfc4bc
Rewrite Reddit post links to Libreddit equivalents 2021-12-26 21:18:20 -08:00
spikecodes
7c73e352ce
Fix [deleted] user link color 2021-12-19 17:12:33 -08:00
alyaeanyx
f05a818edd
Don't create hrefs to u/[deleted] 2021-12-19 12:20:37 +01:00
Nick Lowery
888e7b302d
Filter subreddits and users (#317)
* 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>
2021-11-26 04:02:04 +00:00
Diego Magdaleno
bd413060c6
Support displaying awards (#168)
* 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>
2021-11-25 02:08:27 +00:00
obscurity
3054b9f4a0
Add rosebox theme (#237) 2021-11-24 19:31:19 +00:00
spikecodes
1cccef12a4
Add settings helper for HLS toggle 2021-11-23 22:43:25 -08:00
spikecodes
8e332b0630
Show full subreddit results in search 2021-11-23 22:24:23 -08:00
spikecodes
85ae7c1f60
Fix indentation and formatting 2021-11-23 22:23:29 -08:00
spikecodes
6d73024183 Remove obselete HTML comment 2021-11-22 18:16:06 -08:00
spikecodes
923ff776bd
Fix HLS + autoplay from breaking videos 2021-11-22 18:07:00 -08:00
spikecodes
7220190811 Link subscriptions in settings to their respective feeds 2021-11-21 22:30:44 -08:00
mikupls
768820cd4c
Render markdown correctly in text post previews by using selftext_html. (#335)
* 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>
2021-11-21 23:17:52 +00:00
mikupls
c2053524c7
Add text post previews. (#328)
* 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>
2021-11-20 21:13:50 +00:00
mikupls
731a407466
Collapse (sticky) bot comments by default. (#321)
* 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>
2021-11-19 05:42:53 +00:00
mikupls
0f7ba3c61d
Add "open in reddit" button to all pages (#304)
* 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>
2021-11-15 02:39:33 +00:00
spikecodes
1d4ea50a45
Add setting to autoplay videos 2021-10-25 21:27:55 -07:00
mikupls
546c8a4cda
Add poster attribute and disable autoplay on GIFs
* 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>
2021-10-23 21:25:51 +00:00
spikecodes
52a1b45014
Lazy load images 2021-09-06 12:02:52 -07:00
spikecodes
5c753ee171
Fix #251 2021-08-04 11:52:24 -07:00
spikecodes
85deb4947d
Support HLS playback in search and user feeds 2021-06-11 17:38:43 -07:00
spikecodes
d2002c9027
Disable dysfunctional moderator list feature 2021-06-11 11:03:36 -07:00
curlpipe
8bb247af3b
Added support for quarantined subreddits (#219)
* Added support for quarantined subreddits

* Added confirmation wall for quarantined subreddits

* Added quarantine walls to other routes and fixed case issue

* Correct obsolete use of cookie()

* Refactor param() and quarantine()

Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2021-05-16 15:53:39 +00:00
Tsvetomir Bonev
ed05f5a092
misc: fix HLS typo (#220) 2021-05-16 15:41:47 +00:00
spikecodes
e4f9bd7b8d
Configure default settings using environment variables 2021-05-15 13:59:42 -07:00
spikecodes
83a667347d
Add rel="nofollow" to hardcoded outbound links 2021-05-10 10:31:19 -07:00
Adrian Lebioda
928907086c
HLS video playback (#182)
* 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>
2021-05-10 01:25:52 +00:00
curlpipe
242ffab0da
Fix bug with subreddit subscription case & RTL languages (#214)
* Fixed subreddit subscription case issues

* Fixed formatting

* Fixed flair RTL language issue (#132)

* Convert display_lookup to Vec

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-05-06 19:11:25 +00:00
curlpipe
1211d781d0
Add list of moderators to sidebar (#213)
* Added list of moderators to sidebar & added wiki not found message

* Improved code formatting
2021-05-04 17:30:54 +00:00
curlpipe
9e4066658c
Added 2 new themes: violet & gold (#212)
* Added 2 new themes: violet & gold

* Increased contrast in Violet theme

* Changed accent colour on violet theme
2021-05-03 16:48:21 +00:00
Ben Smith
6f799b2617
Added laserwave theme (#210) 2021-04-30 16:26:49 +00:00
spikecodes
b3e4b7bfae
Add user following functionality 2021-04-06 10:23:05 -07:00
Leopardus
c8805f1078 Add opensearch support 2021-04-06 01:23:14 +02:00
The TwilightBlood
48c3a8c0d0
Added Dracula/Nord theme (#171)
* Added Dracula theme

* Updated accent and added Nord theme

* Updated accent and added Nord theme

* Added official foreground colors
2021-04-02 00:56:28 +00:00
spikecodes
6a7f725c12
Default subreddit post sorting. Closes #166 2021-03-25 21:41:58 -07:00
spikecodes
966e0ce921
Expand truncated numbers on mouseover. Close #156 2021-03-20 15:42:47 -07:00
spikecodes
9b5176f7b9
Sub icons and truncated subscribers in search results 2021-03-18 21:32:54 -07:00
spikecodes
038fafa378
Remove unnecessary trailing slashes 2021-03-17 17:28:05 -07:00
spikecodes
cda19a1912
Remove duplicate "description" meta tag for posts 2021-03-10 21:41:39 -08:00
spikecodes
f0e8deb000
Add alt attribute to user icon 2021-03-10 11:29:36 -08:00
spikecodes
e70dfe2c0b
Fix <video> size attributes 2021-03-10 10:49:18 -08:00
spikecodes
10c73fad7f
Switch favicon to ico 2021-02-26 12:04:11 -08:00
spikecodes
2bddc952cb
Link comment timestamps. Closes #137 2021-02-25 21:53:27 -08:00
spikecodes
5d643277bc
Geometric logo 2021-02-25 09:07:45 -08:00
spikecodes
80fb3a5c18
Fix #110 2021-02-21 20:28:04 -08:00
spikecodes
de38f7ef18
Fix post flairs 2021-02-21 10:11:17 -08:00
spikecodes
9cfab348eb
Filter by flair. Closes #124 2021-02-20 13:59:16 -08:00
spikecodes
a606e48435
Handle 4 more unwraps 2021-02-20 12:14:32 -08:00
Kieran
38230ed473
Add more rich meta tags (#121) 2021-02-16 19:16:32 +00:00
spikecodes
14ecf3cf60
Edit indicator 2021-02-14 14:53:09 -08:00
robrobinbin
93cfc713c6
Generate URL to restore settings, including subscriptions. Closes #89 (#116)
* Start recursive comments

* Update comment.html

* Fix move error

* Comment improvements

* Fix merge

* Remove extra endif from post.html

* Fix post.html

* Restore setting from link

* Tweak settings page

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-02-13 20:55:23 +00:00
spikecodes
ff8685ae4c
Add tooltips for accessibility 2021-02-12 20:53:33 -08:00
spikecodes
f06320a4ae
Subscribe to multireddit button. Closes #104 2021-02-12 20:47:54 -08:00
robrobinbin
809be42e01
Add "View all comments" and "Show parent comments" buttons when viewing a single thread. Closes #65 (#115)
* Start recursive comments

* Update comment.html

* Fix move error

* Comment improvements

* Fix merge

* Remove extra endif from post.html

* Fix post.html

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-02-12 09:16:59 -08:00
robrobinbin
4a40e16277
Fix comment structuring (#113)
* Start recursive comments

* Update comment.html

* Fix move error

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-02-10 10:48:51 -08:00
spikecodes
6feb347c27
Fix post ID parsing 2021-02-09 12:08:38 -08:00
spikecodes
e731cfbac4
Support post links without titles 2021-02-09 10:11:39 -08:00
Spike
ebbdd7185f
Move from Actix Web to Tide (#99)
* Initial commit

* Port posts

* Pinpoint Tide Bug

* Revert testing

* Add basic sub support

* Unwrap nested routes

* Front page & sync templates

* Port remaining functions

* Log request errors

* Clean main and settings

* Handle /w/ requests

* Create template() util

* Reduce caching time to 30s

* Fix subscription redirects

* Handle frontpage sorting
2021-02-09 17:38:52 +00:00
robrobinbin
7edca18f8d
Inline videos/gifs for card view (#107)
* Basic gallery support

* Inline videos for card view
2021-02-08 00:22:14 +00:00
robrobinbin
cf45d53fdd
Basic gallery support (#103) 2021-02-06 20:05:11 +00:00
curlpipe
2a475d127a
Added black theme (#101) 2021-02-06 20:04:29 +00:00
robin
653b0e7024 Don't use display contents and remove duplication 2021-02-03 20:11:04 +01:00
robrobinbin
1bcb070fbb
Update user.html 2021-02-02 21:21:29 +01:00
robrobinbin
24bc758090
Update subreddit.html 2021-02-02 21:21:11 +01:00
robrobinbin
ffbb1cf7cd
Update search.html 2021-02-02 21:20:38 +01:00
robrobinbin
cbf1f540d6
Update post.html 2021-02-02 21:20:03 +01:00
spikecodes
69941d9efd
Implement #88 2021-02-01 17:50:00 -08:00
spikecodes
956de50419
Change Libreddit PWA Theme Color 2021-02-01 16:26:35 -08:00
robrobinbin
dd908c9f68
Update user.html 2021-02-01 21:00:03 +01:00
robrobinbin
9e1948733d
Update subreddit.html 2021-02-01 20:59:31 +01:00
robrobinbin
9df1dfae32
Update search.html 2021-02-01 20:58:59 +01:00
robrobinbin
0742a33304
Update base.html 2021-02-01 20:32:57 +01:00
robrobinbin
58f4fc4e77
Update user.html 2021-02-01 20:27:08 +01:00
robrobinbin
7d8faefad0
Update search.html 2021-02-01 20:26:35 +01:00
robrobinbin
ba9b5afd4e
Update post.html 2021-02-01 20:25:57 +01:00
robrobinbin
ae09f77bf6
Update subreddit.html 2021-02-01 20:25:06 +01:00