Compare commits
No commits in common. "2b009beac13970a194f3ec44707dba010823463c" and "7c1723b0adfd139e0100e674dbadc4876bf29247" have entirely different histories.
2b009beac1
...
7c1723b0ad
37 changed files with 236 additions and 530 deletions
|
|
@ -45,10 +45,10 @@ Both lines are already in every proxied block in `nginx-dev` and in
|
|||
|
||||
## Sign-in
|
||||
|
||||
- The session cookie is `__Host-site_session`: the browser only
|
||||
- The session cookie is `__Host-ngu_session`: the browser only
|
||||
accepts it Secure, on path `/`, with no Domain, so another
|
||||
subdomain can't set or overwrite it. With `COOKIE_SECURE=false`
|
||||
(plain-http local work) it's `site_session`, since the prefix needs
|
||||
(plain-http local work) it's `ngu_session`, since the prefix needs
|
||||
Secure.
|
||||
- Logins are limited per IP where `/api/auth/login` is mounted (10
|
||||
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
|
||||
rate-limit bucket: set nginx's `real_ip_header` and
|
||||
`set_real_ip_from` for the proxy first.
|
||||
- The Google sign-in state cookie is `__Host-site_oauth` (plain
|
||||
`site_oauth` over local http), and the page it returns to is checked
|
||||
- The Google sign-in state cookie is `__Host-ngu_oauth` (plain
|
||||
`ngu_oauth` over local http), and the page it returns to is checked
|
||||
again when the browser comes back.
|
||||
|
||||
## From nginx: HSTS
|
||||
|
|
|
|||
12
index.html
12
index.html
|
|
@ -12,17 +12,7 @@
|
|||
flash: this browser's choice (ThemeToggle), else the system. -->
|
||||
<script>
|
||||
try {
|
||||
// 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");
|
||||
var t = localStorage.getItem("ngu-theme");
|
||||
document.documentElement.dataset.theme =
|
||||
t === "dark" || t === "light" ? t : matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
} catch (e) {}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ export const blogPosts = {
|
|||
text("excerpt"),
|
||||
text("cover_image"),
|
||||
text("cover_alt"),
|
||||
bool("show_contents"),
|
||||
date("published_on"),
|
||||
text("tags"),
|
||||
text("guest_author"),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
// overwrite it. Plain http (local work, COOKIE_SECURE=false) can't
|
||||
// use the prefix, so it keeps the plain name.
|
||||
export const COOKIE_NAME = SECURE_COOKIE ? "__Host-site_session" : "site_session";
|
||||
export const COOKIE_NAME = SECURE_COOKIE ? "__Host-ngu_session" : "ngu_session";
|
||||
|
||||
const IP_SALT = process.env.IP_SALT ?? randomBytes(16).toString("hex");
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ app.use("/api/admin/*", logger());
|
|||
/api/csp-report (journalctl -u ngu-api). Once a while of real use
|
||||
logs nothing unexpected, switch contentSecurityPolicyReportOnly to
|
||||
contentSecurityPolicy. 'unsafe-inline' scripts cover the page's
|
||||
window.__SITE__ and the theme script in index.html. */
|
||||
window.__NGU_SITE__ and the theme script in index.html. */
|
||||
const EMBEDS = [
|
||||
"https://www.youtube-nocookie.com",
|
||||
"https://www.youtube.com",
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 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));
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
site_settings table, 035), where anything set wins and anything
|
||||
blank falls back to site.json. siteFor(db) does the merge. The
|
||||
pages read the same merged values (renderPage writes them into
|
||||
the HTML as window.__SITE__, see src/lib/site.ts), so a
|
||||
the HTML as window.__NGU_SITE__, see src/lib/site.ts), so a
|
||||
heading and its search title can't drift.
|
||||
The database: records' names, taglines, first paragraphs and
|
||||
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
|
||||
// script in the head runs during parsing; modules wait).
|
||||
`<script>window.__SITE__ = ${scriptJson(forBrowser(site))}</script>`,
|
||||
`<script>window.__NGU_SITE__ = ${scriptJson(forBrowser(site))}</script>`,
|
||||
site.themeCss && `<style id="site-colors">${site.themeCss}</style>`,
|
||||
].filter(Boolean);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ const NOTE_LIMIT = 2000;
|
|||
|
||||
/* ── GET /api/admin/feedback ─────────────────────────────────────
|
||||
?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
|
||||
?q=retreat substring of the message
|
||||
?before=41 cursor: rows with a lower id than this
|
||||
|
|
@ -33,17 +31,11 @@ const NOTE_LIMIT = 2000;
|
|||
|
||||
admin.get("/feedback", (c) => {
|
||||
const db = c.get("db");
|
||||
const { status, type, kind, q, before, limit } = c.req.query();
|
||||
const { status, type, q, before, limit } = c.req.query();
|
||||
|
||||
const where = [];
|
||||
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)) {
|
||||
where.push("status = ?");
|
||||
params.push(status);
|
||||
|
|
@ -77,27 +69,19 @@ admin.get("/feedback", (c) => {
|
|||
const hasMore = rows.length > take;
|
||||
const page = hasMore ? rows.slice(0, take) : rows;
|
||||
|
||||
// Status counts cover this queue (kind) but ignore the other
|
||||
// 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.
|
||||
// Counts are unfiltered on purpose: the tabs should show what's
|
||||
// waiting overall, not what's left after the current filter.
|
||||
const counts = Object.fromEntries(STATUSES.map((s) => [s, 0]));
|
||||
for (const row of db
|
||||
.prepare(`SELECT status, COUNT(*) AS n FROM feedback ${kindWhere ? `WHERE ${kindWhere}` : ""} GROUP BY status`)
|
||||
.prepare("SELECT status, COUNT(*) AS n FROM feedback GROUP BY status")
|
||||
.all()) {
|
||||
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(
|
||||
{
|
||||
feedback: page,
|
||||
counts,
|
||||
newByKind: { feedback: newByKind?.feedback ?? 0, privacy: newByKind?.privacy ?? 0 },
|
||||
nextCursor: hasMore ? page[page.length - 1].id : null,
|
||||
},
|
||||
200,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ auth.get("/me", (c) => {
|
|||
// the redirect from Google, which is a top-level navigation.
|
||||
// __Host- (Secure, path /, no Domain) when over https, like the
|
||||
// session cookie, so a sibling subdomain can't plant its own state.
|
||||
const OAUTH_COOKIE = SECURE_COOKIE ? "__Host-site_oauth" : "site_oauth";
|
||||
const OAUTH_COOKIE = SECURE_COOKIE ? "__Host-ngu_oauth" : "ngu_oauth";
|
||||
const OAUTH_COOKIE_OPTIONS = {
|
||||
httpOnly: true,
|
||||
secure: SECURE_COOKIE,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ blog.get("/blog/:id", (c) => {
|
|||
excerpt: row.excerpt,
|
||||
cover_image: row.cover_image,
|
||||
cover_alt: row.cover_alt,
|
||||
show_contents: row.show_contents === 1,
|
||||
published_on: row.published_on,
|
||||
tags: splitTags(row.tags),
|
||||
authors,
|
||||
|
|
|
|||
|
|
@ -462,7 +462,6 @@ tx(db, () => {
|
|||
cover_image: IMAGE,
|
||||
published_on: db.prepare(`SELECT date('now') AS d`).get().d,
|
||||
tags: "Test, Showcase",
|
||||
show_contents: 1,
|
||||
guest_author: "A Guest Author",
|
||||
guest_photo: IMAGE,
|
||||
is_published: 1,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import Home from "./pages/Home.tsx"
|
|||
/* 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
|
||||
build; if that doesn't help, let the error surface. */
|
||||
const CHUNK_RELOAD = "site-chunk-reload"
|
||||
const CHUNK_RELOAD = "ngu-chunk-reload"
|
||||
const lazyPage = (load) =>
|
||||
lazy(() =>
|
||||
load()
|
||||
|
|
@ -128,7 +128,6 @@ export default function App() {
|
|||
<Route path="panel" element={<AdminPanel />} />
|
||||
</Route>
|
||||
<Route path="feedback" element={<AdminFeedback />} />
|
||||
<Route path="data-requests" element={<AdminFeedback kind="privacy" />} />
|
||||
<Route path="media" element={<AdminMedia />} />
|
||||
<Route element={<RequireRole role="admin" />}>
|
||||
<Route path="clips" element={<AdminClips />} />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { SITE_BANNER } from "../data/bannerConfig.ts";
|
|||
|
||||
export default function Banner() {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const storageKey = `site-banner-dismissed:${SITE_BANNER.id}`;
|
||||
const storageKey = `ngu-banner-dismissed:${SITE_BANNER.id}`;
|
||||
|
||||
useEffect(() => {
|
||||
if (!SITE_BANNER.enabled) return;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import { Anchor, Inline, Paragraphs } from './InlineText.tsx'
|
|||
import VideoPlayer from './VideoPlayer.tsx'
|
||||
import ScheduleBlock from './ScheduleBlock.tsx'
|
||||
import { accentText, BRAND } from '../lib/color.ts'
|
||||
import { headingAnchors } from '../lib/contents.ts'
|
||||
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
|
|
@ -53,14 +52,11 @@ export default function ContentBlocks({
|
|||
className?: string
|
||||
}) {
|
||||
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 (
|
||||
<div className={`space-y-6 ${className}`}>
|
||||
{blocks.map((block, index) => (
|
||||
<Block key={block.id ?? index} block={block} accent={accent} anchor={idAt.get(index)} />
|
||||
<Block key={block.id ?? index} block={block} accent={accent} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
|
|
@ -75,23 +71,20 @@ function Caption({ text }: { text?: string | null }) {
|
|||
)
|
||||
}
|
||||
|
||||
// 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 }) {
|
||||
function Block({ block, accent }: { block: ContentBlock; accent: string }) {
|
||||
const text = block.text ?? ''
|
||||
|
||||
switch (block.type) {
|
||||
case 'heading':
|
||||
return (
|
||||
<h3 id={anchor} className="text-2xl font-bold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
|
||||
<h3 className="text-2xl font-bold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</h3>
|
||||
)
|
||||
|
||||
case 'subheading':
|
||||
return (
|
||||
<h4 id={anchor} className="text-lg font-semibold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
|
||||
<h4 className="text-lg font-semibold" style={{ color: accentText(accent) }}>
|
||||
{text}
|
||||
</h4>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Link } from "react-router-dom";
|
||||
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
|
||||
import siteLogo from "../assets/logos/NGU_Logo.svg";
|
||||
import nguLogo from "../assets/logos/NGU_Logo.svg";
|
||||
import PlatformIcon from "./PlatformIcon.tsx";
|
||||
|
||||
const Social_Links = [
|
||||
|
|
@ -59,7 +59,7 @@ export default function Footer() {
|
|||
width below them. */}
|
||||
<div className="md:col-span-9 text-center md:text-left">
|
||||
<Link to="/" className="inline-block">
|
||||
<img src={siteLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
|
||||
<img src={nguLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
|
||||
</Link>
|
||||
|
||||
<address className="mt-5 not-italic text-sm leading-relaxed text-white/60">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Suspense, useState, useEffect, useRef } from "react";
|
|||
import { NavLink, Link, Outlet, useLocation } from "react-router-dom";
|
||||
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
|
||||
import Banner from "./Banner.tsx";
|
||||
import siteLogo from "../assets/logos/NGU_Logo.svg";
|
||||
import nguLogo from "../assets/logos/NGU_Logo.svg";
|
||||
import Footer from "./Footer.tsx";
|
||||
import PrivacyNotice from "./PrivacyNotice.tsx";
|
||||
import ThemeToggle from "./ThemeToggle.tsx";
|
||||
|
|
@ -187,7 +187,7 @@ export default function Layout() {
|
|||
>
|
||||
<div className="flex items-center gap-8">
|
||||
<Link to="/" aria-label="Next Generation of Unity home" className="inline-block">
|
||||
<img src={siteLogo} alt="Next Generation of Unity" className="h-10 w-auto" />
|
||||
<img src={nguLogo} alt="Next Generation of Unity" className="h-10 w-auto" />
|
||||
</Link>
|
||||
|
||||
<div className="hidden lg:flex items-center gap-6">
|
||||
|
|
|
|||
|
|
@ -1,93 +0,0 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
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>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
import { useEffect, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
const STORAGE_KEY = 'site-privacy-notice-closed'
|
||||
const STORAGE_KEY = 'ngu-privacy-notice-closed'
|
||||
|
||||
export default function PrivacyNotice() {
|
||||
const [visible, setVisible] = useState(false)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { useEffect, useState } from 'react'
|
|||
|
||||
type Theme = 'light' | 'dark'
|
||||
|
||||
export const THEME_STORAGE_KEY = 'site-theme'
|
||||
export const THEME_STORAGE_KEY = 'ngu-theme'
|
||||
|
||||
const current = (): Theme =>
|
||||
document.documentElement.dataset.theme === 'dark' ? 'dark' : 'light'
|
||||
|
|
|
|||
|
|
@ -188,13 +188,13 @@ iframe[src*="churchcenter"] {
|
|||
gap: 0.25rem 1.5rem;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
grid-template-areas:
|
||||
"org image"
|
||||
"ngu image"
|
||||
"info image"
|
||||
"desc desc";
|
||||
}
|
||||
|
||||
.ev-org {
|
||||
grid-area: org;
|
||||
.ev-ngu {
|
||||
grid-area: ngu;
|
||||
}
|
||||
|
||||
.ev-info {
|
||||
|
|
@ -217,7 +217,7 @@ iframe[src*="churchcenter"] {
|
|||
.ev-grid {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-areas:
|
||||
"org"
|
||||
"ngu"
|
||||
"info"
|
||||
"desc";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,12 +53,6 @@ export const blogPosts = {
|
|||
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: "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",
|
||||
label: "Cover description",
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
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 }
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
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 two and writes the result into each page's HTML as
|
||||
window.__SITE__ (server/src/pageMeta.js), which is read here
|
||||
window.__NGU_SITE__ (server/src/pageMeta.js), which is read here
|
||||
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
|
||||
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. */
|
||||
const fromServer: SiteText =
|
||||
(typeof window !== 'undefined' && (window as unknown as { __SITE__?: SiteText }).__SITE__) || {}
|
||||
(typeof window !== 'undefined' && (window as unknown as { __NGU_SITE__?: SiteText }).__NGU_SITE__) || {}
|
||||
|
||||
export const SITE_NAME: string = fromServer.title || siteConfiguration.title
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ export type BlogPostRecord = {
|
|||
excerpt?: string | null
|
||||
cover_image?: string | null
|
||||
cover_alt?: string | null
|
||||
/** List the post's headings beside it. */
|
||||
show_contents?: boolean
|
||||
published_on?: string | null
|
||||
tags: string[]
|
||||
authors: BlogAuthor[]
|
||||
|
|
|
|||
|
|
@ -10,22 +10,20 @@
|
|||
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 PageState from "../components/PageState.tsx"
|
||||
import ContentBlocks from "../components/ContentBlocks.tsx"
|
||||
import PeopleTiles from "../components/PeopleTiles.tsx"
|
||||
import { mediaUrl } from "../lib/media.ts"
|
||||
import { postDate, useBlogPost } from "../lib/useBlog.ts"
|
||||
import { accentText, BRAND } from "../lib/color.ts"
|
||||
import PostContents from "../components/PostContents.tsx"
|
||||
import { headingAnchors } from "../lib/contents.ts"
|
||||
import PageShell, { type ShellSection } from '../components/PageShell.tsx'
|
||||
import PageState from '../components/PageState.tsx'
|
||||
import ContentBlocks from '../components/ContentBlocks.tsx'
|
||||
import PeopleTiles from '../components/PeopleTiles.tsx'
|
||||
import { mediaUrl } from '../lib/media.ts'
|
||||
import { postDate, useBlogPost } from '../lib/useBlog.ts'
|
||||
import { accentText, BRAND } from '../lib/color.ts'
|
||||
|
||||
const BODY = "var(--color-muted)"
|
||||
const BODY = 'var(--color-muted)'
|
||||
|
||||
/* 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() {
|
||||
const { id } = useParams()
|
||||
|
|
@ -45,16 +43,12 @@ 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 cover = mediaUrl(post.cover_image)
|
||||
const byline = [
|
||||
...post.authors.map((author) => author.name),
|
||||
...(post.guest ? [post.guest.name] : []),
|
||||
].join(", ")
|
||||
].join(', ')
|
||||
|
||||
const authors = [
|
||||
...post.authors.map((author) => ({
|
||||
|
|
@ -64,89 +58,50 @@ export default function BlogPost() {
|
|||
pronouns: author.pronouns,
|
||||
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[] = [
|
||||
{
|
||||
id: "post",
|
||||
title: "Post",
|
||||
id: 'post',
|
||||
title: 'Post',
|
||||
accent: BRAND,
|
||||
background: "var(--color-surface)",
|
||||
background: 'var(--color-surface)',
|
||||
content: (
|
||||
<div
|
||||
className={
|
||||
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>
|
||||
)}
|
||||
<article className="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>}
|
||||
{post.tags.map((tag) => (
|
||||
<span
|
||||
key={tag}
|
||||
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}
|
||||
</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}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{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} />
|
||||
</article>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]
|
||||
|
||||
if (authors.length > 0) {
|
||||
sections.push({
|
||||
id: "authors",
|
||||
title: authors.length === 1 ? "About the author" : "About the authors",
|
||||
id: 'authors',
|
||||
title: authors.length === 1 ? 'About the author' : 'About the authors',
|
||||
accent: BRAND,
|
||||
background: "var(--color-tint)",
|
||||
background: 'var(--color-tint)',
|
||||
content: (
|
||||
<div className="mx-auto max-w-6xl px-6">
|
||||
<PeopleTiles size="md" accent={BRAND} people={authors} />
|
||||
|
|
@ -155,11 +110,5 @@ 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} />
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const PAGE = sitePage("/privacy");
|
|||
|
||||
The contact address is Panel → Site settings → Privacy contact
|
||||
email. Requests from the form below are feedback rows of type
|
||||
'privacy', in Admin → Forms → Data requests.
|
||||
'privacy', in Admin → Feedback.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const LAST_UPDATED = "September 28, 2026";
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { del, get, patch, ApiError } from "../../lib/api.ts";
|
||||
import { isUnauthorized, useAuth } from "../../lib/auth.tsx";
|
||||
|
|
@ -225,25 +225,9 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
|
|||
|
||||
/* ── The page ────────────────────────────────────────────────── */
|
||||
|
||||
/* 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 }) {
|
||||
export default function AdminFeedback() {
|
||||
const { user } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const queue = QUEUES[kind];
|
||||
|
||||
const [status, setStatus] = useState("new");
|
||||
const [query, setQuery] = useState("");
|
||||
|
|
@ -251,7 +235,6 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
|||
|
||||
const [rows, setRows] = useState<any[]>([]);
|
||||
const [counts, setCounts] = useState<any>({});
|
||||
const [newByKind, setNewByKind] = useState<any>({});
|
||||
const [cursor, setCursor] = useState<any>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<any>(null);
|
||||
|
|
@ -266,7 +249,6 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
|||
setError(null);
|
||||
|
||||
const params = new URLSearchParams();
|
||||
params.set("kind", kind);
|
||||
if (status !== "all") params.set("status", status);
|
||||
if (search) params.set("q", search);
|
||||
if (before) params.set("before", String(before));
|
||||
|
|
@ -275,7 +257,6 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
|||
const data = await get(`/admin/feedback?${params}`, { ttl: 0 });
|
||||
setRows((prev) => (before ? [...prev, ...data.feedback] : data.feedback));
|
||||
setCounts(data.counts);
|
||||
setNewByKind(data.newByKind ?? {});
|
||||
setCursor(data.nextCursor);
|
||||
} catch (err) {
|
||||
if (isUnauthorized(err)) {
|
||||
|
|
@ -290,7 +271,7 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
|||
setLoading(false);
|
||||
}
|
||||
},
|
||||
[kind, status, search, navigate],
|
||||
[status, search, navigate],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -325,27 +306,11 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
|
|||
|
||||
return (
|
||||
<div>
|
||||
{/* 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>
|
||||
<h1 className="text-3xl font-bold text-link">Feedback</h1>
|
||||
<p className="mt-2 text-sm text-muted">
|
||||
{canWrite ? queue.blurb : "Read-only: your account can't change statuses or notes."}
|
||||
{canWrite
|
||||
? "Everything submitted through the site form."
|
||||
: "Read-only: your account can't change statuses or notes."}
|
||||
</p>
|
||||
|
||||
{/* Filters */}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import { AdminTitleContext } from "../../lib/adminTitle.tsx";
|
|||
import { AdminWidthContext } from "../../lib/adminWidth.tsx";
|
||||
import { SITE_VERSION } from "../../lib/version.ts";
|
||||
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
|
||||
import siteLogo from "../../assets/logos/NGU_Logo.svg";
|
||||
import nguLogo from "../../assets/logos/NGU_Logo.svg";
|
||||
import ThemeToggle from "../../components/ThemeToggle.tsx";
|
||||
import {
|
||||
ADMIN_HOME,
|
||||
|
|
@ -220,7 +220,7 @@ export default function AdminLayout() {
|
|||
<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">
|
||||
<Link to={ADMIN_HOME} className="transition-opacity hover:opacity-70">
|
||||
<img src={siteLogo} alt="NGU" className="h-6 w-auto" />
|
||||
<img src={nguLogo} alt="NGU" className="h-6 w-auto" />
|
||||
</Link>
|
||||
<span className="ml-auto font-mono text-xs text-muted/70">
|
||||
{SITE_VERSION}
|
||||
|
|
|
|||
|
|
@ -118,11 +118,6 @@ export const FORMS_NAV = {
|
|||
label: "Website feedback",
|
||||
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.",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ export function Card({
|
|||
{compact ? (
|
||||
/* ── GRID CARD: layout driven by .ev-grid container queries ── */
|
||||
<div className="ev-grid mb-2">
|
||||
<Logo src={orgLogo} className="ev-org h-11 w-auto mb-4" />
|
||||
<Logo src={orgLogo} className="ev-ngu h-11 w-auto mb-4" />
|
||||
<div className="ev-info">
|
||||
{typeBadge}
|
||||
<h3 className="text-3xl font-extrabold leading-tight">
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ function fileStem(target: string): string {
|
|||
/* a site path */
|
||||
}
|
||||
const stem = name.replace(/^\//, '').replace(/[^a-z0-9]+/gi, '-').replace(/^-|-$/g, '')
|
||||
return `qr-${stem || 'home'}`
|
||||
return `ngu-qr-${stem || 'home'}`
|
||||
}
|
||||
|
||||
function download(href: string, filename: string) {
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ export default function HistoryTimeline({
|
|||
|
||||
if (grouped.length === 0 && upcomingYears.length === 0) {
|
||||
return (
|
||||
<div className="site-tl">
|
||||
<p className="site-tl__emptyState">
|
||||
<div className="ngu-tl">
|
||||
<p className="ngu-tl__emptyState">
|
||||
The timeline is empty. Add a milestone to start the record.
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -108,11 +108,11 @@ export default function HistoryTimeline({
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="site-tl">
|
||||
<div className="site-tl__toolbar">
|
||||
<div className="ngu-tl">
|
||||
<div className="ngu-tl__toolbar">
|
||||
<button
|
||||
type="button"
|
||||
className="site-tl__toolbarBtn"
|
||||
className="ngu-tl__toolbarBtn"
|
||||
onClick={() => commit(allOpen ? new Set() : new Set(allYears))}
|
||||
>
|
||||
{allOpen ? 'Collapse all years' : 'Expand all years'}
|
||||
|
|
|
|||
|
|
@ -26,24 +26,24 @@ export default function TimelineDecade({
|
|||
|
||||
return (
|
||||
<section
|
||||
className={`site-tl__decade${decade.preProgram ? ' site-tl__decade--pre' : ''}`}
|
||||
aria-labelledby={`site-tl-decade-${decade.decade}`}
|
||||
className={`ngu-tl__decade${decade.preProgram ? ' ngu-tl__decade--pre' : ''}`}
|
||||
aria-labelledby={`ngu-tl-decade-${decade.decade}`}
|
||||
>
|
||||
<header className="site-tl__decadeHead">
|
||||
<span className="site-tl__decadeNum" aria-hidden="true">
|
||||
<header className="ngu-tl__decadeHead">
|
||||
<span className="ngu-tl__decadeNum" aria-hidden="true">
|
||||
{decadeLabel(decade.decade)}
|
||||
</span>
|
||||
<div>
|
||||
<h3 className="site-tl__decadeTitle" id={`site-tl-decade-${decade.decade}`}>
|
||||
<span className="site-tl__srOnly">{decadeLabel(decade.decade)}: </span>
|
||||
<h3 className="ngu-tl__decadeTitle" id={`ngu-tl-decade-${decade.decade}`}>
|
||||
<span className="ngu-tl__srOnly">{decadeLabel(decade.decade)}: </span>
|
||||
{decade.title}
|
||||
</h3>
|
||||
{decade.tagline ? (
|
||||
<p className="site-tl__decadeTagline">{decade.tagline}</p>
|
||||
<p className="ngu-tl__decadeTagline">{decade.tagline}</p>
|
||||
) : null}
|
||||
{decade.blurb ? <p className="site-tl__decadeBlurb">{decade.blurb}</p> : null}
|
||||
{decade.blurb ? <p className="ngu-tl__decadeBlurb">{decade.blurb}</p> : null}
|
||||
{decade.preProgram ? (
|
||||
<p className="site-tl__gapNote">
|
||||
<p className="ngu-tl__gapNote">
|
||||
<span aria-hidden="true">◌</span>
|
||||
Before the program, kept for context, not part of our record
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -31,18 +31,18 @@ function fullMarker(item: TimelineItem): string {
|
|||
function PersonChip({ person }: { person: PersonRef }) {
|
||||
const img = useSmallImage(mediaUrl(person.photo))
|
||||
return (
|
||||
<li className="site-tl__person">
|
||||
<li className="ngu-tl__person">
|
||||
{!img.failed ? (
|
||||
<img className="site-tl__personPhoto" src={img.src} alt="" loading="lazy" onError={img.onError} />
|
||||
<img className="ngu-tl__personPhoto" src={img.src} alt="" loading="lazy" onError={img.onError} />
|
||||
) : (
|
||||
<span className="site-tl__personPhoto site-tl__personPhoto--blank" aria-hidden="true">
|
||||
<span className="ngu-tl__personPhoto ngu-tl__personPhoto--blank" aria-hidden="true">
|
||||
{initials(person.name)}
|
||||
</span>
|
||||
)}
|
||||
<span className="site-tl__personName">
|
||||
<span className="ngu-tl__personName">
|
||||
{person.name}
|
||||
{person.title ? (
|
||||
<span className="site-tl__personTitle">{person.title}</span>
|
||||
<span className="ngu-tl__personTitle">{person.title}</span>
|
||||
) : null}
|
||||
</span>
|
||||
</li>
|
||||
|
|
@ -61,34 +61,34 @@ export default function TimelineEntry({ item, variant = 'inline' }: Props) {
|
|||
const logo = logoSrc(item)
|
||||
|
||||
const className = [
|
||||
'site-tl__entry',
|
||||
featured ? 'site-tl__entry--featured' : '',
|
||||
href ? 'site-tl__entry--linked' : '',
|
||||
'ngu-tl__entry',
|
||||
featured ? 'ngu-tl__entry--featured' : '',
|
||||
href ? 'ngu-tl__entry--linked' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
const marker = (
|
||||
<span className="site-tl__entryDay">
|
||||
<span className="ngu-tl__entryDay">
|
||||
{featured ? fullMarker(item) : dayMarker(item)}
|
||||
</span>
|
||||
)
|
||||
|
||||
const body = (
|
||||
<span className="site-tl__entryBody">
|
||||
<span className="site-tl__entryTitle">
|
||||
<span className="ngu-tl__entryBody">
|
||||
<span className="ngu-tl__entryTitle">
|
||||
{logo ? (
|
||||
<img className="site-tl__logo logo-plate" src={logo} alt="" loading="lazy" />
|
||||
<img className="ngu-tl__logo" src={logo} alt="" loading="lazy" />
|
||||
) : (
|
||||
<span
|
||||
className={`site-tl__kind site-tl__kind--${item.kind}`}
|
||||
className={`ngu-tl__kind ngu-tl__kind--${item.kind}`}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
{item.title}
|
||||
</span>
|
||||
{item.meta ? <span className="site-tl__entryMeta">{item.meta}</span> : null}
|
||||
{item.blurb ? <p className="site-tl__entryBlurb">{item.blurb}</p> : null}
|
||||
{item.meta ? <span className="ngu-tl__entryMeta">{item.meta}</span> : null}
|
||||
{item.blurb ? <p className="ngu-tl__entryBlurb">{item.blurb}</p> : null}
|
||||
</span>
|
||||
)
|
||||
|
||||
|
|
@ -97,15 +97,15 @@ export default function TimelineEntry({ item, variant = 'inline' }: Props) {
|
|||
const roster =
|
||||
item.kind === 'people' && item.people && item.people.length > 0 ? (
|
||||
<div
|
||||
className={`site-tl__roster${featured ? ' site-tl__roster--featured' : ''}`}
|
||||
className={`ngu-tl__roster${featured ? ' ngu-tl__roster--featured' : ''}`}
|
||||
>
|
||||
{item.team ? (
|
||||
<span className="site-tl__rosterTeam">
|
||||
<span className="ngu-tl__rosterTeam">
|
||||
{item.team.name}
|
||||
{item.team.orgName ? ` · ${item.team.orgName}` : ''}
|
||||
</span>
|
||||
) : null}
|
||||
<ul className="site-tl__people">
|
||||
<ul className="ngu-tl__people">
|
||||
{item.people.map((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)
|
||||
|
||||
return (
|
||||
<li className="site-tl__entryWrap">
|
||||
<li className="ngu-tl__entryWrap">
|
||||
{href && external ? (
|
||||
<a
|
||||
href={href}
|
||||
|
|
|
|||
|
|
@ -32,28 +32,28 @@ export default function TimelineUpcoming({
|
|||
|
||||
return (
|
||||
<section
|
||||
className={`site-tl__upcoming${open ? ' site-tl__upcoming--open' : ''}`}
|
||||
className={`ngu-tl__upcoming${open ? ' ngu-tl__upcoming--open' : ''}`}
|
||||
aria-label="Upcoming"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className="site-tl__upcomingBtn"
|
||||
className="ngu-tl__upcomingBtn"
|
||||
aria-expanded={open}
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
>
|
||||
<span className="site-tl__upcomingDot" aria-hidden="true" />
|
||||
<span className="site-tl__upcomingLabel">
|
||||
<span className="ngu-tl__upcomingDot" aria-hidden="true" />
|
||||
<span className="ngu-tl__upcomingLabel">
|
||||
{open
|
||||
? 'Hide what’s scheduled'
|
||||
: `${count} ${count === 1 ? 'thing' : 'things'} still to come`}
|
||||
</span>
|
||||
<span className="site-tl__chevron" aria-hidden="true">
|
||||
<span className="ngu-tl__chevron" aria-hidden="true">
|
||||
{open ? '▾' : '▴'}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
{open ? (
|
||||
<div className="site-tl__upcomingList">
|
||||
<div className="ngu-tl__upcomingList">
|
||||
{years.map((year) => (
|
||||
<TimelineYear
|
||||
key={year.year}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@ type Props = {
|
|||
|
||||
export default function TimelineYear({ year, open, onToggle }: Props) {
|
||||
const empty = year.count === 0
|
||||
const panelId = `site-tl-year-${year.year}`
|
||||
const panelId = `ngu-tl-year-${year.year}`
|
||||
|
||||
const className = [
|
||||
'site-tl__year',
|
||||
year.featured ? 'site-tl__year--featured' : '',
|
||||
open ? 'site-tl__year--open' : '',
|
||||
empty ? 'site-tl__year--empty' : '',
|
||||
'ngu-tl__year',
|
||||
year.featured ? 'ngu-tl__year--featured' : '',
|
||||
open ? 'ngu-tl__year--open' : '',
|
||||
empty ? 'ngu-tl__year--empty' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
|
@ -30,31 +30,31 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
|
|||
<div className={className}>
|
||||
<button
|
||||
type="button"
|
||||
className="site-tl__yearBtn"
|
||||
className="ngu-tl__yearBtn"
|
||||
aria-expanded={open}
|
||||
aria-controls={panelId}
|
||||
onClick={() => onToggle(year.year)}
|
||||
>
|
||||
<span
|
||||
className="site-tl__dot"
|
||||
className="ngu-tl__dot"
|
||||
style={{ '--tl-dot': dotSize(year.count) } as CSSProperties}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span className="site-tl__yearLabel">{year.year}</span>
|
||||
<span className="site-tl__yearCount">
|
||||
<span className="ngu-tl__yearLabel">{year.year}</span>
|
||||
<span className="ngu-tl__yearCount">
|
||||
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
{open ? (
|
||||
empty ? (
|
||||
<div className="site-tl__empty" id={panelId}>
|
||||
<div className="ngu-tl__empty" id={panelId}>
|
||||
Nothing recorded for {year.year} yet.
|
||||
</div>
|
||||
) : (
|
||||
<div className="site-tl__panel" id={panelId}>
|
||||
<div className="ngu-tl__panel" id={panelId}>
|
||||
{year.featuredItems.length > 0 ? (
|
||||
<ul className="site-tl__featured site-tl__list">
|
||||
<ul className="ngu-tl__featured ngu-tl__list">
|
||||
{year.featuredItems.map((item) => (
|
||||
<TimelineEntry key={item.id} item={item} variant="featured" />
|
||||
))}
|
||||
|
|
@ -62,9 +62,9 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
|
|||
) : null}
|
||||
|
||||
{year.months.map((month) => (
|
||||
<section className="site-tl__month" key={month.month}>
|
||||
<h4 className="site-tl__monthLabel">{month.label}</h4>
|
||||
<ul className="site-tl__list">
|
||||
<section className="ngu-tl__month" key={month.month}>
|
||||
<h4 className="ngu-tl__monthLabel">{month.label}</h4>
|
||||
<ul className="ngu-tl__list">
|
||||
{month.items.map((item) => (
|
||||
<TimelineEntry key={item.id} item={item} />
|
||||
))}
|
||||
|
|
@ -73,9 +73,9 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
|
|||
))}
|
||||
|
||||
{year.undated.length > 0 ? (
|
||||
<section className="site-tl__month site-tl__undated">
|
||||
<h4 className="site-tl__monthLabel">Elsewhere in {year.year}</h4>
|
||||
<ul className="site-tl__list">
|
||||
<section className="ngu-tl__month ngu-tl__undated">
|
||||
<h4 className="ngu-tl__monthLabel">Elsewhere in {year.year}</h4>
|
||||
<ul className="ngu-tl__list">
|
||||
{year.undated.map((item) => (
|
||||
<TimelineEntry key={item.id} item={item} />
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* History timeline, scoped under .site-tl.
|
||||
* History timeline, scoped under .ngu-tl.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* and tracking.
|
||||
*/
|
||||
|
||||
.site-tl {
|
||||
.ngu-tl {
|
||||
/* Defaults match the site palette; History.tsx overrides accent and
|
||||
surface per section so the rail sits on the right background. */
|
||||
--tl-ink: var(--color-ink);
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.site-tl {
|
||||
.ngu-tl {
|
||||
--tl-gutter: 3rem;
|
||||
--tl-rail-x: 1rem;
|
||||
}
|
||||
|
|
@ -34,13 +34,13 @@
|
|||
|
||||
/* --- Decade block ----------------------------------------------- */
|
||||
|
||||
.site-tl__decade {
|
||||
.ngu-tl__decade {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* The rail. One per decade block so the pre-program run can change style
|
||||
without breaking the line's continuity. */
|
||||
.site-tl__decade::before {
|
||||
.ngu-tl__decade::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -50,25 +50,25 @@
|
|||
background: var(--tl-rail);
|
||||
}
|
||||
|
||||
.site-tl__decade--pre::before {
|
||||
.ngu-tl__decade--pre::before {
|
||||
background: none;
|
||||
border-left: var(--tl-rail-w) dashed var(--tl-rail);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/* Last decade fades out rather than stopping dead. */
|
||||
.site-tl__decade:last-child::before {
|
||||
.ngu-tl__decade:last-child::before {
|
||||
bottom: 2rem;
|
||||
mask-image: linear-gradient(to bottom, #000 60%, transparent);
|
||||
}
|
||||
|
||||
.site-tl__decade--pre {
|
||||
.ngu-tl__decade--pre {
|
||||
color: var(--tl-muted);
|
||||
}
|
||||
|
||||
/* --- Decade header ----------------------------------------------- */
|
||||
|
||||
.site-tl__decadeHead {
|
||||
.ngu-tl__decadeHead {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: var(--tl-gutter) minmax(0, 1fr);
|
||||
|
|
@ -76,12 +76,12 @@
|
|||
padding-block: 3.5rem 1.75rem;
|
||||
}
|
||||
|
||||
.site-tl__decade:first-child .site-tl__decadeHead {
|
||||
.ngu-tl__decade:first-child .ngu-tl__decadeHead {
|
||||
padding-block-start: 0.5rem;
|
||||
}
|
||||
|
||||
/* Numeral breaks the rail. */
|
||||
.site-tl__decadeNum {
|
||||
.ngu-tl__decadeNum {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
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);
|
||||
}
|
||||
|
||||
.site-tl__decade--pre .site-tl__decadeNum {
|
||||
.ngu-tl__decade--pre .ngu-tl__decadeNum {
|
||||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__decadeTitle {
|
||||
.ngu-tl__decadeTitle {
|
||||
font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
|
||||
font-weight: 600;
|
||||
line-height: 1.12;
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
max-width: 22ch;
|
||||
}
|
||||
|
||||
.site-tl__decadeTagline {
|
||||
.ngu-tl__decadeTagline {
|
||||
margin: 0.5rem 0 0;
|
||||
font-size: 1.0625rem;
|
||||
line-height: 1.5;
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
max-width: 54ch;
|
||||
}
|
||||
|
||||
.site-tl__decadeBlurb {
|
||||
.ngu-tl__decadeBlurb {
|
||||
margin: 0.875rem 0 0;
|
||||
font-size: 0.9375rem;
|
||||
line-height: 1.65;
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
max-width: 62ch;
|
||||
}
|
||||
|
||||
.site-tl__gapNote {
|
||||
.ngu-tl__gapNote {
|
||||
margin: 1rem 0 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
|
@ -140,11 +140,11 @@
|
|||
|
||||
/* --- Year node ------------------------------------------------ */
|
||||
|
||||
.site-tl__year {
|
||||
.ngu-tl__year {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.site-tl__yearBtn {
|
||||
.ngu-tl__yearBtn {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
|
|
@ -161,18 +161,18 @@
|
|||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.site-tl__yearBtn:hover .site-tl__yearLabel {
|
||||
.ngu-tl__yearBtn:hover .ngu-tl__yearLabel {
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.site-tl__yearBtn:focus-visible {
|
||||
.ngu-tl__yearBtn:focus-visible {
|
||||
outline: 2px solid var(--tl-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
.site-tl__dot {
|
||||
.ngu-tl__dot {
|
||||
position: relative;
|
||||
justify-self: start;
|
||||
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;
|
||||
}
|
||||
|
||||
.site-tl__yearBtn:hover .site-tl__dot {
|
||||
.ngu-tl__yearBtn:hover .ngu-tl__dot {
|
||||
background: var(--tl-accent);
|
||||
}
|
||||
|
||||
.site-tl__year--featured .site-tl__dot {
|
||||
.ngu-tl__year--featured .ngu-tl__dot {
|
||||
background: var(--tl-accent);
|
||||
}
|
||||
|
||||
.site-tl__year--featured .site-tl__dot::after {
|
||||
.ngu-tl__year--featured .ngu-tl__dot::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -5px;
|
||||
|
|
@ -201,17 +201,17 @@
|
|||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.site-tl__year--open .site-tl__dot {
|
||||
.ngu-tl__year--open .ngu-tl__dot {
|
||||
background: var(--tl-accent);
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.site-tl__decade--pre .site-tl__dot {
|
||||
.ngu-tl__decade--pre .ngu-tl__dot {
|
||||
background: var(--tl-surface);
|
||||
border: 1.5px solid var(--tl-rail);
|
||||
}
|
||||
|
||||
.site-tl__yearLabel {
|
||||
.ngu-tl__yearLabel {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 550;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
|
@ -219,41 +219,41 @@
|
|||
transition: color 140ms ease;
|
||||
}
|
||||
|
||||
.site-tl__yearCount {
|
||||
.ngu-tl__yearCount {
|
||||
font-size: 0.8125rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--tl-faint);
|
||||
padding-right: 0.25rem;
|
||||
}
|
||||
|
||||
.site-tl__year--empty .site-tl__yearLabel {
|
||||
.ngu-tl__year--empty .ngu-tl__yearLabel {
|
||||
color: var(--tl-faint);
|
||||
font-weight: 450;
|
||||
}
|
||||
|
||||
/* --- Expanded panel ------------------------------------------- */
|
||||
|
||||
.site-tl__panel {
|
||||
.ngu-tl__panel {
|
||||
padding: 0.25rem 0 1.5rem var(--tl-gutter);
|
||||
animation: site-tl-reveal 220ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
|
||||
animation: ngu-tl-reveal 220ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
|
||||
}
|
||||
|
||||
@keyframes site-tl-reveal {
|
||||
@keyframes ngu-tl-reveal {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
.site-tl__month {
|
||||
.ngu-tl__month {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.site-tl__month:first-child {
|
||||
.ngu-tl__month:first-child {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.site-tl__monthLabel {
|
||||
.ngu-tl__monthLabel {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
|
|
@ -263,7 +263,7 @@
|
|||
color: var(--tl-muted);
|
||||
}
|
||||
|
||||
.site-tl__monthLabel::after {
|
||||
.ngu-tl__monthLabel::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
|
|
@ -271,13 +271,13 @@
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.site-tl__undated .site-tl__monthLabel {
|
||||
.ngu-tl__undated .ngu-tl__monthLabel {
|
||||
font-style: italic;
|
||||
font-weight: 450;
|
||||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__list {
|
||||
.ngu-tl__list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
@ -288,7 +288,7 @@
|
|||
|
||||
/* --- Entry ----------------------------------------------------- */
|
||||
|
||||
.site-tl__entry {
|
||||
.ngu-tl__entry {
|
||||
display: grid;
|
||||
grid-template-columns: 2.75rem minmax(0, 1fr);
|
||||
gap: 0.75rem;
|
||||
|
|
@ -298,16 +298,16 @@
|
|||
color: inherit;
|
||||
}
|
||||
|
||||
a.site-tl__entry:hover {
|
||||
a.ngu-tl__entry:hover {
|
||||
background: var(--tl-accent-soft);
|
||||
}
|
||||
|
||||
a.site-tl__entry:focus-visible {
|
||||
a.ngu-tl__entry:focus-visible {
|
||||
outline: 2px solid var(--tl-accent);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.site-tl__entryDay {
|
||||
.ngu-tl__entryDay {
|
||||
font-size: 0.8125rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--tl-faint);
|
||||
|
|
@ -315,25 +315,25 @@ a.site-tl__entry:focus-visible {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
.site-tl__entryTitle {
|
||||
.ngu-tl__entryTitle {
|
||||
display: block;
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
a.site-tl__entry:hover .site-tl__entryTitle {
|
||||
a.ngu-tl__entry:hover .ngu-tl__entryTitle {
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.site-tl__entryMeta {
|
||||
.ngu-tl__entryMeta {
|
||||
display: block;
|
||||
margin-top: 0.125rem;
|
||||
font-size: 0.8125rem;
|
||||
color: var(--tl-muted);
|
||||
}
|
||||
|
||||
.site-tl__entryBlurb {
|
||||
.ngu-tl__entryBlurb {
|
||||
margin: 0.375rem 0 0;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.6;
|
||||
|
|
@ -343,7 +343,7 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
|||
|
||||
/* Kind marker: a shape, not a colored pill, so a screenful of entries stays
|
||||
calm and the type still carries the hierarchy. */
|
||||
.site-tl__kind {
|
||||
.ngu-tl__kind {
|
||||
display: inline-block;
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
|
|
@ -352,20 +352,20 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
|||
background: var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__kind--milestone {
|
||||
.ngu-tl__kind--milestone {
|
||||
border-radius: 50%;
|
||||
background: var(--tl-accent);
|
||||
}
|
||||
|
||||
.site-tl__kind--event {
|
||||
.ngu-tl__kind--event {
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.site-tl__kind--award {
|
||||
.ngu-tl__kind--award {
|
||||
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
|
||||
}
|
||||
|
||||
.site-tl__kind--person {
|
||||
.ngu-tl__kind--person {
|
||||
border-radius: 50%;
|
||||
background: none;
|
||||
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
||||
|
|
@ -373,14 +373,14 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
|||
|
||||
/* --- Featured entries ----------------------------------------- */
|
||||
|
||||
.site-tl__featured {
|
||||
.ngu-tl__featured {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.site-tl__entry--featured {
|
||||
.ngu-tl__entry--featured {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
padding: 1rem 1.125rem;
|
||||
border-left: 2px solid var(--tl-accent);
|
||||
|
|
@ -388,33 +388,33 @@ a.site-tl__entry:hover .site-tl__entryTitle {
|
|||
border-radius: 0 0.5rem 0.5rem 0;
|
||||
}
|
||||
|
||||
.site-tl__entry--featured .site-tl__entryTitle {
|
||||
.ngu-tl__entry--featured .ngu-tl__entryTitle {
|
||||
font-size: 1.0625rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.008em;
|
||||
}
|
||||
|
||||
.site-tl__entry--featured .site-tl__entryDay {
|
||||
.ngu-tl__entry--featured .ngu-tl__entryDay {
|
||||
text-align: left;
|
||||
padding: 0 0 0.25rem;
|
||||
}
|
||||
|
||||
a.site-tl__entry--featured:hover {
|
||||
a.ngu-tl__entry--featured:hover {
|
||||
background: color-mix(in srgb, var(--tl-accent) 18%, transparent);
|
||||
}
|
||||
|
||||
/* --- Empty state ----------------------------------------------- */
|
||||
|
||||
.site-tl__empty {
|
||||
.ngu-tl__empty {
|
||||
padding: 0.5rem 0 1.25rem var(--tl-gutter);
|
||||
font-size: 0.875rem;
|
||||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.site-tl *,
|
||||
.site-tl *::before,
|
||||
.site-tl *::after {
|
||||
.ngu-tl *,
|
||||
.ngu-tl *::before,
|
||||
.ngu-tl *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
|
|
@ -422,13 +422,13 @@ a.site-tl__entry--featured:hover {
|
|||
|
||||
/* --- Toolbar + utilities ------------------------------------- */
|
||||
|
||||
.site-tl__toolbar {
|
||||
.ngu-tl__toolbar {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.site-tl__toolbarBtn {
|
||||
.ngu-tl__toolbarBtn {
|
||||
padding: 0.375rem 0.75rem;
|
||||
border: 1px solid var(--tl-rail);
|
||||
border-radius: 999px;
|
||||
|
|
@ -440,23 +440,23 @@ a.site-tl__entry--featured:hover {
|
|||
transition: color 140ms ease, border-color 140ms ease;
|
||||
}
|
||||
|
||||
.site-tl__toolbarBtn:hover {
|
||||
.ngu-tl__toolbarBtn:hover {
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
border-color: var(--tl-accent);
|
||||
}
|
||||
|
||||
.site-tl__toolbarBtn:focus-visible {
|
||||
.ngu-tl__toolbarBtn:focus-visible {
|
||||
outline: 2px solid var(--tl-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.site-tl__emptyState {
|
||||
.ngu-tl__emptyState {
|
||||
padding: 3rem 0;
|
||||
color: var(--tl-muted);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.site-tl__srOnly {
|
||||
.ngu-tl__srOnly {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
|
|
@ -472,14 +472,14 @@ a.site-tl__entry--featured:hover {
|
|||
Opens upward: the toggle is first in the DOM, column-reverse puts the
|
||||
list above it. Faded because none of it has happened yet. */
|
||||
|
||||
.site-tl__upcoming {
|
||||
.ngu-tl__upcoming {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.site-tl__upcoming::before {
|
||||
.ngu-tl__upcoming::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 1.25rem;
|
||||
|
|
@ -488,7 +488,7 @@ a.site-tl__entry--featured:hover {
|
|||
border-left: var(--tl-rail-w) dashed var(--tl-rail);
|
||||
}
|
||||
|
||||
.site-tl__upcomingBtn {
|
||||
.ngu-tl__upcomingBtn {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
|
|
@ -504,17 +504,17 @@ a.site-tl__entry--featured:hover {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.site-tl__upcomingBtn:hover {
|
||||
.ngu-tl__upcomingBtn:hover {
|
||||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.site-tl__upcomingBtn:focus-visible {
|
||||
.ngu-tl__upcomingBtn:focus-visible {
|
||||
outline: 2px solid var(--tl-accent);
|
||||
outline-offset: 2px;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.site-tl__upcomingDot {
|
||||
.ngu-tl__upcomingDot {
|
||||
justify-self: start;
|
||||
margin-left: calc(var(--tl-rail-x) - 4px + (var(--tl-rail-w) / 2));
|
||||
width: 8px;
|
||||
|
|
@ -524,32 +524,32 @@ a.site-tl__entry--featured:hover {
|
|||
box-shadow: 0 0 0 4px var(--tl-surface);
|
||||
}
|
||||
|
||||
.site-tl__upcomingLabel {
|
||||
.ngu-tl__upcomingLabel {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.site-tl__chevron {
|
||||
.ngu-tl__chevron {
|
||||
font-size: 0.75rem;
|
||||
padding-right: 0.25rem;
|
||||
}
|
||||
|
||||
/* Everything above the toggle is provisional, and reads that way. */
|
||||
.site-tl__upcomingList {
|
||||
.ngu-tl__upcomingList {
|
||||
opacity: 0.62;
|
||||
animation: site-tl-rise 240ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
|
||||
animation: ngu-tl-rise 240ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
|
||||
}
|
||||
|
||||
.site-tl__upcomingList:hover,
|
||||
.site-tl__upcomingList:focus-within {
|
||||
.ngu-tl__upcomingList:hover,
|
||||
.ngu-tl__upcomingList:focus-within {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.site-tl__upcomingList .site-tl__dot {
|
||||
.ngu-tl__upcomingList .ngu-tl__dot {
|
||||
background: var(--tl-surface);
|
||||
border: 1.5px dashed var(--tl-accent);
|
||||
}
|
||||
|
||||
@keyframes site-tl-rise {
|
||||
@keyframes ngu-tl-rise {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
|
|
@ -558,7 +558,7 @@ a.site-tl__entry--featured:hover {
|
|||
|
||||
/* --- Event / org / award logo --------------------------------- */
|
||||
|
||||
.site-tl__logo {
|
||||
.ngu-tl__logo {
|
||||
display: inline-block;
|
||||
width: 1.125rem;
|
||||
height: 1.125rem;
|
||||
|
|
@ -568,14 +568,7 @@ a.site-tl__entry--featured:hover {
|
|||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
.ngu-tl__entry--featured .ngu-tl__logo {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
vertical-align: -0.3125rem;
|
||||
|
|
@ -583,15 +576,15 @@ a.site-tl__entry--featured:hover {
|
|||
|
||||
/* --- People roster ------------------------------------------- */
|
||||
|
||||
.site-tl__entryWrap {
|
||||
.ngu-tl__entryWrap {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-tl__roster {
|
||||
.ngu-tl__roster {
|
||||
padding: 0.125rem 0 0.5rem 3.5rem;
|
||||
}
|
||||
|
||||
.site-tl__roster--featured {
|
||||
.ngu-tl__roster--featured {
|
||||
padding: 0.5rem 1.125rem 1rem;
|
||||
border-left: 2px solid var(--tl-accent);
|
||||
background: var(--tl-accent-soft);
|
||||
|
|
@ -599,14 +592,14 @@ a.site-tl__entry--featured:hover {
|
|||
border-radius: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
.site-tl__rosterTeam {
|
||||
.ngu-tl__rosterTeam {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__people {
|
||||
.ngu-tl__people {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.375rem 1rem;
|
||||
|
|
@ -615,13 +608,13 @@ a.site-tl__entry--featured:hover {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.site-tl__person {
|
||||
.ngu-tl__person {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.site-tl__personPhoto {
|
||||
.ngu-tl__personPhoto {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
border-radius: 50%;
|
||||
|
|
@ -630,7 +623,7 @@ a.site-tl__entry--featured:hover {
|
|||
flex: none;
|
||||
}
|
||||
|
||||
.site-tl__personPhoto--blank {
|
||||
.ngu-tl__personPhoto--blank {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 0.625rem;
|
||||
|
|
@ -639,12 +632,12 @@ a.site-tl__entry--featured:hover {
|
|||
color: color-mix(in srgb, var(--tl-accent) var(--accent-text-mix), #fff);
|
||||
}
|
||||
|
||||
.site-tl__personName {
|
||||
.ngu-tl__personName {
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.site-tl__personTitle {
|
||||
.ngu-tl__personTitle {
|
||||
display: block;
|
||||
font-size: 0.6875rem;
|
||||
color: var(--tl-faint);
|
||||
|
|
@ -652,19 +645,19 @@ a.site-tl__entry--featured:hover {
|
|||
|
||||
/* --- Kind markers, continued --------------------------------- */
|
||||
|
||||
.site-tl__kind--organization {
|
||||
.ngu-tl__kind--organization {
|
||||
border-radius: 2px;
|
||||
background: none;
|
||||
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__kind--people {
|
||||
.ngu-tl__kind--people {
|
||||
border-radius: 50%;
|
||||
background: none;
|
||||
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
||||
}
|
||||
|
||||
.site-tl__entryBody {
|
||||
.ngu-tl__entryBody {
|
||||
display: block;
|
||||
min-width: 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue