Private
Public Access
Closes gitea#24: the sidebar's per-feed unread counts were already computed by sidebar() (apps.core.context_processors); each tag group's total is now the sum of its own feeds' counts (a feed can carry more than one tag, so this reuses the same per-feed data rather than a second query) and renders next to the tag name like a feed's own count. Closes gitea#25: each sidebar <details> section (one per tag, plus "Untagged") now carries a stable data-sidebar-key, and static/js/sidebar-state.js remembers which ones are collapsed in localStorage — this isn't a SPA, so every click re-renders the sidebar server-side, and previously every section reset back to expanded on the next page load. Per-browser, same pattern as theme.js/theme-init.js, not synced across devices/accounts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
63 lines
2.3 KiB
HTML
63 lines
2.3 KiB
HTML
{% load static %}
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}Evection{% endblock %}</title>
|
|
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
|
<script src="{% static 'js/htmx.min.js' %}" defer></script>
|
|
<script src="{% static 'js/theme-init.js' %}"></script>
|
|
|
|
<link rel="manifest" href="{% url 'pwa:manifest' %}">
|
|
<meta name="theme-color" content="#0f2038">
|
|
<link rel="icon" href="{% static 'pwa/icons/icon-192.png' %}">
|
|
<link rel="apple-touch-icon" href="{% static 'pwa/icons/apple-touch-icon.png' %}">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
<meta name="apple-mobile-web-app-title" content="Evection">
|
|
</head>
|
|
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
|
{% if user.is_authenticated %}
|
|
<div class="app-shell">
|
|
{% include "core/_sidebar.html" %}
|
|
<div class="app-main">
|
|
<header class="app-topbar">
|
|
<form method="get" action="{% url 'search:search' %}" class="topbar-search">
|
|
<input type="search" name="q" placeholder="Search words or #tags" aria-label="Search">
|
|
</form>
|
|
</header>
|
|
{% endif %}
|
|
|
|
{% if messages %}
|
|
<ul class="messages">
|
|
{% for message in messages %}
|
|
<li class="message message-{{ message.tags }}">{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<main class="{% if user.is_authenticated %}app-content{% else %}auth-content{% endif %}">
|
|
{% if not user.is_authenticated %}
|
|
<div class="auth-brand">
|
|
<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">
|
|
</div>
|
|
{% endif %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
{% if user.is_authenticated %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<script src="{% static 'js/stream.js' %}" defer></script>
|
|
{% if user.is_authenticated %}
|
|
<script src="{% static 'js/theme.js' %}" defer></script>
|
|
<script src="{% static 'js/sidebar-state.js' %}" defer></script>
|
|
{% endif %}
|
|
<script src="{% static 'js/register-sw.js' %}" defer></script>
|
|
</body>
|
|
</html>
|