diff --git a/calendarium/datetools.py b/calendarium/datetools.py index 0d942f2..a65ce5c 100644 --- a/calendarium/datetools.py +++ b/calendarium/datetools.py @@ -47,7 +47,7 @@ def translation_session_key(language): TRANSLATION_LABELS = { 'kjv': 'King James Version', 'lxx2012-web': 'LXX2012 & WEB', - 'douay-rheims': 'Douay-Rheims (Challoner, 1899)', + 'douay-rheims': 'Douay-Rheims', 'rccv': 'Romanian Corrected Cornilescu Version', 'srp1865': 'Serbian (Karadžić/Daničić, 1865)', } diff --git a/calendarium/templates/calendar.html b/calendarium/templates/calendar.html index aec5c5e..eb88fe3 100644 --- a/calendarium/templates/calendar.html +++ b/calendarium/templates/calendar.html @@ -21,18 +21,18 @@ {% block extra_nav %} diff --git a/calendarium/templates/readings.html b/calendarium/templates/readings.html index 500d7bc..09e4e39 100644 --- a/calendarium/templates/readings.html +++ b/calendarium/templates/readings.html @@ -20,19 +20,19 @@ {% block extra_nav %} @@ -100,7 +100,7 @@

Scripture Readings ({{ translation_label }})

{% if day.language == "en" %}

(via + .has-active, set server-side alongside the rest of the nav) for pages + that live inside "Integrations"/"More" -- otherwise a page like About + would have no visible indicator at all while its disclosure is closed. */ +.topbar-inner > nav a[aria-current="page"], +.topbar-inner > nav summary.has-active { + color: var(--color-text-strong); + text-decoration: underline; + text-decoration-color: var(--color-accent); + text-decoration-thickness: 2px; + text-underline-offset: 0.3em; +} /* Submenu (e.g. "Developers") -- a native
/ disclosure rather than a CSS :hover flyout, so it works identically (click to open, @@ -284,12 +312,18 @@ h1, h2, h3, h4 { display: none; } .topbar-inner > nav summary::after { + /* A single glyph rotated in place, rather than swapping between "\25be" + and "\25b4" on open -- those two characters have very slightly + different advance widths, which shifted the whole (flex-end + justified) nav row by a pixel or two whenever a submenu toggled. */ content: " \25be"; + display: inline-block; font-size: 0.7em; vertical-align: middle; + transition: transform 0.15s ease; } .topbar-inner > nav details[open] summary::after { - content: " \25b4"; + transform: rotate(180deg); } .topbar-inner > nav summary:hover { color: var(--color-text-strong); @@ -314,6 +348,45 @@ h1, h2, h3, h4 { box-shadow: var(--shadow-dropdown); z-index: 20; } +/*
content becomes visible/hidden as a discrete step (there's no + cross-browser-reliable way yet to animate that transition itself), but a + plain CSS animation still replays from its "from" state every time the + content is un-hidden -- so a fade+slide-in plays whenever the browser + actually un-hides it on open. The reverse (dropdown-out, via the + .closing class) is driven by base.html's script, which defers actually + closing the
until this animation finishes, so the content + stays rendered (and animatable) for the moment it takes to fade out. + The .closing rule is listed after the [open] one so it wins the tie -- + both match while a close is in flight, since .closing is added before + [open] is removed. */ +@media (prefers-reduced-motion: no-preference) { + .topbar-inner > nav details[open] ul { + animation: dropdown-in 0.15s ease; + } + .topbar-inner > nav details ul.closing { + animation: dropdown-out 0.15s ease; + } +} +@keyframes dropdown-in { + from { + opacity: 0; + transform: translateY(-6px); + } + to { + opacity: 1; + transform: translateY(0); + } +} +@keyframes dropdown-out { + from { + opacity: 1; + transform: translateY(0); + } + to { + opacity: 0; + transform: translateY(-6px); + } +} .topbar-inner > nav details ul li { display: block; text-transform: lowercase; @@ -377,6 +450,16 @@ h1, h2, h3, h4 { .topbar-inner > nav.nav-open > ul { display: flex; } + @media (prefers-reduced-motion: no-preference) { + .topbar-inner > nav.nav-open > ul { + animation: dropdown-in 0.15s ease; + } + /* See the .closing comment above the desktop submenu's dropdown-out + rule -- same deferred-close mechanism, driven by the same script. */ + .topbar-inner > nav > ul.closing { + animation: dropdown-out 0.15s ease; + } + } .topbar-inner > nav > ul > li { box-sizing: border-box; width: 100%; @@ -553,6 +636,30 @@ main#orthocal iframe { border: 1px solid var(--color-border-light); border-radius: 3px; } +/* The translation