nsfw_landing style & function changes
theme the NSFW title and allow the user to directly change their setting
This commit is contained in:
parent
f398d16c22
commit
60c0d63583
@ -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) {
|
||||
|
@ -6,11 +6,11 @@
|
||||
<h1>
|
||||
😱
|
||||
{% if res_type == crate::utils::ResourceType::Subreddit %}
|
||||
r/{{ res }} is a NSFW community!
|
||||
r/{{ res }} is a <b class="nsfw-tag">NSFW</b> community!
|
||||
{% else if res_type == crate::utils::ResourceType::User %}
|
||||
u/{{ res }}'s content is NSFW!
|
||||
u/{{ res }}'s content is <b class="nsfw-tag">NSFW</b>!
|
||||
{% else if res_type == crate::utils::ResourceType::Post %}
|
||||
This post is NSFW!
|
||||
This post is <b class="nsfw-tag">NSFW</b>!
|
||||
{% endif %}
|
||||
</h1>
|
||||
<br />
|
||||
@ -20,6 +20,7 @@
|
||||
This instance of Redlib is SFW-only.</p>
|
||||
{% else %}
|
||||
Enable "Show NSFW posts" in <a href="/settings">settings</a> 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 %}. <br>
|
||||
<div>Alternatively <a href="/settings/update/?show_nsfw=on&redirect={{self.url[1..self.url.len()]}}">enable NSFW posts</a> 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</div>
|
||||
{% if res_type == crate::utils::ResourceType::Post %} You can also temporarily bypass this gate and view the post by clicking on this <a href="{{url}}&bypass_nsfw_landing">link</a>.{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user