redsunlib/templates/nsfwlanding.html
ayaka 60c0d63583 nsfw_landing style & function changes
theme the NSFW title and allow the user to directly change their setting
2024-06-27 17:43:43 +12:00

32 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}NSFW content gated{% endblock %}
{% block sortstyle %}{% endblock %}
{% block content %}
<div id="nsfw_landing">
<h1>
&#128561;
{% if res_type == crate::utils::ResourceType::Subreddit %}
r/{{ res }} is a <b class="nsfw-tag">NSFW</b> community!
{% else if res_type == crate::utils::ResourceType::User %}
u/{{ res }}'s content is <b class="nsfw-tag">NSFW</b>!
{% else if res_type == crate::utils::ResourceType::Post %}
This post is <b class="nsfw-tag">NSFW</b>!
{% endif %}
</h1>
<br />
<p>
{% if crate::utils::sfw_only() %}
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>
</div>
{% endblock %}
{% block footer %}
{% endblock %}