Private
Public Access
One 5-minute poll (/new-since/) now drives the new-articles banner, the tab dot and the sidebar counts, across all subscriptions rather than the selected feed/tag. The banner lives in the base layout with a server-rendered baseline id and reloads the current view on click; new articles are never inserted automatically. Sidebar counts are patched in place by the poll, and immediately after reading or starring (HX-Trigger: countsChanged). Ingestion, filter rules and subscription changes now drop the cached counts instead of waiting out the TTL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
95 lines
4.4 KiB
HTML
95 lines
4.4 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 <span class="starred-count" data-starred-count{% if not sidebar_starred_count %} hidden{% endif %}>({{ sidebar_starred_count }})</span>
|
|
</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" data-sidebar-key="tag-{{ entry.tag.pk }}" open>
|
|
<summary>
|
|
<span class="sidebar-tag-row">
|
|
<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>
|
|
<span class="unread-count" data-tag-id="{{ entry.tag.pk }}"{% if not entry.unread_count %} hidden{% endif %}>{% if entry.unread_count %}{{ entry.unread_count }}{% endif %}</span>
|
|
</span>
|
|
</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>
|
|
<span class="unread-count" data-feed-id="{{ subscription.feed_id }}"{% if not subscription.unread_count %} hidden{% endif %}>{% if subscription.unread_count %}{{ subscription.unread_count }}{% endif %}</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</details>
|
|
{% endfor %}
|
|
|
|
{% if sidebar_untagged %}
|
|
<details class="sidebar-section" data-sidebar-key="untagged" 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>
|
|
<span class="unread-count" data-feed-id="{{ subscription.feed_id }}"{% if not subscription.unread_count %} hidden{% endif %}>{% if subscription.unread_count %}{{ subscription.unread_count }}{% endif %}</span>
|
|
</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>
|
|
<form method="post" action="{% url 'accounts:logout' %}">
|
|
{% csrf_token %}
|
|
<button type="submit">Log out</button>
|
|
</form>
|
|
</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>
|