From 43e9e4994b68c7ce67a50ae794d3c4b25d3cf760 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Sat, 18 Jul 2026 01:06:14 -0700 Subject: [PATCH] Make the brand lockup a home link on every page (#182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mark and wordmark were already a home link on the Jinja pages (homepage, about, climate, glossary, privacy), but the five static tool pages — calendar, day, compare, legend, alerts — built their header separately and left the brand as a bare

, so clicking it did nothing. Wrap the lockup in `` there, matching the relative form the nav already uses: it resolves to the app root whether the app is served at the domain root or under a base path. The link wraps the whole lockup, so the mark is clickable too, not just the word. Its colour/decoration moves from `.site-name a` up to the shared `.brand h1 a, .brand .site-name a` rule so it covers both the static pages'

form and the homepage's

, with an accent hover so the affordance is visible. Adds a parametrized test over every page: the two header implementations are easy to change independently, so this asserts each one carries a home link that wraps the mark. --- tests/test_content.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/test_content.py b/tests/test_content.py index 070e2be..e0f3eb7 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -268,3 +268,24 @@ def test_search_verification_meta(client, monkeypatch): for b in (seo, home): assert '' in b assert '' in b + + +# The brand lockup is the site-wide "go home" affordance. The static tool pages +# and the Jinja pages build their headers separately, so this is easy to add to +# one and forget on the other — assert every page carries it. +BRAND_PAGES = ["/", "/calendar", "/day", "/compare", "/legend", "/alerts", + "/about", "/privacy", "/climate", "/glossary"] + + +@pytest.mark.parametrize("path", BRAND_PAGES) +def test_brand_lockup_links_home(client, path): + html = client.get(f"{B}{path}").text + brand = html.split('

', 1)[1].split("", 1)[0] + head = brand.split("

")[0] if "")[0] + # The link must wrap the whole lockup, so clicking the mark works too, not + # just the word. + assert "