Compare commits

..

4 commits

Author SHA1 Message Date
Zaldimmar
2b009beac1 Use organization-neutral names in code and browser keys
- The timeline's ngu-tl classes and keyframes are site-tl; nguLogo is
  siteLogo; the event card's ngu grid area is org; window.__NGU_SITE__
  is window.__SITE__; QR downloads are qr-<page>.png
- Browser keys (theme, closed banner and privacy notice, chunk reload)
  start site-; the page's first script moves any old ngu- values over
  once, so nobody loses their theme or sees a closed notice again
- Session and Google sign-in cookies are site_session and site_oauth
  (__Host- over https); everyone signs in again once

Record ids, server paths, the service and the database file keep
their names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:23:29 -05:00
Zaldimmar
92e7938b64 Give blog posts an optional table of contents
Blog posts -> Show contents (migration 043, off by default): with two
or more headings, the post's headings sit in a sticky column beside
it with the one being read lit (an IntersectionObserver, not a scroll
listener), and fold out at the top on phones. Content-block headings
now carry anchor ids, so a link can point at one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:21:48 -05:00
Zaldimmar
f59ab314e0 Give the history timeline's small logos the dark-mode backing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:19:52 -05:00
Zaldimmar
99d83eb090 Separate data requests from website feedback in the admin
Forms now has two queues, Website feedback and Data requests, each
its own card on the admin home and a tab on the page, with what's new
in each. The API takes ?kind=feedback|privacy and counts per queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:19:06 -05:00
37 changed files with 530 additions and 236 deletions

View file

@ -45,10 +45,10 @@ Both lines are already in every proxied block in `nginx-dev` and in
## Sign-in ## Sign-in
- The session cookie is `__Host-ngu_session`: the browser only - The session cookie is `__Host-site_session`: the browser only
accepts it Secure, on path `/`, with no Domain, so another accepts it Secure, on path `/`, with no Domain, so another
subdomain can't set or overwrite it. With `COOKIE_SECURE=false` subdomain can't set or overwrite it. With `COOKIE_SECURE=false`
(plain-http local work) it's `ngu_session`, since the prefix needs (plain-http local work) it's `site_session`, since the prefix needs
Secure. Secure.
- Logins are limited per IP where `/api/auth/login` is mounted (10 - Logins are limited per IP where `/api/auth/login` is mounted (10
per 15 minutes, `server/src/index.js`) and per email in per 15 minutes, `server/src/index.js`) and per email in
@ -64,8 +64,8 @@ Both lines are already in every proxied block in `nginx-dev` and in
entry becomes the proxy's address and every visitor shares one entry becomes the proxy's address and every visitor shares one
rate-limit bucket: set nginx's `real_ip_header` and rate-limit bucket: set nginx's `real_ip_header` and
`set_real_ip_from` for the proxy first. `set_real_ip_from` for the proxy first.
- The Google sign-in state cookie is `__Host-ngu_oauth` (plain - The Google sign-in state cookie is `__Host-site_oauth` (plain
`ngu_oauth` over local http), and the page it returns to is checked `site_oauth` over local http), and the page it returns to is checked
again when the browser comes back. again when the browser comes back.
## From nginx: HSTS ## From nginx: HSTS

View file

@ -12,7 +12,17 @@
flash: this browser's choice (ThemeToggle), else the system. --> flash: this browser's choice (ThemeToggle), else the system. -->
<script> <script>
try { try {
var t = localStorage.getItem("ngu-theme"); // Once: browser keys used to start "ngu-"; move them to "site-"
// so a visitor keeps their theme and closed notices.
for (var i = localStorage.length - 1; i >= 0; i--) {
var k = localStorage.key(i);
if (k && k.indexOf("ngu-") === 0) {
var nk = "site-" + k.slice(4);
if (localStorage.getItem(nk) === null) localStorage.setItem(nk, localStorage.getItem(k));
localStorage.removeItem(k);
}
}
var t = localStorage.getItem("site-theme");
document.documentElement.dataset.theme = document.documentElement.dataset.theme =
t === "dark" || t === "light" ? t : matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; t === "dark" || t === "light" ? t : matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
} catch (e) {} } catch (e) {}

View file

@ -26,6 +26,7 @@ export const blogPosts = {
text("excerpt"), text("excerpt"),
text("cover_image"), text("cover_image"),
text("cover_alt"), text("cover_alt"),
bool("show_contents"),
date("published_on"), date("published_on"),
text("tags"), text("tags"),
text("guest_author"), text("guest_author"),

View file

@ -39,7 +39,7 @@ export const SECURE_COOKIE = (process.env.COOKIE_SECURE ?? "true") !== "false";
// path /, with no Domain, so a sibling subdomain can't plant or // path /, with no Domain, so a sibling subdomain can't plant or
// overwrite it. Plain http (local work, COOKIE_SECURE=false) can't // overwrite it. Plain http (local work, COOKIE_SECURE=false) can't
// use the prefix, so it keeps the plain name. // use the prefix, so it keeps the plain name.
export const COOKIE_NAME = SECURE_COOKIE ? "__Host-ngu_session" : "ngu_session"; export const COOKIE_NAME = SECURE_COOKIE ? "__Host-site_session" : "site_session";
const IP_SALT = process.env.IP_SALT ?? randomBytes(16).toString("hex"); const IP_SALT = process.env.IP_SALT ?? randomBytes(16).toString("hex");

View file

@ -78,7 +78,7 @@ app.use("/api/admin/*", logger());
/api/csp-report (journalctl -u ngu-api). Once a while of real use /api/csp-report (journalctl -u ngu-api). Once a while of real use
logs nothing unexpected, switch contentSecurityPolicyReportOnly to logs nothing unexpected, switch contentSecurityPolicyReportOnly to
contentSecurityPolicy. 'unsafe-inline' scripts cover the page's contentSecurityPolicy. 'unsafe-inline' scripts cover the page's
window.__NGU_SITE__ and the theme script in index.html. */ window.__SITE__ and the theme script in index.html. */
const EMBEDS = [ const EMBEDS = [
"https://www.youtube-nocookie.com", "https://www.youtube-nocookie.com",
"https://www.youtube.com", "https://www.youtube.com",

View file

@ -0,0 +1,10 @@
-- ═══════════════════════════════════════════════════════════════
-- 043 A POST'S TABLE OF CONTENTS
--
-- Blog posts → "Show contents": list the post's headings beside it
-- (a fold-out on phones), the one being read lit. Off unless an
-- editor turns it on, since a short post doesn't need one.
-- ═══════════════════════════════════════════════════════════════
ALTER TABLE blog_posts ADD COLUMN show_contents INTEGER NOT NULL DEFAULT 0
CHECK (show_contents IN (0, 1));

View file

@ -18,7 +18,7 @@
site_settings table, 035), where anything set wins and anything site_settings table, 035), where anything set wins and anything
blank falls back to site.json. siteFor(db) does the merge. The blank falls back to site.json. siteFor(db) does the merge. The
pages read the same merged values (renderPage writes them into pages read the same merged values (renderPage writes them into
the HTML as window.__NGU_SITE__, see src/lib/site.ts), so a the HTML as window.__SITE__, see src/lib/site.ts), so a
heading and its search title can't drift. heading and its search title can't drift.
The database: records' names, taglines, first paragraphs and The database: records' names, taglines, first paragraphs and
images. A blank site description falls back to the front page's images. A blank site description falls back to the front page's
@ -468,7 +468,7 @@ export function renderPage(html, meta) {
), ),
// Read by src/lib/site.ts before the app's module runs (a plain // Read by src/lib/site.ts before the app's module runs (a plain
// script in the head runs during parsing; modules wait). // script in the head runs during parsing; modules wait).
`<script>window.__NGU_SITE__ = ${scriptJson(forBrowser(site))}</script>`, `<script>window.__SITE__ = ${scriptJson(forBrowser(site))}</script>`,
site.themeCss && `<style id="site-colors">${site.themeCss}</style>`, site.themeCss && `<style id="site-colors">${site.themeCss}</style>`,
].filter(Boolean); ].filter(Boolean);

View file

