colorway toggle

This commit is contained in:
2025-01-06 07:15:24 +13:00
parent e478575706
commit 10c7327c39
5 changed files with 15 additions and 3 deletions

View File

@ -40,7 +40,9 @@
<nav class="
{% if prefs.fixed_navbar == "on" %} fixed_navbar{% endif %}">
<div id="logo">
<a id="redlib" href="/"><span id="lib">red</span><span id="reddit">sun</span><span id="lib">lib.</span></a>
<a id="redlib" href="/">
<span id="lib" {% if prefs.redsublib_colorway == "on" %}style="color: #ff8585;"{% endif %}">red</span><span id="reddit" {% if prefs.redsublib_colorway == "on" %}style="color: #ffbfbf;"{% endif %}>sun</span><span id="lib" {% if prefs.redsublib_colorway == "on" %}style="color: #ff8585;"{% endif %}>lib.</span>
</a>
{% block subscriptions %}{% endblock %}
</div>
{% block search %}{% endblock %}

View File

@ -29,6 +29,11 @@
{% call utils::options(prefs.mascot, prefs.available_mascots, "system") %}
</select>
</div>
<div class="prefs-group">
<label for="redsublib_colorway">Force redsublib colorway</label>
<input type="hidden" value="off" name="redsublib_colorway">
<input type="checkbox" name="redsublib_colorway" {% if prefs.redsublib_colorway == "on" %}checked{% endif %}>
</div>
</fieldset>
<fieldset>
<legend>Interface</legend>
@ -153,7 +158,7 @@
</form>
<div id="settings_note">
<p><b>Note:</b> settings and subscriptions are saved in browser cookies. Clearing your cookies will reset them.</p><br>
<p>You can restore your current settings and subscriptions after clearing your cookies using <a href="/settings/restore/?theme={{ prefs.theme }}&mascot={{ prefs.mascot }}&front_page={{ prefs.front_page }}&layout={{ prefs.layout }}&wide={{ prefs.wide }}&post_sort={{ prefs.post_sort }}&comment_sort={{ prefs.comment_sort }}&show_nsfw={{ prefs.show_nsfw }}&use_hls={{ prefs.use_hls }}&ffmpeg_video_downloads={{ prefs.ffmpeg_video_downloads }}&hide_hls_notification={{ prefs.hide_hls_notification }}&hide_awards={{ prefs.hide_awards }}&fixed_navbar={{ prefs.fixed_navbar }}&hide_sidebar_and_summary={{ prefs.hide_sidebar_and_summary}}&subscriptions={{ prefs.subscriptions.join("%2B") }}&filters={{ prefs.filters.join("%2B") }}">this link</a>.</p>
<p>You can restore your current settings and subscriptions after clearing your cookies using <a href="/settings/restore/?theme={{ prefs.theme }}&mascot={{ prefs.mascot }}&redsublib_colorway={{ prefs.redsublib_colorway }}&front_page={{ prefs.front_page }}&layout={{ prefs.layout }}&wide={{ prefs.wide }}&post_sort={{ prefs.post_sort }}&comment_sort={{ prefs.comment_sort }}&show_nsfw={{ prefs.show_nsfw }}&use_hls={{ prefs.use_hls }}&ffmpeg_video_downloads={{ prefs.ffmpeg_video_downloads }}&hide_hls_notification={{ prefs.hide_hls_notification }}&hide_awards={{ prefs.hide_awards }}&fixed_navbar={{ prefs.fixed_navbar }}&hide_sidebar_and_summary={{ prefs.hide_sidebar_and_summary}}&subscriptions={{ prefs.subscriptions.join("%2B") }}&filters={{ prefs.filters.join("%2B") }}">this link</a>.</p>
</div>
{% if prefs.subscriptions.len() > 0 %}
<div class="prefs" id="settings_subs">