From 4af7860acd3627a1f3f3d428c2273bb0bcbc161a Mon Sep 17 00:00:00 2001 From: Keith Smith Date: Fri, 30 Oct 2026 21:55:35 -0600 Subject: [PATCH] Apply the real brand logo and add a light/dark theme toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (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 + - + @@ -46,6 +47,7 @@ {% endif %} + {% if user.is_authenticated %}{% endif %} diff --git a/templates/core/_sidebar.html b/templates/core/_sidebar.html index 8251aa9..2659a70 100644 --- a/templates/core/_sidebar.html +++ b/templates/core/_sidebar.html @@ -1,6 +1,10 @@ +{% load static %} diff --git a/templates/pwa/manifest.webmanifest b/templates/pwa/manifest.webmanifest index 44376ea..4a3f1b9 100644 --- a/templates/pwa/manifest.webmanifest +++ b/templates/pwa/manifest.webmanifest @@ -5,8 +5,8 @@ "start_url": "{% url 'reader:stream' %}", "scope": "/", "display": "standalone", - "background_color": "#111111", - "theme_color": "#111111", + "background_color": "#0c0f16", + "theme_color": "#0f2038", "orientation": "portrait-primary", "icons": [ {