i seem to have left my brain somewhere
This commit is contained in:
ayaka 2025-01-13 15:10:35 +13:00
parent dcad2ac142
commit 05e2c31bec
2 changed files with 6 additions and 4 deletions

View File

@ -66,7 +66,7 @@
<input type="checkbox" name="hide_sidebar_and_summary" {% if prefs.hide_sidebar_and_summary == "on" %}checked{% endif %}> <input type="checkbox" name="hide_sidebar_and_summary" {% if prefs.hide_sidebar_and_summary == "on" %}checked{% endif %}>
</div> </div>
<div class="prefs-group"> <div class="prefs-group">
<label for="hide_banner">Hide subreddit banner images</label> <label for="hide_banner">Hide subreddit banners</label>
<input type="hidden" value="off" name="hide_banner"> <input type="hidden" value="off" name="hide_banner">
<input type="checkbox" name="hide_banner" {% if prefs.hide_banner == "on" %}checked{% endif %}> <input type="checkbox" name="hide_banner" {% if prefs.hide_banner == "on" %}checked{% endif %}>
</div> </div>

View File

@ -100,11 +100,13 @@
<a href="/r/{{ sub.name }}/wiki/index">Wiki</a> <a href="/r/{{ sub.name }}/wiki/index">Wiki</a>
</div> </div>
{% endif %} {% endif %}
{% block head %} {% if prefs.hide_banner != "on" %}
{% block head %}
{% call super() %} {% call super() %}
<link rel="preload" as="image" href="{{ sub.banner }}"> <link rel="preload" as="image" href="{{ sub.banner }}">
{% endblock %} {% endblock %}
<div style="background: linear-gradient(to bottom, rgba(255,255,255,0) 10%, var(--outside)), url({{ sub.banner }});background-size: 100%;background-size: cover;background-position: center center;" id="iconbanner"> {% endif %}
<div {% if prefs.hide_banner != "on" %}style="background: linear-gradient(to bottom, rgba(255,255,255,0) 10%, var(--outside)), url({{ sub.banner }});background-size: 100%;background-size: cover;background-position: center center;"{% endif %} id="iconbanner">
<img loading="lazy" id="sub_icon" src="{{ sub.icon }}" alt="Icon for r/{{ sub.name }}"> <img loading="lazy" id="sub_icon" src="{{ sub.icon }}" alt="Icon for r/{{ sub.name }}">
</div> </div>
<div id="sub_meta"> <div id="sub_meta">