@ -23,6 +23,8 @@ const NOTE_LIMIT = 2000;
/* ── GET /api/admin/feedback ───────────────────────────────────── /* ── GET /api/admin/feedback ─────────────────────────────────────
?status=new one of STATUSES, or omitted for all ?status=new one of STATUSES, or omitted for all
?kind=feedback website feedback (every type but 'privacy')
?kind=privacy data requests from the Privacy page
?type=broken feedback_type ?type=broken feedback_type
?q=retreat substring of the message ?q=retreat substring of the message
?before=41 cursor: rows with a lower id than this ?before=41 cursor: rows with a lower id than this
@ -31,11 +33,17 @@ const NOTE_LIMIT = 2000;
admin.get("/feedback", (c) => { admin.get("/feedback", (c) => {
const db = c.get("db"); const db = c.get("db");
const { status, type, q, before, limit } = c.req.query(); const { status, type, kind, q, before, limit } = c.req.query();
const where = []; const where = [];
const params = []; const params = [];
// Data requests and website feedback share the table but are two
// queues in the admin (Forms → Website feedback, Data requests).
const kindWhere =
kind === "privacy" ? "feedback_type = 'privacy'" : kind === "feedback" ? "feedback_type <> 'privacy'" : null;
if (kindWhere) where.push(kindWhere);
if (STATUSES.includes(status)) { if (STATUSES.includes(status)) {
where.push("status = ?"); where.push("status = ?");
params.push(status); params.push(status);
@ -69,19 +77,27 @@ admin.get("/feedback", (c) => {
const hasMore = rows.length > take; const hasMore = rows.length > take;
const page = hasMore ? rows.slice(0, take) : rows; const page = hasMore ? rows.slice(0, take) : rows;
// Counts are unfiltered on purpose: the tabs should show what's // Status counts cover this queue (kind) but ignore the other
// waiting overall, not what's left after the current filter. // filters: the tabs show what's waiting, not what's left after a
// search. newByKind is what's new in each queue, for the queue tabs.
const counts = Object.fromEntries(STATUSES.map((s) => [s, 0])); const counts = Object.fromEntries(STATUSES.map((s) => [s, 0]));
for (const row of db for (const row of db
.prepare("SELECT status, COUNT(*) AS n FROM feedback GROUP BY status") .prepare(`SELECT status, COUNT(*) AS n FROM feedback ${kindWhere ? `WHERE ${kindWhere}` : ""} GROUP BY status`)
.all()) { .all()) {
counts[row.status] = row.n; counts[row.status] = row.n;
} }
const newByKind = db
.prepare(
`SELECT SUM(feedback_type <> 'privacy') AS feedback, SUM(feedback_type = 'privacy') AS privacy
FROM feedback WHERE status = 'new'`,
)
.get();
return c.json( return c.json(
{ {
feedback: page, feedback: page,
counts, counts,
newByKind: { feedback: newByKind?.feedback ?? 0, privacy: newByKind?.privacy ?? 0 },
nextCursor: hasMore ? page[page.length - 1].id : null, nextCursor: hasMore ? page[page.length - 1].id : null,
}, },
200, 200,

View file

@ -138,7 +138,7 @@ auth.get("/me", (c) => {
// the redirect from Google, which is a top-level navigation. // the redirect from Google, which is a top-level navigation.
// __Host- (Secure, path /, no Domain) when over https, like the // __Host- (Secure, path /, no Domain) when over https, like the
// session cookie, so a sibling subdomain can't plant its own state. // session cookie, so a sibling subdomain can't plant its own state.
const OAUTH_COOKIE = SECURE_COOKIE ? "__Host-ngu_oauth" : "ngu_oauth"; const OAUTH_COOKIE = SECURE_COOKIE ? "__Host-site_oauth" : "site_oauth";
const OAUTH_COOKIE_OPTIONS = { const OAUTH_COOKIE_OPTIONS = {
httpOnly: true, httpOnly: true,
secure: SECURE_COOKIE, secure: SECURE_COOKIE,

View file

@ -99,6 +99,7 @@ blog.get("/blog/:id", (c) => {
excerpt: row.excerpt, excerpt: row.excerpt,
cover_image: row.cover_image, cover_image: row.cover_image,
cover_alt: row.cover_alt, cover_alt: row.cover_alt,
show_contents: row.show_contents === 1,
published_on: row.published_on, published_on: row.published_on,
tags: splitTags(row.tags), tags: splitTags(row.tags),
authors, authors,

View file

@ -462,6 +462,7 @@ tx(db, () => {
cover_image: IMAGE, cover_image: IMAGE,
published_on: db.prepare(`SELECT date('now') AS d`).get().d, published_on: db.prepare(`SELECT date('now') AS d`).get().d,
tags: "Test, Showcase", tags: "Test, Showcase",
show_contents: 1,
guest_author: "A Guest Author", guest_author: "A Guest Author",
guest_photo: IMAGE, guest_photo: IMAGE,
is_published: 1, is_published: 1,

View file

@ -25,7 +25,7 @@ import Home from "./pages/Home.tsx"
/* A page's chunk can be missing when a deploy replaced the build while /* A page's chunk can be missing when a deploy replaced the build while
this tab still ran the old one. Reload once to pick up the new this tab still ran the old one. Reload once to pick up the new
build; if that doesn't help, let the error surface. */ build; if that doesn't help, let the error surface. */
const CHUNK_RELOAD = "ngu-chunk-reload" const CHUNK_RELOAD = "site-chunk-reload"
const lazyPage = (load) => const lazyPage = (load) =>
lazy(() => lazy(() =>
load() load()
@ -128,6 +128,7 @@ export default function App() {
<Route path="panel" element={<AdminPanel />} /> <Route path="panel" element={<AdminPanel />} />
</Route> </Route>
<Route path="feedback" element={<AdminFeedback />} /> <Route path="feedback" element={<AdminFeedback />} />
<Route path="data-requests" element={<AdminFeedback kind="privacy" />} />
<Route path="media" element={<AdminMedia />} /> <Route path="media" element={<AdminMedia />} />
<Route element={<RequireRole role="admin" />}> <Route element={<RequireRole role="admin" />}>
<Route path="clips" element={<AdminClips />} /> <Route path="clips" element={<AdminClips />} />

View file

@ -5,7 +5,7 @@ import { SITE_BANNER } from "../data/bannerConfig.ts";
export default function Banner() { export default function Banner() {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const storageKey = `ngu-banner-dismissed:${SITE_BANNER.id}`; const storageKey = `site-banner-dismissed:${SITE_BANNER.id}`;
useEffect(() => { useEffect(() => {
if (!SITE_BANNER.enabled) return; if (!SITE_BANNER.enabled) return;

View file

@ -39,6 +39,7 @@ import { Anchor, Inline, Paragraphs } from './InlineText.tsx'
import VideoPlayer from './VideoPlayer.tsx' import VideoPlayer from './VideoPlayer.tsx'
import ScheduleBlock from './ScheduleBlock.tsx' import ScheduleBlock from './ScheduleBlock.tsx'
import { accentText, BRAND } from '../lib/color.ts' import { accentText, BRAND } from '../lib/color.ts'
import { headingAnchors } from '../lib/contents.ts'
const BODY = 'var(--color-muted)' const BODY = 'var(--color-muted)'
@ -52,11 +53,14 @@ export default function ContentBlocks({
className?: string className?: string
}) { }) {
if (!blocks?.length) return null if (!blocks?.length) return null
// Headings get ids so a post's contents (PostContents) and a shared
// link (#getting-there) can point at them.
const { idAt } = headingAnchors(blocks)
return ( return (
<div className={`space-y-6 ${className}`}> <div className={`space-y-6 ${className}`}>
{blocks.map((block, index) => ( {blocks.map((block, index) => (
<Block key={block.id ?? index} block={block} accent={accent} /> <Block key={block.id ?? index} block={block} accent={accent} anchor={idAt.get(index)} />
))} ))}
</div> </div>
) )
@ -71,20 +75,23 @@ function Caption({ text }: { text?: string | null }) {
) )
} }
function Block({ block, accent }: { block: ContentBlock; accent: string }) { // Clear of the fixed header when jumped to.
const ANCHOR_MARGIN = { scrollMarginTop: 'calc(var(--header-h, 5rem) + 1rem)' }
function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; anchor?: string }) {
const text = block.text ?? '' const text = block.text ?? ''
switch (block.type) { switch (block.type) {
case 'heading': case 'heading':
return ( return (
<h3 className="text-2xl font-bold" style={{ color: accentText(accent) }}> <h3 id={anchor} className="text-2xl font-bold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
{text} {text}
</h3> </h3>
) )
case 'subheading': case 'subheading':
return ( return (
<h4 className="text-lg font-semibold" style={{ color: accentText(accent) }}> <h4 id={anchor} className="text-lg font-semibold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
{text} {text}
</h4> </h4>
) )

View file

@ -1,6 +1,6 @@
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts"; import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
import nguLogo from "../assets/logos/NGU_Logo.svg"; import siteLogo from "../assets/logos/NGU_Logo.svg";
import PlatformIcon from "./PlatformIcon.tsx"; import PlatformIcon from "./PlatformIcon.tsx";
const Social_Links = [ const Social_Links = [
@ -59,7 +59,7 @@ export default function Footer() {
width below them. */} width below them. */}
<div className="md:col-span-9 text-center md:text-left"> <div className="md:col-span-9 text-center md:text-left">
<Link to="/" className="inline-block"> <Link to="/" className="inline-block">
<img src={nguLogo} alt="Next Generation of Unity" className="h-14 w-auto" /> <img src={siteLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
</Link> </Link>
<address className="mt-5 not-italic text-sm leading-relaxed text-white/60"> <address className="mt-5 not-italic text-sm leading-relaxed text-white/60">

View file

@ -3,7 +3,7 @@ import { Suspense, useState, useEffect, useRef } from "react";
import { NavLink, Link, Outlet, useLocation } from "react-router-dom"; import { NavLink, Link, Outlet, useLocation } from "react-router-dom";
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts"; import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
import Banner from "./Banner.tsx"; import Banner from "./Banner.tsx";
import nguLogo from "../assets/logos/NGU_Logo.svg"; import siteLogo from "../assets/logos/NGU_Logo.svg";
import Footer from "./Footer.tsx"; import Footer from "./Footer.tsx";
import PrivacyNotice from "./PrivacyNotice.tsx"; import PrivacyNotice from "./PrivacyNotice.tsx";
import ThemeToggle from "./ThemeToggle.tsx"; import ThemeToggle from "./ThemeToggle.tsx";
@ -187,7 +187,7 @@ export default function Layout() {
> >
<div className="flex items-center gap-8"> <div className="flex items-center gap-8">
<Link to="/" aria-label="Next Generation of Unity home" className="inline-block"> <Link to="/" aria-label="Next Generation of Unity home" className="inline-block">
<img src={nguLogo} alt="Next Generation of Unity" className="h-10 w-auto" /> <img src={siteLogo} alt="Next Generation of Unity" className="h-10 w-auto" />
</Link> </Link>
<div className="hidden lg:flex items-center gap-6"> <div className="hidden lg:flex items-center gap-6">

View file

@ -0,0 +1,93 @@
/* ═══════════════════════════════════════════════════════════════
POST CONTENTS
A post's table of contents, from its headings (lib/contents.ts).
On a wide screen it's a sticky column beside the post, the
heading you're reading lit; below lg it's a fold-out at the top.
Which heading is lit comes from an IntersectionObserver, not a
scroll listener: the last heading to cross the band just under
the fixed header.
═══════════════════════════════════════════════════════════════ */
import { useEffect, useState } from 'react'
import type { ContentsEntry } from '../lib/contents.ts'
import { scrollBehavior } from '../lib/motion.ts'
function useLit(entries: ContentsEntry[]) {
const [lit, setLit] = useState<string | null>(entries[0]?.id ?? null)
const ids = entries.map((entry) => entry.id).join('|')
useEffect(() => {
const els = ids
.split('|')
.map((id) => document.getElementById(id))
.filter((el): el is HTMLElement => Boolean(el))
if (els.length === 0) return
// The band: from just under the header to 60% up the screen.
const header = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--header-h')) || 80
const observer = new IntersectionObserver(
(records) => {
const crossing = records.filter((r) => r.isIntersecting).map((r) => r.target.id)
if (crossing.length) setLit(crossing[0])
},
{ rootMargin: `-${header + 16}px 0px -60% 0px` },
)
els.forEach((el) => observer.observe(el))
return () => observer.disconnect()
}, [ids])
return lit
}
function jump(event: React.MouseEvent<HTMLAnchorElement>, id: string) {
event.preventDefault()
document.getElementById(id)?.scrollIntoView({ behavior: scrollBehavior(), block: 'start' })
history.replaceState(null, '', `#${id}`)
}
function List({ entries, lit }: { entries: ContentsEntry[]; lit: string | null }) {
return (
<ol className="space-y-1 text-sm">
{entries.map((entry) => (
<li key={entry.id} className={entry.level === 2 ? 'pl-4' : ''}>
<a
href={`#${entry.id}`}
onClick={(event) => jump(event, entry.id)}
aria-current={entry.id === lit ? 'location' : undefined}
className={
'block rounded-lg border-l-2 px-3 py-1.5 transition-colors ' +
(entry.id === lit
? 'border-link bg-tint font-semibold text-link'
: 'border-transparent text-muted hover:text-link')
}
>
{entry.text}
</a>
</li>
))}
</ol>
)
}
export default function PostContents({ entries }: { entries: ContentsEntry[] }) {
const lit = useLit(entries)
return (
<>
<details className="rounded-2xl border border-brand/20 bg-tint-soft p-4 lg:hidden">
<summary className="cursor-pointer font-semibold text-ink">On this page</summary>
<div className="mt-3">
<List entries={entries} lit={lit} />
</div>
</details>
<nav
aria-label="On this page"
className="sticky hidden self-start lg:block"
style={{ top: 'calc(var(--header-h, 5rem) + 1.5rem)' }}
>
<p className="mb-2 px-3 text-sm font-semibold text-ink">On this page</p>
<List entries={entries} lit={lit} />
</nav>
</>
)
}

View file

@ -16,7 +16,7 @@
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
const STORAGE_KEY = 'ngu-privacy-notice-closed' const STORAGE_KEY = 'site-privacy-notice-closed'
export default function PrivacyNotice() { export default function PrivacyNotice() {
const [visible, setVisible] = useState(false) const [visible, setVisible] = useState(false)

View file

@ -15,7 +15,7 @@ import { useEffect, useState } from 'react'
type Theme = 'light' | 'dark' type Theme = 'light' | 'dark'
export const THEME_STORAGE_KEY = 'ngu-theme' export const THEME_STORAGE_KEY = 'site-theme'
const current = (): Theme => const current = (): Theme =>
document.documentElement.dataset.theme === 'dark' ? 'dark' : 'light' document.documentElement.dataset.theme === 'dark' ? 'dark' : 'light'

View file

@ -188,13 +188,13 @@ iframe[src*="churchcenter"] {
gap: 0.25rem 1.5rem; gap: 0.25rem 1.5rem;
grid-template-columns: 2fr 1fr; grid-template-columns: 2fr 1fr;
grid-template-areas: grid-template-areas:
"ngu image" "org image"
"info image" "info image"
"desc desc"; "desc desc";
} }
.ev-ngu { .ev-org {
grid-area: ngu; grid-area: org;
} }
.ev-info { .ev-info {
@ -217,7 +217,7 @@ iframe[src*="churchcenter"] {
.ev-grid { .ev-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-areas: grid-template-areas:
"ngu" "org"
"info" "info"
"desc"; "desc";
} }

View file

@ -53,6 +53,12 @@ export const blogPosts = {
help: "A sentence or two for the card. Default: the body's first paragraph.", help: "A sentence or two for the card. Default: the body's first paragraph.",
}, },
{ path: "cover_image", label: "Cover image", widget: "image", resolve: mediaUrl, full: true }, { path: "cover_image", label: "Cover image", widget: "image", resolve: mediaUrl, full: true },
{
path: "show_contents",
label: "Show contents",
widget: "checkbox",
help: "Lists the post's headings beside it, the one being read lit (a fold-out on phones). Worth it for a long post with two or more headings.",
},
{ {
path: "cover_alt", path: "cover_alt",
label: "Cover description", label: "Cover description",

48
src/lib/contents.ts Normal file
View file

@ -0,0 +1,48 @@
/* ═══════════════════════════════════════════════════════════════
CONTENTS
The headings in a list of content blocks, with the anchor id each
one gets: ContentBlocks puts the ids on the headings, and
PostContents lists them. Both call headingAnchors on the same
blocks, so the links always match.
An id is the heading's text as a slug ("Getting there" →
"getting-there"); a repeat gets -2, -3.
═══════════════════════════════════════════════════════════════ */
import type { ContentBlock } from './useContent.ts'
export type ContentsEntry = { id: string; text: string; level: 1 | 2 }
const slug = (text: string) =>
text
.toLowerCase()
.normalize('NFKD')
.replace(/[^\w\s-]/g, '')
.trim()
.replace(/[\s_]+/g, '-')
.replace(/-+/g, '-')
.slice(0, 60) || 'section'
/* One entry per heading or subheading block, in order, and the id
for each block index that is one. */
export function headingAnchors(blocks?: ContentBlock[] | null): {
entries: ContentsEntry[]
idAt: Map<number, string>
} {
const entries: ContentsEntry[] = []
const idAt = new Map<number, string>()
const seen = new Map<string, number>()
;(blocks ?? []).forEach((block, index) => {
if (block.type !== 'heading' && block.type !== 'subheading') return
const text = (block.text ?? '').trim()
if (!text) return
const base = slug(text)
const n = (seen.get(base) ?? 0) + 1
seen.set(base, n)
const id = n === 1 ? base : `${base}-${n}`
idAt.set(index, id)
entries.push({ id, text, level: block.type === 'heading' ? 1 : 2 })
})
return { entries, idAt }
}

View file

@ -4,7 +4,7 @@
What the site says about itself, for the browser: /site.json, with What the site says about itself, for the browser: /site.json, with
the admin's Site settings (Panel) laid over it. The server merges the admin's Site settings (Panel) laid over it. The server merges
the two and writes the result into each page's HTML as the two and writes the result into each page's HTML as
window.__NGU_SITE__ (server/src/pageMeta.js), which is read here window.__SITE__ (server/src/pageMeta.js), which is read here
before the app renders, so there's no request and no flash of the before the app renders, so there's no request and no flash of the
old wording. In development, or if the API is down and nginx old wording. In development, or if the API is down and nginx
serves the plain index.html, it isn't there and site.json alone serves the plain index.html, it isn't there and site.json alone
@ -28,7 +28,7 @@ type SiteText = { title?: string; pages?: Record<string, PageText>; privacyEmail
/* What the server wrote into the page, if it did. */ /* What the server wrote into the page, if it did. */
const fromServer: SiteText = const fromServer: SiteText =
(typeof window !== 'undefined' && (window as unknown as { __NGU_SITE__?: SiteText }).__NGU_SITE__) || {} (typeof window !== 'undefined' && (window as unknown as { __SITE__?: SiteText }).__SITE__) || {}
export const SITE_NAME: string = fromServer.title || siteConfiguration.title export const SITE_NAME: string = fromServer.title || siteConfiguration.title

View file

@ -25,6 +25,8 @@ export type BlogPostRecord = {
excerpt?: string | null excerpt?: string | null
cover_image?: string | null cover_image?: string | null
cover_alt?: string | null cover_alt?: string | null
/** List the post's headings beside it. */
show_contents?: boolean
published_on?: string | null published_on?: string | null
tags: string[] tags: string[]
authors: BlogAuthor[] authors: BlogAuthor[]

View file

@ -10,20 +10,22 @@
section is where posts are listed, so "back" goes there. section is where posts are listed, so "back" goes there.
═══════════════════════════════════════════════════════════════ */ ═══════════════════════════════════════════════════════════════ */
import { Link, useParams } from 'react-router-dom' import { Link, useParams } from "react-router-dom"
import PageShell, { type ShellSection } from '../components/PageShell.tsx' import PageShell, { type ShellSection } from "../components/PageShell.tsx"
import PageState from '../components/PageState.tsx' import PageState from "../components/PageState.tsx"
import ContentBlocks from '../components/ContentBlocks.tsx' import ContentBlocks from "../components/ContentBlocks.tsx"
import PeopleTiles from '../components/PeopleTiles.tsx' import PeopleTiles from "../components/PeopleTiles.tsx"
import { mediaUrl } from '../lib/media.ts' import { mediaUrl } from "../lib/media.ts"
import { postDate, useBlogPost } from '../lib/useBlog.ts' import { postDate, useBlogPost } from "../lib/useBlog.ts"
import { accentText, BRAND } from '../lib/color.ts' import { accentText, BRAND } from "../lib/color.ts"
import PostContents from "../components/PostContents.tsx"
import { headingAnchors } from "../lib/contents.ts"
const BODY = 'var(--color-muted)' const BODY = "var(--color-muted)"
/* Where "back" goes: the section on the Community page. */ /* Where "back" goes: the section on the Community page. */
const BACK = { to: '/community#blog', label: 'Community Blog' } const BACK = { to: "/community#blog", label: "Community Blog" }
export default function BlogPost() { export default function BlogPost() {
const { id } = useParams() const { id } = useParams()
@ -43,12 +45,16 @@ export default function BlogPost() {
) )
} }
// Two headings or more make a list worth showing.
const contents = post.show_contents ? headingAnchors(post.blocks).entries : []
const withContents = contents.length >= 2
const date = postDate(post.published_on) const date = postDate(post.published_on)
const cover = mediaUrl(post.cover_image) const cover = mediaUrl(post.cover_image)
const byline = [ const byline = [
...post.authors.map((author) => author.name), ...post.authors.map((author) => author.name),
...(post.guest ? [post.guest.name] : []), ...(post.guest ? [post.guest.name] : []),
].join(', ') ].join(", ")
const authors = [ const authors = [
...post.authors.map((author) => ({ ...post.authors.map((author) => ({
@ -58,50 +64,89 @@ export default function BlogPost() {
pronouns: author.pronouns, pronouns: author.pronouns,
photo: mediaUrl(author.photo), photo: mediaUrl(author.photo),
})), })),
...(post.guest ? [{ name: post.guest.name, title: 'Guest author', photo: mediaUrl(post.guest.photo) }] : []), ...(post.guest
? [
{
name: post.guest.name,
title: "Guest author",
photo: mediaUrl(post.guest.photo),
},
]
: []),
] ]
const sections: ShellSection[] = [ const sections: ShellSection[] = [
{ {
id: 'post', id: "post",
title: 'Post', title: "Post",
accent: BRAND, accent: BRAND,
background: 'var(--color-surface)', background: "var(--color-surface)",
content: ( content: (
<article className="mx-auto max-w-3xl space-y-8 px-6"> <div
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm" style={{ color: BODY }}> className={
{date && <time dateTime={post.published_on ?? undefined}>{date}</time>} withContents
? "mx-auto grid max-w-6xl gap-8 px-6 lg:grid-cols-[14rem_minmax(0,1fr)] lg:gap-12"
: "contents"
}
>
{withContents && <PostContents entries={contents} />}
<article
className={
withContents
? "min-w-0 max-w-3xl space-y-8"
: "mx-auto max-w-3xl space-y-8 px-6"
}
>
<div
className="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm"
style={{ color: BODY }}
>
{date && (
<time dateTime={post.published_on ?? undefined}>{date}</time>
)}
{byline && <span>By {byline}</span>} {byline && <span>By {byline}</span>}
{post.tags.map((tag) => ( {post.tags.map((tag) => (
<span <span
key={tag} key={tag}
className="rounded-full px-3 py-0.5 text-xs font-semibold" className="rounded-full px-3 py-0.5 text-xs font-semibold"
style={{ background: 'var(--color-tint)', color: accentText(BRAND) }} style={{
background: "var(--color-tint)",
color: accentText(BRAND),
}}
> >
{tag} {tag}
</span> </span>
))} ))}
<Link to={BACK.to} className="ml-auto hover:underline" style={{ color: accentText(BRAND) }}> <Link
to={BACK.to}
className="ml-auto hover:underline"
style={{ color: accentText(BRAND) }}
>
{BACK.label} {BACK.label}
</Link> </Link>
</div> </div>
{cover && ( {cover && (
<img src={cover} alt={post.cover_alt ?? ""} className="aspect-video w-full rounded-2xl object-cover" /> <img
src={cover}
alt={post.cover_alt ?? ""}
className="aspect-video w-full rounded-2xl object-cover"
/>
)} )}
<ContentBlocks blocks={post.blocks} accent={BRAND} /> <ContentBlocks blocks={post.blocks} accent={BRAND} />
</article> </article>
</div>
), ),
}, },
] ]
if (authors.length > 0) { if (authors.length > 0) {
sections.push({ sections.push({
id: 'authors', id: "authors",
title: authors.length === 1 ? 'About the author' : 'About the authors', title: authors.length === 1 ? "About the author" : "About the authors",
accent: BRAND, accent: BRAND,
background: 'var(--color-tint)', background: "var(--color-tint)",
content: ( content: (
<div className="mx-auto max-w-6xl px-6"> <div className="mx-auto max-w-6xl px-6">
<PeopleTiles size="md" accent={BRAND} people={authors} /> <PeopleTiles size="md" accent={BRAND} people={authors} />
@ -110,5 +155,11 @@ export default function BlogPost() {
}) })
} }
return <PageShell title={post.title} intro={post.excerpt ?? undefined} sections={sections} /> return (
<PageShell
title={post.title}
intro={post.excerpt ?? undefined}
sections={sections}
/>
)
} }

View file

@ -21,7 +21,7 @@ const PAGE = sitePage("/privacy");
The contact address is Panel → Site settings → Privacy contact The contact address is Panel → Site settings → Privacy contact
email. Requests from the form below are feedback rows of type email. Requests from the form below are feedback rows of type
'privacy', in Admin → Feedback. 'privacy', in Admin → Forms → Data requests.
═══════════════════════════════════════════════════════════════ */ ═══════════════════════════════════════════════════════════════ */
const LAST_UPDATED = "September 28, 2026"; const LAST_UPDATED = "September 28, 2026";

View file

@ -18,7 +18,7 @@
═══════════════════════════════════════════════════════════════ */ ═══════════════════════════════════════════════════════════════ */
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import { useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { del, get, patch, ApiError } from "../../lib/api.ts"; import { del, get, patch, ApiError } from "../../lib/api.ts";
import { isUnauthorized, useAuth } from "../../lib/auth.tsx"; import { isUnauthorized, useAuth } from "../../lib/auth.tsx";
@ -225,9 +225,25 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
/* ── The page ────────────────────────────────────────────────── */ /* ── The page ────────────────────────────────────────────────── */
export default function AdminFeedback() { /* The two queues this page shows: the website feedback form, and
data requests from the Privacy page. Same table, same triage. */
const QUEUES = {
feedback: {
to: "/admin/feedback",
title: "Website feedback",
blurb: "Everything submitted through the site's feedback form.",
},
privacy: {
to: "/admin/data-requests",
title: "Data requests",
blurb: "Requests to see, correct or delete someone's information, from the Privacy page. Each has an email to answer.",
},
} as const;
export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof typeof QUEUES }) {
const { user } = useAuth(); const { user } = useAuth();
const navigate = useNavigate(); const navigate = useNavigate();
const queue = QUEUES[kind];
const [status, setStatus] = useState("new"); const [status, setStatus] = useState("new");
const [query, setQuery] = useState(""); const [query, setQuery] = useState("");
@ -235,6 +251,7 @@ export default function AdminFeedback() {
const [rows, setRows] = useState<any[]>([]); const [rows, setRows] = useState<any[]>([]);
const [counts, setCounts] = useState<any>({}); const [counts, setCounts] = useState<any>({});
const [newByKind, setNewByKind] = useState<any>({});
const [cursor, setCursor] = useState<any>(null); const [cursor, setCursor] = useState<any>(null);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [error, setError] = useState<any>(null); const [error, setError] = useState<any>(null);
@ -249,6 +266,7 @@ export default function AdminFeedback() {
setError(null); setError(null);
const params = new URLSearchParams(); const params = new URLSearchParams();
params.set("kind", kind);
if (status !== "all") params.set("status", status); if (status !== "all") params.set("status", status);
if (search) params.set("q", search); if (search) params.set("q", search);
if (before) params.set("before", String(before)); if (before) params.set("before", String(before));
@ -257,6 +275,7 @@ export default function AdminFeedback() {
const data = await get(`/admin/feedback?${params}`, { ttl: 0 }); const data = await get(`/admin/feedback?${params}`, { ttl: 0 });
setRows((prev) => (before ? [...prev, ...data.feedback] : data.feedback)); setRows((prev) => (before ? [...prev, ...data.feedback] : data.feedback));
setCounts(data.counts); setCounts(data.counts);
setNewByKind(data.newByKind ?? {});
setCursor(data.nextCursor); setCursor(data.nextCursor);
} catch (err) { } catch (err) {
if (isUnauthorized(err)) { if (isUnauthorized(err)) {
@ -271,7 +290,7 @@ export default function AdminFeedback() {
setLoading(false); setLoading(false);
} }
}, },
[status, search, navigate], [kind, status, search, navigate],
); );
useEffect(() => { useEffect(() => {
@ -306,11 +325,27 @@ export default function AdminFeedback() {
return ( return (
<div> <div>
<h1 className="text-3xl font-bold text-link">Feedback</h1> {/* The two queues, each with what's new in it. */}
<nav aria-label="Forms" className="mb-6 flex gap-1 border-b border-brand/15">
{Object.entries(QUEUES).map(([id, q]) => (
<Link
key={id}
to={q.to}
aria-current={id === kind ? "page" : undefined}
className={
"-mb-px border-b-2 px-4 py-2 text-sm font-semibold transition-colors " +
(id === kind ? "border-link text-link" : "border-transparent text-muted hover:text-link")
}
>
{q.title}
{newByKind[id] ? ` (${newByKind[id]} new)` : ""}
</Link>
))}
</nav>
<h1 className="text-3xl font-bold text-link">{queue.title}</h1>
<p className="mt-2 text-sm text-muted"> <p className="mt-2 text-sm text-muted">
{canWrite {canWrite ? queue.blurb : "Read-only: your account can't change statuses or notes."}
? "Everything submitted through the site form."
: "Read-only: your account can't change statuses or notes."}
</p> </p>
{/* Filters */} {/* Filters */}

View file

@ -27,7 +27,7 @@ import { AdminTitleContext } from "../../lib/adminTitle.tsx";
import { AdminWidthContext } from "../../lib/adminWidth.tsx"; import { AdminWidthContext } from "../../lib/adminWidth.tsx";
import { SITE_VERSION } from "../../lib/version.ts"; import { SITE_VERSION } from "../../lib/version.ts";
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts"; import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
import nguLogo from "../../assets/logos/NGU_Logo.svg"; import siteLogo from "../../assets/logos/NGU_Logo.svg";
import ThemeToggle from "../../components/ThemeToggle.tsx"; import ThemeToggle from "../../components/ThemeToggle.tsx";
import { import {
ADMIN_HOME, ADMIN_HOME,
@ -220,7 +220,7 @@ export default function AdminLayout() {
<footer className="border-t border-brand/15 bg-surface"> <footer className="border-t border-brand/15 bg-surface">
<div className="mx-auto flex max-w-5xl items-center gap-4 px-6 py-3"> <div className="mx-auto flex max-w-5xl items-center gap-4 px-6 py-3">
<Link to={ADMIN_HOME} className="transition-opacity hover:opacity-70"> <Link to={ADMIN_HOME} className="transition-opacity hover:opacity-70">
<img src={nguLogo} alt="NGU" className="h-6 w-auto" /> <img src={siteLogo} alt="NGU" className="h-6 w-auto" />
</Link> </Link>
<span className="ml-auto font-mono text-xs text-muted/70"> <span className="ml-auto font-mono text-xs text-muted/70">
{SITE_VERSION} {SITE_VERSION}

View file

@ -118,6 +118,11 @@ export const FORMS_NAV = {
label: "Website feedback", label: "Website feedback",
blurb: "The triage queue for the feedback form.", blurb: "The triage queue for the feedback form.",
}, },
{
to: "/admin/data-requests",
label: "Data requests",
blurb: "Requests to see, correct or delete someone's information, from the Privacy page.",
},
], ],
}; };

View file

@ -194,7 +194,7 @@ export function Card({
{compact ? ( {compact ? (
/* ── GRID CARD: layout driven by .ev-grid container queries ── */ /* ── GRID CARD: layout driven by .ev-grid container queries ── */
<div className="ev-grid mb-2"> <div className="ev-grid mb-2">
<Logo src={orgLogo} className="ev-ngu h-11 w-auto mb-4" /> <Logo src={orgLogo} className="ev-org h-11 w-auto mb-4" />
<div className="ev-info"> <div className="ev-info">
{typeBadge} {typeBadge}
<h3 className="text-3xl font-extrabold leading-tight"> <h3 className="text-3xl font-extrabold leading-tight">

View file

@ -209,7 +209,7 @@ function fileStem(target: string): string {
/* a site path */ /* a site path */
} }
const stem = name.replace(/^\//, '').replace(/[^a-z0-9]+/gi, '-').replace(/^-|-$/g, '') const stem = name.replace(/^\//, '').replace(/[^a-z0-9]+/gi, '-').replace(/^-|-$/g, '')
return `ngu-qr-${stem || 'home'}` return `qr-${stem || 'home'}`
} }
function download(href: string, filename: string) { function download(href: string, filename: string) {

View file

@ -99,8 +99,8 @@ export default function HistoryTimeline({
if (grouped.length === 0 && upcomingYears.length === 0) { if (grouped.length === 0 && upcomingYears.length === 0) {
return ( return (
<div className="ngu-tl"> <div className="site-tl">
<p className="ngu-tl__emptyState"> <p className="site-tl__emptyState">
The timeline is empty. Add a milestone to start the record. The timeline is empty. Add a milestone to start the record.
</p> </p>
</div> </div>
@ -108,11 +108,11 @@ export default function HistoryTimeline({
} }
return ( return (
<div className="ngu-tl"> <div className="site-tl">
<div className="ngu-tl__toolbar"> <div className="site-tl__toolbar">
<button <button
type="button" type="button"
className="ngu-tl__toolbarBtn" className="site-tl__toolbarBtn"
onClick={() => commit(allOpen ? new Set() : new Set(allYears))} onClick={() => commit(allOpen ? new Set() : new Set(allYears))}
> >
{allOpen ? 'Collapse all years' : 'Expand all years'} {allOpen ? 'Collapse all years' : 'Expand all years'}

View file

@ -26,24 +26,24 @@ export default function TimelineDecade({
return ( return (
<section <section
className={`ngu-tl__decade${decade.preProgram ? ' ngu-tl__decade--pre' : ''}`} className={`site-tl__decade${decade.preProgram ? ' site-tl__decade--pre' : ''}`}
aria-labelledby={`ngu-tl-decade-${decade.decade}`} aria-labelledby={`site-tl-decade-${decade.decade}`}
> >
<header className="ngu-tl__decadeHead"> <header className="site-tl__decadeHead">
<span className="ngu-tl__decadeNum" aria-hidden="true"> <span className="site-tl__decadeNum" aria-hidden="true">
{decadeLabel(decade.decade)} {decadeLabel(decade.decade)}
</span> </span>
<div> <div>
<h3 className="ngu-tl__decadeTitle" id={`ngu-tl-decade-${decade.decade}`}> <h3 className="site-tl__decadeTitle" id={`site-tl-decade-${decade.decade}`}>
<span className="ngu-tl__srOnly">{decadeLabel(decade.decade)}: </span> <span className="site-tl__srOnly">{decadeLabel(decade.decade)}: </span>
{decade.title} {decade.title}
</h3> </h3>
{decade.tagline ? ( {decade.tagline ? (
<p className="ngu-tl__decadeTagline">{decade.tagline}</p> <p className="site-tl__decadeTagline">{decade.tagline}</p>
) : null} ) : null}
{decade.blurb ? <p className="ngu-tl__decadeBlurb">{decade.blurb}</p> : null} {decade.blurb ? <p className="site-tl__decadeBlurb">{decade.blurb}</p> : null}
{decade.preProgram ? ( {decade.preProgram ? (
<p className="ngu-tl__gapNote"> <p className="site-tl__gapNote">
<span aria-hidden="true">◌</span> <span aria-hidden="true">◌</span>
Before the program, kept for context, not part of our record Before the program, kept for context, not part of our record
</p> </p>

View file

@ -31,18 +31,18 @@ function fullMarker(item: TimelineItem): string {
function PersonChip({ person }: { person: PersonRef }) { function PersonChip({ person }: { person: PersonRef }) {
const img = useSmallImage(mediaUrl(person.photo)) const img = useSmallImage(mediaUrl(person.photo))
return ( return (
<li className="ngu-tl__person"> <li className="site-tl__person">
{!img.failed ? ( {!img.failed ? (
<img className="ngu-tl__personPhoto" src={img.src} alt="" loading="lazy" onError={img.onError} /> <img className="site-tl__personPhoto" src={img.src} alt="" loading="lazy" onError={img.onError} />
) : ( ) : (
<span className="ngu-tl__personPhoto ngu-tl__personPhoto--blank" aria-hidden="true"> <span className="site-tl__personPhoto site-tl__personPhoto--blank" aria-hidden="true">
{initials(person.name)} {initials(person.name)}
</span> </span>
)} )}
<span className="ngu-tl__personName"> <span className="site-tl__personName">
{person.name} {person.name}
{person.title ? ( {person.title ? (
<span className="ngu-tl__personTitle">{person.title}</span> <span className="site-tl__personTitle">{person.title}</span>
) : null} ) : null}
</span> </span>
</li> </li>
@ -61,34 +61,34 @@ export default function TimelineEntry({ item, variant = 'inline' }: Props) {
const logo = logoSrc(item) const logo = logoSrc(item)
const className = [ const className = [
'ngu-tl__entry', 'site-tl__entry',
featured ? 'ngu-tl__entry--featured' : '', featured ? 'site-tl__entry--featured' : '',
href ? 'ngu-tl__entry--linked' : '', href ? 'site-tl__entry--linked' : '',
] ]
.filter(Boolean) .filter(Boolean)
.join(' ') .join(' ')
const marker = ( const marker = (
<span className="ngu-tl__entryDay"> <span className="site-tl__entryDay">
{featured ? fullMarker(item) : dayMarker(item)} {featured ? fullMarker(item) : dayMarker(item)}
</span> </span>
) )
const body = ( const body = (
<span className="ngu-tl__entryBody"> <span className="site-tl__entryBody">
<span className="ngu-tl__entryTitle"> <span className="site-tl__entryTitle">
{logo ? ( {logo ? (
<img className="ngu-tl__logo" src={logo} alt="" loading="lazy" /> <img className="site-tl__logo logo-plate" src={logo} alt="" loading="lazy" />
) : ( ) : (
<span <span
className={`ngu-tl__kind ngu-tl__kind--${item.kind}`} className={`site-tl__kind site-tl__kind--${item.kind}`}
aria-hidden="true" aria-hidden="true"
/> />
)} )}
{item.title} {item.title}
</span> </span>
{item.meta ? <span className="ngu-tl__entryMeta">{item.meta}</span> : null} {item.meta ? <span className="site-tl__entryMeta">{item.meta}</span> : null}
{item.blurb ? <p className="ngu-tl__entryBlurb">{item.blurb}</p> : null} {item.blurb ? <p className="site-tl__entryBlurb">{item.blurb}</p> : null}
</span> </span>
) )
@ -97,15 +97,15 @@ export default function TimelineEntry({ item, variant = 'inline' }: Props) {
const roster = const roster =
item.kind === 'people' && item.people && item.people.length > 0 ? ( item.kind === 'people' && item.people && item.people.length > 0 ? (
<div <div
className={`ngu-tl__roster${featured ? ' ngu-tl__roster--featured' : ''}`} className={`site-tl__roster${featured ? ' site-tl__roster--featured' : ''}`}
> >
{item.team ? ( {item.team ? (
<span className="ngu-tl__rosterTeam"> <span className="site-tl__rosterTeam">
{item.team.name} {item.team.name}
{item.team.orgName ? ` · ${item.team.orgName}` : ''} {item.team.orgName ? ` · ${item.team.orgName}` : ''}
</span> </span>
) : null} ) : null}
<ul className="ngu-tl__people"> <ul className="site-tl__people">
{item.people.map((person) => ( {item.people.map((person) => (
<PersonChip key={person.id} person={person} /> <PersonChip key={person.id} person={person} />
))} ))}
@ -118,7 +118,7 @@ export default function TimelineEntry({ item, variant = 'inline' }: Props) {
const external = !!href && /^(https?:)?\/\//.test(href) const external = !!href && /^(https?:)?\/\//.test(href)
return ( return (
<li className="ngu-tl__entryWrap"> <li className="site-tl__entryWrap">
{href && external ? ( {href && external ? (
<a <a
href={href} href={href}

View file

@ -32,28 +32,28 @@ export default function TimelineUpcoming({
return ( return (
<section <section
className={`ngu-tl__upcoming${open ? ' ngu-tl__upcoming--open' : ''}`} className={`site-tl__upcoming${open ? ' site-tl__upcoming--open' : ''}`}
aria-label="Upcoming" aria-label="Upcoming"
> >
<button <button
type="button" type="button"
className="ngu-tl__upcomingBtn" className="site-tl__upcomingBtn"
aria-expanded={open} aria-expanded={open}
onClick={() => setOpen((v) => !v)} onClick={() => setOpen((v) => !v)}
> >
<span className="ngu-tl__upcomingDot" aria-hidden="true" /> <span className="site-tl__upcomingDot" aria-hidden="true" />
<span className="ngu-tl__upcomingLabel"> <span className="site-tl__upcomingLabel">
{open {open
? 'Hide what’s scheduled' ? 'Hide what’s scheduled'
: `${count} ${count === 1 ? 'thing' : 'things'} still to come`} : `${count} ${count === 1 ? 'thing' : 'things'} still to come`}
</span> </span>
<span className="ngu-tl__chevron" aria-hidden="true"> <span className="site-tl__chevron" aria-hidden="true">
{open ? '▾' : '▴'} {open ? '▾' : '▴'}
</span> </span>
</button> </button>
{open ? ( {open ? (
<div className="ngu-tl__upcomingList"> <div className="site-tl__upcomingList">
{years.map((year) => ( {years.map((year) => (
<TimelineYear <TimelineYear
key={year.year} key={year.year}

View file

@ -15,13 +15,13 @@ type Props = {
export default function TimelineYear({ year, open, onToggle }: Props) { export default function TimelineYear({ year, open, onToggle }: Props) {
const empty = year.count === 0 const empty = year.count === 0
const panelId = `ngu-tl-year-${year.year}` const panelId = `site-tl-year-${year.year}`
const className = [ const className = [
'ngu-tl__year', 'site-tl__year',
year.featured ? 'ngu-tl__year--featured' : '', year.featured ? 'site-tl__year--featured' : '',
open ? 'ngu-tl__year--open' : '', open ? 'site-tl__year--open' : '',
empty ? 'ngu-tl__year--empty' : '', empty ? 'site-tl__year--empty' : '',
] ]
.filter(Boolean) .filter(Boolean)
.join(' ') .join(' ')
@ -30,31 +30,31 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
<div className={className}> <div className={className}>
<button <button
type="button" type="button"
className="ngu-tl__yearBtn" className="site-tl__yearBtn"
aria-expanded={open} aria-expanded={open}
aria-controls={panelId} aria-controls={panelId}
onClick={() => onToggle(year.year)} onClick={() => onToggle(year.year)}
> >
<span <span
className="ngu-tl__dot" className="site-tl__dot"
style={{ '--tl-dot': dotSize(year.count) } as CSSProperties} style={{ '--tl-dot': dotSize(year.count) } as CSSProperties}
aria-hidden="true" aria-hidden="true"
/> />
<span className="ngu-tl__yearLabel">{year.year}</span> <span className="site-tl__yearLabel">{year.year}</span>
<span className="ngu-tl__yearCount"> <span className="site-tl__yearCount">
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`} {empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
</span> </span>
</button> </button>
{open ? ( {open ? (
empty ? ( empty ? (
<div className="ngu-tl__empty" id={panelId}> <div className="site-tl__empty" id={panelId}>
Nothing recorded for {year.year} yet. Nothing recorded for {year.year} yet.
</div> </div>
) : ( ) : (
<div className="ngu-tl__panel" id={panelId}> <div className="site-tl__panel" id={panelId}>
{year.featuredItems.length > 0 ? ( {year.featuredItems.length > 0 ? (
<ul className="ngu-tl__featured ngu-tl__list"> <ul className="site-tl__featured site-tl__list">
{year.featuredItems.map((item) => ( {year.featuredItems.map((item) => (
<TimelineEntry key={item.id} item={item} variant="featured" /> <TimelineEntry key={item.id} item={item} variant="featured" />
))} ))}
@ -62,9 +62,9 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
) : null} ) : null}
{year.months.map((month) => ( {year.months.map((month) => (
<section className="ngu-tl__month" key={month.month}> <section className="site-tl__month" key={month.month}>
<h4 className="ngu-tl__monthLabel">{month.label}</h4> <h4 className="site-tl__monthLabel">{month.label}</h4>
<ul className="ngu-tl__list"> <ul className="site-tl__list">
{month.items.map((item) => ( {month.items.map((item) => (
<TimelineEntry key={item.id} item={item} /> <TimelineEntry key={item.id} item={item} />
))} ))}
@ -73,9 +73,9 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
))} ))}
{year.undated.length > 0 ? ( {year.undated.length > 0 ? (
<section className="ngu-tl__month ngu-tl__undated"> <section className="site-tl__month site-tl__undated">
<h4 className="ngu-tl__monthLabel">Elsewhere in {year.year}</h4> <h4 className="site-tl__monthLabel">Elsewhere in {year.year}</h4>
<ul className="ngu-tl__list"> <ul className="site-tl__list">
{year.undated.map((item) => ( {year.undated.map((item) => (
<TimelineEntry key={item.id} item={item} /> <TimelineEntry key={item.id} item={item} />
))} ))}

View file

@ -1,5 +1,5 @@
/** /**
* History timeline, scoped under .ngu-tl. * History timeline, scoped under .site-tl.
* *
* Everything themeable is a custom property with a fallback, so rewiring to the * Everything themeable is a custom property with a fallback, so rewiring to the
* site tokens is a one-block edit at the top. Typefaces are deliberately not * site tokens is a one-block edit at the top. Typefaces are deliberately not
@ -7,7 +7,7 @@
* and tracking. * and tracking.
*/ */
.ngu-tl { .site-tl {
/* Defaults match the site palette; History.tsx overrides accent and /* Defaults match the site palette; History.tsx overrides accent and
surface per section so the rail sits on the right background. */ surface per section so the rail sits on the right background. */
--tl-ink: var(--color-ink); --tl-ink: var(--color-ink);
@ -26,7 +26,7 @@
} }
@media (max-width: 640px) { @media (max-width: 640px) {
.ngu-tl { .site-tl {
--tl-gutter: 3rem; --tl-gutter: 3rem;
--tl-rail-x: 1rem; --tl-rail-x: 1rem;
} }
@ -34,13 +34,13 @@
/* --- Decade block ----------------------------------------------- */ /* --- Decade block ----------------------------------------------- */
.ngu-tl__decade { .site-tl__decade {
position: relative; position: relative;
} }
/* The rail. One per decade block so the pre-program run can change style /* The rail. One per decade block so the pre-program run can change style
without breaking the line's continuity. */ without breaking the line's continuity. */
.ngu-tl__decade::before { .site-tl__decade::before {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
@ -50,25 +50,25 @@
background: var(--tl-rail); background: var(--tl-rail);
} }
.ngu-tl__decade--pre::before { .site-tl__decade--pre::before {
background: none; background: none;
border-left: var(--tl-rail-w) dashed var(--tl-rail); border-left: var(--tl-rail-w) dashed var(--tl-rail);
opacity: 0.7; opacity: 0.7;
} }
/* Last decade fades out rather than stopping dead. */ /* Last decade fades out rather than stopping dead. */
.ngu-tl__decade:last-child::before { .site-tl__decade:last-child::before {
bottom: 2rem; bottom: 2rem;
mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent);
} }
.ngu-tl__decade--pre { .site-tl__decade--pre {
color: var(--tl-muted); color: var(--tl-muted);
} }
/* --- Decade header ----------------------------------------------- */ /* --- Decade header ----------------------------------------------- */
.ngu-tl__decadeHead { .site-tl__decadeHead {
position: relative; position: relative;
display: grid; display: grid;
grid-template-columns: var(--tl-gutter) minmax(0, 1fr); grid-template-columns: var(--tl-gutter) minmax(0, 1fr);
@ -76,12 +76,12 @@
padding-block: 3.5rem 1.75rem; padding-block: 3.5rem 1.75rem;
} }
.ngu-tl__decade:first-child .ngu-tl__decadeHead { .site-tl__decade:first-child .site-tl__decadeHead {
padding-block-start: 0.5rem; padding-block-start: 0.5rem;
} }
/* Numeral breaks the rail. */ /* Numeral breaks the rail. */
.ngu-tl__decadeNum { .site-tl__decadeNum {
position: relative; position: relative;
z-index: 1; z-index: 1;
margin-left: calc(var(--tl-rail-x) * -1 + 0.125rem); margin-left: calc(var(--tl-rail-x) * -1 + 0.125rem);
@ -97,11 +97,11 @@
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
} }
.ngu-tl__decade--pre .ngu-tl__decadeNum { .site-tl__decade--pre .site-tl__decadeNum {
color: var(--tl-faint); color: var(--tl-faint);
} }
.ngu-tl__decadeTitle { .site-tl__decadeTitle {
font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
font-weight: 600; font-weight: 600;
line-height: 1.12; line-height: 1.12;
@ -110,7 +110,7 @@
max-width: 22ch; max-width: 22ch;
} }
.ngu-tl__decadeTagline { .site-tl__decadeTagline {
margin: 0.5rem 0 0; margin: 0.5rem 0 0;
font-size: 1.0625rem; font-size: 1.0625rem;
line-height: 1.5; line-height: 1.5;
@ -118,7 +118,7 @@
max-width: 54ch; max-width: 54ch;
} }
.ngu-tl__decadeBlurb { .site-tl__decadeBlurb {
margin: 0.875rem 0 0; margin: 0.875rem 0 0;
font-size: 0.9375rem; font-size: 0.9375rem;
line-height: 1.65; line-height: 1.65;
@ -126,7 +126,7 @@
max-width: 62ch; max-width: 62ch;
} }
.ngu-tl__gapNote { .site-tl__gapNote {
margin: 1rem 0 0; margin: 1rem 0 0;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@ -140,11 +140,11 @@
/* --- Year node ------------------------------------------------ */ /* --- Year node ------------------------------------------------ */
.ngu-tl__year { .site-tl__year {
position: relative; position: relative;
} }
.ngu-tl__yearBtn { .site-tl__yearBtn {
position: relative; position: relative;
z-index: 1; z-index: 1;
display: grid; display: grid;
@ -161,18 +161,18 @@
border-radius: 0.375rem; border-radius: 0.375rem;
} }
.ngu-tl__yearBtn:hover .ngu-tl__yearLabel { .site-tl__yearBtn:hover .site-tl__yearLabel {
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
} }
.ngu-tl__yearBtn:focus-visible { .site-tl__yearBtn:focus-visible {
outline: 2px solid var(--tl-accent); outline: 2px solid var(--tl-accent);
outline-offset: 2px; outline-offset: 2px;
} }
/* Dot sits on the rail; --tl-dot is set inline from the year's item count, so /* Dot sits on the rail; --tl-dot is set inline from the year's item count, so
scrolling the page gives you the organization's density at a glance. */ scrolling the page gives you the organization's density at a glance. */
.ngu-tl__dot { .site-tl__dot {
position: relative; position: relative;
justify-self: start; justify-self: start;
margin-left: calc(var(--tl-rail-x) - (var(--tl-dot, 8px) / 2) + (var(--tl-rail-w) / 2)); margin-left: calc(var(--tl-rail-x) - (var(--tl-dot, 8px) / 2) + (var(--tl-rail-w) / 2));
@ -184,15 +184,15 @@
transition: background-color 140ms ease, transform 140ms ease; transition: background-color 140ms ease, transform 140ms ease;
} }
.ngu-tl__yearBtn:hover .ngu-tl__dot { .site-tl__yearBtn:hover .site-tl__dot {
background: var(--tl-accent); background: var(--tl-accent);
} }
.ngu-tl__year--featured .ngu-tl__dot { .site-tl__year--featured .site-tl__dot {
background: var(--tl-accent); background: var(--tl-accent);
} }
.ngu-tl__year--featured .ngu-tl__dot::after { .site-tl__year--featured .site-tl__dot::after {
content: ''; content: '';
position: absolute; position: absolute;
inset: -5px; inset: -5px;
@ -201,17 +201,17 @@
opacity: 0.45; opacity: 0.45;
} }
.ngu-tl__year--open .ngu-tl__dot { .site-tl__year--open .site-tl__dot {
background: var(--tl-accent); background: var(--tl-accent);
transform: scale(1.15); transform: scale(1.15);
} }
.ngu-tl__decade--pre .ngu-tl__dot { .site-tl__decade--pre .site-tl__dot {
background: var(--tl-surface); background: var(--tl-surface);
border: 1.5px solid var(--tl-rail); border: 1.5px solid var(--tl-rail);
} }
.ngu-tl__yearLabel { .site-tl__yearLabel {
font-size: 1.125rem; font-size: 1.125rem;
font-weight: 550; font-weight: 550;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
@ -219,41 +219,41 @@
transition: color 140ms ease; transition: color 140ms ease;
} }
.ngu-tl__yearCount { .site-tl__yearCount {
font-size: 0.8125rem; font-size: 0.8125rem;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
color: var(--tl-faint); color: var(--tl-faint);
padding-right: 0.25rem; padding-right: 0.25rem;
} }
.ngu-tl__year--empty .ngu-tl__yearLabel { .site-tl__year--empty .site-tl__yearLabel {
color: var(--tl-faint); color: var(--tl-faint);
font-weight: 450; font-weight: 450;
} }
/* --- Expanded panel ------------------------------------------- */ /* --- Expanded panel ------------------------------------------- */
.ngu-tl__panel { .site-tl__panel {
padding: 0.25rem 0 1.5rem var(--tl-gutter); padding: 0.25rem 0 1.5rem var(--tl-gutter);
animation: ngu-tl-reveal 220ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation: site-tl-reveal 220ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
} }
@keyframes ngu-tl-reveal { @keyframes site-tl-reveal {
from { from {
opacity: 0; opacity: 0;
transform: translateY(-4px); transform: translateY(-4px);
} }
} }
.ngu-tl__month { .site-tl__month {
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.ngu-tl__month:first-child { .site-tl__month:first-child {
margin-top: 0.5rem; margin-top: 0.5rem;
} }
.ngu-tl__monthLabel { .site-tl__monthLabel {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.75rem; gap: 0.75rem;
@ -263,7 +263,7 @@
color: var(--tl-muted); color: var(--tl-muted);
} }
.ngu-tl__monthLabel::after { .site-tl__monthLabel::after {
content: ''; content: '';
flex: 1; flex: 1;
height: 1px; height: 1px;
@ -271,13 +271,13 @@
opacity: 0.6; opacity: 0.6;
} }
.ngu-tl__undated .ngu-tl__monthLabel { .site-tl__undated .site-tl__monthLabel {
font-style: italic; font-style: italic;
font-weight: 450; font-weight: 450;
color: var(--tl-faint); color: var(--tl-faint);
} }
.ngu-tl__list { .site-tl__list {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -288,7 +288,7 @@
/* --- Entry ----------------------------------------------------- */ /* --- Entry ----------------------------------------------------- */
.ngu-tl__entry { .site-tl__entry {
display: grid; display: grid;
grid-template-columns: 2.75rem minmax(0, 1fr); grid-template-columns: 2.75rem minmax(0, 1fr);
gap: 0.75rem; gap: 0.75rem;
@ -298,16 +298,16 @@
color: inherit; color: inherit;
} }
a.ngu-tl__entry:hover { a.site-tl__entry:hover {
background: var(--tl-accent-soft); background: var(--tl-accent-soft);
} }
a.ngu-tl__entry:focus-visible { a.site-tl__entry:focus-visible {
outline: 2px solid var(--tl-accent); outline: 2px solid var(--tl-accent);
outline-offset: 1px; outline-offset: 1px;
} }
.ngu-tl__entryDay { .site-tl__entryDay {
font-size: 0.8125rem; font-size: 0.8125rem;
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
color: var(--tl-faint); color: var(--tl-faint);
@ -315,25 +315,25 @@ a.ngu-tl__entry:focus-visible {
text-align: right; text-align: right;
} }
.ngu-tl__entryTitle { .site-tl__entryTitle {
display: block; display: block;
font-size: 0.9375rem; font-size: 0.9375rem;
font-weight: 500; font-weight: 500;
line-height: 1.45; line-height: 1.45;
} }
a.ngu-tl__entry:hover .ngu-tl__entryTitle { a.site-tl__entry:hover .site-tl__entryTitle {
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
} }
.ngu-tl__entryMeta { .site-tl__entryMeta {
display: block; display: block;
margin-top: 0.125rem; margin-top: 0.125rem;
font-size: 0.8125rem; font-size: 0.8125rem;
color: var(--tl-muted); color: var(--tl-muted);
} }
.ngu-tl__entryBlurb { .site-tl__entryBlurb {
margin: 0.375rem 0 0; margin: 0.375rem 0 0;
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.6; line-height: 1.6;
@ -343,7 +343,7 @@ a.ngu-tl__entry:hover .ngu-tl__entryTitle {
/* Kind marker: a shape, not a colored pill, so a screenful of entries stays /* Kind marker: a shape, not a colored pill, so a screenful of entries stays
calm and the type still carries the hierarchy. */ calm and the type still carries the hierarchy. */
.ngu-tl__kind { .site-tl__kind {
display: inline-block; display: inline-block;
width: 0.5rem; width: 0.5rem;
height: 0.5rem; height: 0.5rem;
@ -352,20 +352,20 @@ a.ngu-tl__entry:hover .ngu-tl__entryTitle {
background: var(--tl-faint); background: var(--tl-faint);
} }
.ngu-tl__kind--milestone { .site-tl__kind--milestone {
border-radius: 50%; border-radius: 50%;
background: var(--tl-accent); background: var(--tl-accent);
} }
.ngu-tl__kind--event { .site-tl__kind--event {
border-radius: 1px; border-radius: 1px;
} }
.ngu-tl__kind--award { .site-tl__kind--award {
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
} }
.ngu-tl__kind--person { .site-tl__kind--person {
border-radius: 50%; border-radius: 50%;
background: none; background: none;
box-shadow: inset 0 0 0 1.5px var(--tl-faint); box-shadow: inset 0 0 0 1.5px var(--tl-faint);
@ -373,14 +373,14 @@ a.ngu-tl__entry:hover .ngu-tl__entryTitle {
/* --- Featured entries ----------------------------------------- */ /* --- Featured entries ----------------------------------------- */
.ngu-tl__featured { .site-tl__featured {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.75rem; gap: 0.75rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.ngu-tl__entry--featured { .site-tl__entry--featured {
grid-template-columns: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
padding: 1rem 1.125rem; padding: 1rem 1.125rem;
border-left: 2px solid var(--tl-accent); border-left: 2px solid var(--tl-accent);
@ -388,33 +388,33 @@ a.ngu-tl__entry:hover .ngu-tl__entryTitle {
border-radius: 0 0.5rem 0.5rem 0; border-radius: 0 0.5rem 0.5rem 0;
} }
.ngu-tl__entry--featured .ngu-tl__entryTitle { .site-tl__entry--featured .site-tl__entryTitle {
font-size: 1.0625rem; font-size: 1.0625rem;
font-weight: 600; font-weight: 600;
letter-spacing: -0.008em; letter-spacing: -0.008em;
} }
.ngu-tl__entry--featured .ngu-tl__entryDay { .site-tl__entry--featured .site-tl__entryDay {
text-align: left; text-align: left;
padding: 0 0 0.25rem; padding: 0 0 0.25rem;
} }
a.ngu-tl__entry--featured:hover { a.site-tl__entry--featured:hover {
background: color-mix(in srgb, var(--tl-accent) 18%, transparent); background: color-mix(in srgb, var(--tl-accent) 18%, transparent);
} }
/* --- Empty state ----------------------------------------------- */ /* --- Empty state ----------------------------------------------- */
.ngu-tl__empty { .site-tl__empty {
padding: 0.5rem 0 1.25rem var(--tl-gutter); padding: 0.5rem 0 1.25rem var(--tl-gutter);
font-size: 0.875rem; font-size: 0.875rem;
color: var(--tl-faint); color: var(--tl-faint);
} }
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
.ngu-tl *, .site-tl *,
.ngu-tl *::before, .site-tl *::before,
.ngu-tl *::after { .site-tl *::after {
animation-duration: 0.01ms !important; animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important; transition-duration: 0.01ms !important;
} }
@ -422,13 +422,13 @@ a.ngu-tl__entry--featured:hover {
/* --- Toolbar + utilities ------------------------------------- */ /* --- Toolbar + utilities ------------------------------------- */
.ngu-tl__toolbar { .site-tl__toolbar {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding-bottom: 1rem; padding-bottom: 1rem;
} }
.ngu-tl__toolbarBtn { .site-tl__toolbarBtn {
padding: 0.375rem 0.75rem; padding: 0.375rem 0.75rem;
border: 1px solid var(--tl-rail); border: 1px solid var(--tl-rail);
border-radius: 999px; border-radius: 999px;
@ -440,23 +440,23 @@ a.ngu-tl__entry--featured:hover {
transition: color 140ms ease, border-color 140ms ease; transition: color 140ms ease, border-color 140ms ease;
} }
.ngu-tl__toolbarBtn:hover { .site-tl__toolbarBtn:hover {
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
border-color: var(--tl-accent); border-color: var(--tl-accent);
} }
.ngu-tl__toolbarBtn:focus-visible { .site-tl__toolbarBtn:focus-visible {
outline: 2px solid var(--tl-accent); outline: 2px solid var(--tl-accent);
outline-offset: 2px; outline-offset: 2px;
} }
.ngu-tl__emptyState { .site-tl__emptyState {
padding: 3rem 0; padding: 3rem 0;
color: var(--tl-muted); color: var(--tl-muted);
font-size: 0.9375rem; font-size: 0.9375rem;
} }
.ngu-tl__srOnly { .site-tl__srOnly {
position: absolute; position: absolute;
width: 1px; width: 1px;
height: 1px; height: 1px;
@ -472,14 +472,14 @@ a.ngu-tl__entry--featured:hover {
Opens upward: the toggle is first in the DOM, column-reverse puts the Opens upward: the toggle is first in the DOM, column-reverse puts the
list above it. Faded because none of it has happened yet. */ list above it. Faded because none of it has happened yet. */
.ngu-tl__upcoming { .site-tl__upcoming {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
.ngu-tl__upcoming::before { .site-tl__upcoming::before {
content: ''; content: '';
position: absolute; position: absolute;
top: 1.25rem; top: 1.25rem;
@ -488,7 +488,7 @@ a.ngu-tl__entry--featured:hover {
border-left: var(--tl-rail-w) dashed var(--tl-rail); border-left: var(--tl-rail-w) dashed var(--tl-rail);
} }
.ngu-tl__upcomingBtn { .site-tl__upcomingBtn {
position: relative; position: relative;
z-index: 1; z-index: 1;
display: grid; display: grid;
@ -504,17 +504,17 @@ a.ngu-tl__entry--featured:hover {
cursor: pointer; cursor: pointer;
} }
.ngu-tl__upcomingBtn:hover { .site-tl__upcomingBtn:hover {
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
} }
.ngu-tl__upcomingBtn:focus-visible { .site-tl__upcomingBtn:focus-visible {
outline: 2px solid var(--tl-accent); outline: 2px solid var(--tl-accent);
outline-offset: 2px; outline-offset: 2px;
border-radius: 0.375rem; border-radius: 0.375rem;
} }
.ngu-tl__upcomingDot { .site-tl__upcomingDot {
justify-self: start; justify-self: start;
margin-left: calc(var(--tl-rail-x) - 4px + (var(--tl-rail-w) / 2)); margin-left: calc(var(--tl-rail-x) - 4px + (var(--tl-rail-w) / 2));
width: 8px; width: 8px;
@ -524,32 +524,32 @@ a.ngu-tl__entry--featured:hover {
box-shadow: 0 0 0 4px var(--tl-surface); box-shadow: 0 0 0 4px var(--tl-surface);
} }
.ngu-tl__upcomingLabel { .site-tl__upcomingLabel {
font-size: 0.875rem; font-size: 0.875rem;
} }
.ngu-tl__chevron { .site-tl__chevron {
font-size: 0.75rem; font-size: 0.75rem;
padding-right: 0.25rem; padding-right: 0.25rem;
} }
/* Everything above the toggle is provisional, and reads that way. */ /* Everything above the toggle is provisional, and reads that way. */
.ngu-tl__upcomingList { .site-tl__upcomingList {
opacity: 0.62; opacity: 0.62;
animation: ngu-tl-rise 240ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation: site-tl-rise 240ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
} }
.ngu-tl__upcomingList:hover, .site-tl__upcomingList:hover,
.ngu-tl__upcomingList:focus-within { .site-tl__upcomingList:focus-within {
opacity: 1; opacity: 1;
} }
.ngu-tl__upcomingList .ngu-tl__dot { .site-tl__upcomingList .site-tl__dot {
background: var(--tl-surface); background: var(--tl-surface);
border: 1.5px dashed var(--tl-accent); border: 1.5px dashed var(--tl-accent);
} }
@keyframes ngu-tl-rise { @keyframes site-tl-rise {
from { from {
opacity: 0; opacity: 0;
transform: translateY(8px); transform: translateY(8px);
@ -558,7 +558,7 @@ a.ngu-tl__entry--featured:hover {
/* --- Event / org / award logo --------------------------------- */ /* --- Event / org / award logo --------------------------------- */
.ngu-tl__logo { .site-tl__logo {
display: inline-block; display: inline-block;
width: 1.125rem; width: 1.125rem;
height: 1.125rem; height: 1.125rem;
@ -568,7 +568,14 @@ a.ngu-tl__entry--featured:hover {
border-radius: 2px; border-radius: 2px;
} }
.ngu-tl__entry--featured .ngu-tl__logo { /* An 18px mark: the dark-mode backing (.logo-plate, index.css) with
a hairline of padding, not the usual quarter rem. */
:root[data-theme] .site-tl__logo.logo-plate {
padding: 1px;
border-radius: 3px;
}
.site-tl__entry--featured .site-tl__logo {
width: 1.5rem; width: 1.5rem;
height: 1.5rem; height: 1.5rem;
vertical-align: -0.3125rem; vertical-align: -0.3125rem;
@ -576,15 +583,15 @@ a.ngu-tl__entry--featured:hover {
/* --- People roster ------------------------------------------- */ /* --- People roster ------------------------------------------- */
.ngu-tl__entryWrap { .site-tl__entryWrap {
display: block; display: block;
} }
.ngu-tl__roster { .site-tl__roster {
padding: 0.125rem 0 0.5rem 3.5rem; padding: 0.125rem 0 0.5rem 3.5rem;
} }
.ngu-tl__roster--featured { .site-tl__roster--featured {
padding: 0.5rem 1.125rem 1rem; padding: 0.5rem 1.125rem 1rem;
border-left: 2px solid var(--tl-accent); border-left: 2px solid var(--tl-accent);
background: var(--tl-accent-soft); background: var(--tl-accent-soft);
@ -592,14 +599,14 @@ a.ngu-tl__entry--featured:hover {
border-radius: 0 0 0.5rem 0; border-radius: 0 0 0.5rem 0;
} }
.ngu-tl__rosterTeam { .site-tl__rosterTeam {
display: block; display: block;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-size: 0.75rem; font-size: 0.75rem;
color: var(--tl-faint); color: var(--tl-faint);
} }
.ngu-tl__people { .site-tl__people {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.375rem 1rem; gap: 0.375rem 1rem;
@ -608,13 +615,13 @@ a.ngu-tl__entry--featured:hover {
padding: 0; padding: 0;
} }
.ngu-tl__person { .site-tl__person {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
} }
.ngu-tl__personPhoto { .site-tl__personPhoto {
width: 1.75rem; width: 1.75rem;
height: 1.75rem; height: 1.75rem;
border-radius: 50%; border-radius: 50%;
@ -623,7 +630,7 @@ a.ngu-tl__entry--featured:hover {
flex: none; flex: none;
} }
.ngu-tl__personPhoto--blank { .site-tl__personPhoto--blank {
display: grid; display: grid;
place-items: center; place-items: center;
font-size: 0.625rem; font-size: 0.625rem;
@ -632,12 +639,12 @@ a.ngu-tl__entry--featured:hover {
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff); color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
} }
.ngu-tl__personName { .site-tl__personName {
font-size: 0.8125rem; font-size: 0.8125rem;
line-height: 1.25; line-height: 1.25;
} }
.ngu-tl__personTitle { .site-tl__personTitle {
display: block; display: block;
font-size: 0.6875rem; font-size: 0.6875rem;
color: var(--tl-faint); color: var(--tl-faint);
@ -645,19 +652,19 @@ a.ngu-tl__entry--featured:hover {
/* --- Kind markers, continued --------------------------------- */ /* --- Kind markers, continued --------------------------------- */
.ngu-tl__kind--organization { .site-tl__kind--organization {
border-radius: 2px; border-radius: 2px;
background: none; background: none;
box-shadow: inset 0 0 0 1.5px var(--tl-faint); box-shadow: inset 0 0 0 1.5px var(--tl-faint);
} }
.ngu-tl__kind--people { .site-tl__kind--people {
border-radius: 50%; border-radius: 50%;
background: none; background: none;
box-shadow: inset 0 0 0 1.5px var(--tl-faint); box-shadow: inset 0 0 0 1.5px var(--tl-faint);
} }
.ngu-tl__entryBody { .site-tl__entryBody {
display: block; display: block;
min-width: 0; min-width: 0;
} }