Private
Public Access
Replaces the generic placeholder PWA icons and plain "Evection" text in
the sidebar with the actual logo kit (static/img/brand-full-{dark,light}
.png — the icon+wordmark lockup, swapped by theme via CSS). The PWA icon
set (icon-192, icon-512, maskable, apple-touch-icon) is regenerated from
the icon artwork: cropped to its content bounding box, padded to a square,
and flattened onto a solid brand-navy (#0f2038) background — maskable
specifically uses a tighter ~62% safe-zone scale so OS masking never clips
the art. manifest.webmanifest and the theme-color meta now use that same
navy instead of the old placeholder #111111.
Refined the light/dark CSS palette (static/css/base.css) using colors
sampled directly from the logo: brand navy for light-mode text, a blue
pulled from the orbit ring for --accent, amber for --star (already close
to brand, left mostly as-is). Dark mode shifted from a neutral charcoal
background toward the same navy family for consistency with the mark.
Added an explicit Light/Dark/System toggle in the sidebar footer, on top
of the existing prefers-color-scheme support rather than replacing it:
static/js/theme-init.js runs undeferred in <head> (before first paint, to
avoid a flash of the wrong theme) and applies any saved localStorage
choice via a data-theme attribute; static/js/theme.js (deferred) wires the
three buttons. CSS resolves theme in this priority: explicit
[data-theme] attribute, else prefers-color-scheme, else dark (the
unconditional :root default). Both scripts are external files/CSP-safe —
verified no inline <script> crept in and the CSP header is still present
under config.settings.prod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
87 lines
3.7 KiB
HTML
87 lines
3.7 KiB
HTML
{% load static %}
|
|
<nav class="sidebar" aria-label="Feeds and tags">
|
|
<div class="sidebar-brand">
|
|
<a href="{% url 'reader:stream' %}" aria-label="Evection">
|
|
<img src="{% static 'img/brand-full-dark.png' %}" alt="Evection" class="brand-wordmark-dark">
|
|
<img src="{% static 'img/brand-full-light.png' %}" alt="Evection" class="brand-wordmark-light">
|
|
</a>
|
|
</div>
|
|
|
|
<a href="{% url 'feeds:subscription_list' %}" class="sidebar-manage-btn">Subscription management</a>
|
|
|
|
<ul class="sidebar-top-nav">
|
|
<li>
|
|
<a href="{% url 'reader:stream' %}?filter=all"
|
|
class="{% if not request.GET.tag and not request.GET.feed and request.GET.filter == 'all' %}active{% endif %}">
|
|
All articles
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'reader:stream' %}?filter=starred"
|
|
class="{% if request.GET.filter == 'starred' %}active{% endif %}">
|
|
Favourites{% if sidebar_starred_count %} ({{ sidebar_starred_count }}){% endif %}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'reader:stream' %}?filter=saved"
|
|
class="{% if request.GET.filter == 'saved' %}active{% endif %}">
|
|
Saved for later
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
{% for entry in sidebar_tag_groups %}
|
|
<details class="sidebar-section" open>
|
|
<summary>
|
|
<a href="{% url 'reader:stream' %}?tag={{ entry.tag.pk }}"
|
|
class="sidebar-tag-link{% if request.GET.tag == entry.tag.pk|stringformat:'s' %} active{% endif %}">{{ entry.tag.name }}</a>
|
|
</summary>
|
|
{% if entry.subscriptions %}
|
|
<ul class="sidebar-item-list">
|
|
{% for subscription in entry.subscriptions %}
|
|
<li>
|
|
<a href="{% url 'reader:stream' %}?feed={{ subscription.feed_id }}"
|
|
class="sidebar-feed-link{% if request.GET.feed == subscription.feed_id|stringformat:'s' %} active{% endif %}">
|
|
{% if subscription.feed.favicon_url %}<img src="{{ subscription.feed.favicon_url }}" alt="" class="feed-favicon">{% endif %}
|
|
<span>{{ subscription.display_title }}</span>
|
|
</a>
|
|
{% if subscription.unread_count %}<span class="unread-count">{{ subscription.unread_count }}</span>{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</details>
|
|
{% endfor %}
|
|
|
|
{% if sidebar_untagged %}
|
|
<details class="sidebar-section" open>
|
|
<summary>Untagged</summary>
|
|
<ul class="sidebar-item-list">
|
|
{% for subscription in sidebar_untagged %}
|
|
<li>
|
|
<a href="{% url 'reader:stream' %}?feed={{ subscription.feed_id }}"
|
|
class="sidebar-feed-link{% if request.GET.feed == subscription.feed_id|stringformat:'s' %} active{% endif %}">
|
|
{% if subscription.feed.favicon_url %}<img src="{{ subscription.feed.favicon_url }}" alt="" class="feed-favicon">{% endif %}
|
|
<span>{{ subscription.display_title }}</span>
|
|
</a>
|
|
{% if subscription.unread_count %}<span class="unread-count">{{ subscription.unread_count }}</span>{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
{% endif %}
|
|
|
|
<ul class="sidebar-top-nav sidebar-footer-nav">
|
|
<li><a href="{% url 'articles:tag_list' %}">Manage tags</a></li>
|
|
<li><a href="{% url 'rules:rule_list' %}">Rules</a></li>
|
|
{% if request.user.is_staff %}<li><a href="{% url 'core:dashboard' %}">Dashboard</a></li>{% endif %}
|
|
<li><a href="{% url 'accounts:logout' %}">Log out</a></li>
|
|
</ul>
|
|
|
|
<div class="theme-switcher" role="group" aria-label="Theme">
|
|
<button type="button" data-theme-choice="light">Light</button>
|
|
<button type="button" data-theme-choice="dark">Dark</button>
|
|
<button type="button" data-theme-choice="system">System</button>
|
|
</div>
|
|
</nav>
|