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>
54 lines
1.9 KiB
HTML
54 lines
1.9 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 %}">
|
|
{% 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>{% endif %}
|
|
<script src="{% static 'js/register-sw.js' %}" defer></script>
|
|
</body>
|
|
</html>
|