Add SFW-only notice to footer.

This commit is contained in:
Daniel Valentine 2022-12-17 14:23:24 -07:00
parent 498248050e
commit a4356cf0ad
No known key found for this signature in database
GPG Key ID: C82492E4FF813823
3 changed files with 30 additions and 4 deletions

View File

@ -160,16 +160,35 @@ main {
overflow: inherit;
}
footer {
/* Body footer. */
body > footer {
display: flex;
justify-content: center;
margin: 20px;
}
body > footer > div#sfw-only {
color: var(--green);
border: 1px solid var(--green);
padding: 5px;
box-sizing: border-box;
border-radius: 5px;
}
/* / Body footer. */
/* Footer in content block. */
main > * > footer {
display: flex;
justify-content: center;
margin-top: 20px;
}
footer > a {
main > * > footer > a {
margin-right: 5px;
}
/* / Footer in content block. */
button {
background: none;
border: none;
@ -485,7 +504,7 @@ button.submit:hover > svg { stroke: var(--accent); }
overflow-x: auto;
}
#sort_options, #listing_options, footer > a {
#sort_options, #listing_options, main > * > footer > a {
border-radius: 5px;
align-items: center;
box-shadow: var(--shadow);
@ -494,7 +513,7 @@ button.submit:hover > svg { stroke: var(--accent); }
overflow: hidden;
}
#sort_options > a, #listing_options > a, footer > a {
#sort_options > a, #listing_options > a, main > * > footer > a {
color: var(--text);
padding: 10px 20px;
text-align: center;

View File

@ -65,5 +65,10 @@
{% endblock %}
</main>
{% endblock %}
{% block footer %}
{% if crate::utils::sfw_only() %}
<footer><div id="sfw-only">This instance of Libreddit is SFW-only.</div></footer>
{% endif %}
{% endblock %}
</body>
</html>

View File

@ -18,3 +18,5 @@
{% endif %}
</div>
{% endblock %}
{% block footer %}
{% endblock %}