From 956de50419fa4a87d9997995892f62a210864e20 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Mon, 1 Feb 2021 16:26:35 -0800 Subject: [PATCH 1/3] Change Libreddit PWA Theme Color --- static/manifest.json | 4 ++-- templates/base.html | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/static/manifest.json b/static/manifest.json index 4f02724..c017876 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -2,9 +2,9 @@ "name": "Libreddit", "short_name": "Libreddit", "display": "standalone", - "background_color": "#2A3443", + "background_color": "#1F1F1F", "description": "An alternative private front-end to Reddit", - "theme_color": "#2A3443", + "theme_color": "#1F1F1F", "icons": [ { "src": "./logo.png", diff --git a/templates/base.html b/templates/base.html index 343c759..6caad37 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,13 +7,12 @@ - + - From 69941d9efdd9d8b66ef64523f87e03ff23f8d280 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Mon, 1 Feb 2021 17:50:00 -0800 Subject: [PATCH 2/3] Implement #88 --- static/style.css | 21 ++++++++++++++------- templates/utils.html | 11 ++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/static/style.css b/static/style.css index 6a599e5..458bf35 100644 --- a/static/style.css +++ b/static/style.css @@ -286,9 +286,9 @@ aside { background-color: var(--highlighted); } -/* Subscribed subreddit list */ +/* Feeds */ -#subscriptions { +#feeds { position: relative; border-radius: 5px; border: var(--panel-border); @@ -299,11 +299,11 @@ aside { display: inline-block; } -#subscriptions > summary { +#feeds > summary { padding: 8px 15px; } -#sub_list { +#feed_list { position: absolute; display: flex; min-width: 100%; @@ -315,17 +315,24 @@ aside { z-index: 1; } -#sub_list > a { +#feed_list > p { + font-size: 13px; + opacity: 0.5; + padding: 5px 20px; + margin-top: 10px; +} + +#feed_list > a { padding: 10px 20px; transition: 0.2s background; } -#sub_list > .selected { +#feed_list > .selected { background-color: var(--accent); color: var(--foreground); } -#sub_list > a:not(.selected):hover { +#feed_list > a:not(.selected):hover { background-color: var(--foreground); } diff --git a/templates/utils.html b/templates/utils.html index b0d76b6..5c82b48 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -42,9 +42,14 @@ {% macro sub_list(current) -%} {% if prefs.subs.len() > 0 %} -
- Subscriptions -
+
+ Feeds +
+

MAIN FEEDS

+ Home + Popular + All +

REDDIT FEEDS

{% for sub in prefs.subs %} {{ sub }} {% endfor %} From 8a27b2bac814a4f7765d34dcfbb8510b3e17ccc3 Mon Sep 17 00:00:00 2001 From: Spike <19519553+spikecodes@users.noreply.github.com> Date: Tue, 2 Feb 2021 08:59:50 -0800 Subject: [PATCH 3/3] Support /w/ for Wikis --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 30b479a..7aa0333 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,7 +134,7 @@ async fn main() -> std::io::Result<()> { .route("/search/", web::get().to(search::find)) // View wiki of subreddit .service( - web::scope("/wiki") + web::scope("/{scope:wiki|w}") .route("/", web::get().to(subreddit::wiki)) .route("/{page}/", web::get().to(subreddit::wiki)), ),