From 60c0d63583379d10ac1ade479d99644e4c2e3a45 Mon Sep 17 00:00:00 2001
From: ayaka
Date: Thu, 27 Jun 2024 17:43:43 +1200
Subject: [PATCH] nsfw_landing style & function changes
theme the NSFW title and allow the user to directly change their setting
---
static/style.css | 8 ++++++++
templates/nsfwlanding.html | 7 ++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/static/style.css b/static/style.css
index c7ef478..03acd6b 100644
--- a/static/style.css
+++ b/static/style.css
@@ -1634,6 +1634,14 @@ td, th {
color: var(--accent);
}
+.nsfw-tag {
+ color: var(--nsfw);
+ border: 2px solid var(--nsfw);
+ padding: 3px;
+ border-radius: 5px;
+ font-weight: bold;
+}
+
/* Mobile */
@media screen and (max-width: 800px) {
diff --git a/templates/nsfwlanding.html b/templates/nsfwlanding.html
index 35344f3..aeac792 100644
--- a/templates/nsfwlanding.html
+++ b/templates/nsfwlanding.html
@@ -6,11 +6,11 @@
😱
{% if res_type == crate::utils::ResourceType::Subreddit %}
- r/{{ res }} is a NSFW community!
+ r/{{ res }} is a NSFW community!
{% else if res_type == crate::utils::ResourceType::User %}
- u/{{ res }}'s content is NSFW!
+ u/{{ res }}'s content is NSFW!
{% else if res_type == crate::utils::ResourceType::Post %}
- This post is NSFW!
+ This post is NSFW!
{% endif %}
@@ -20,6 +20,7 @@
This instance of Redlib is SFW-only.
{% else %}
Enable "Show NSFW posts" in settings to view this {% if res_type == crate::utils::ResourceType::Subreddit %}subreddit{% else if res_type == crate::utils::ResourceType::User %}user's posts or comments{% else if res_type == crate::utils::ResourceType::Post %}post{% endif %}.
+ Alternatively
enable NSFW posts now and view this {% if res_type == crate::utils::ResourceType::Subreddit %}subreddit{% else if res_type == crate::utils::ResourceType::User %}profile{% else if res_type == crate::utils::ResourceType::Post %}post{% endif %} immediately
{% if res_type == crate::utils::ResourceType::Post %} You can also temporarily bypass this gate and view the post by clicking on this link.{% endif %}
{% endif %}