Clean up code found in the audit
- Replace every em-dash in src and server/src with a colon, comma or hyphen - Give every relative import its file extension (.jsx imports of .tsx fixed) - Delete old-historyMock.ts, unused exports, unused CSS utilities, the unused @ alias and the fallback option nothing passed - One copy each of initials, capitalize, byName and the server's marks() - Move the organization, chapter and event hooks from src/data to src/lib - Schema sync always throws on a mismatch (strict was never turned off) - Replace the placeholder README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4066e9ec61
commit
5274e09571
75 changed files with 282 additions and 688 deletions
|
|
@ -1,14 +1,14 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
AWARD DETAIL — /awards/:id
|
||||
AWARD DETAIL: /awards/:id
|
||||
|
||||
The thinnest of the four, by design. `awards` has no links and no
|
||||
content blocks — 'award' isn't in the owner_kind CHECK on either
|
||||
content blocks, 'award' isn't in the owner_kind CHECK on either
|
||||
polymorphic table, and widening it means rebuilding two STRICT
|
||||
tables. `description` is the prose.
|
||||
|
||||
So the recipients are the page. They're rendered as a list rather
|
||||
than as PeopleTiles because each one carries a citation, and a
|
||||
citation is the point of an award — it doesn't belong folded
|
||||
citation is the point of an award, it doesn't belong folded
|
||||
behind a chevron.
|
||||
|
||||
Note also that `awards` has no is_published column: every row
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
EVENT DETAIL — /retreats/:id
|
||||
EVENT DETAIL: /retreats/:id
|
||||
|
||||
Reached from the cards on Retreats.tsx. The API has already
|
||||
resolved the fallbacks — `color` is the event's own or its first
|
||||
host's, `status` is derived from the dates when nobody set it —
|
||||
resolved the fallbacks, `color` is the event's own or its first
|
||||
host's, `status` is derived from the dates when nobody set it,
|
||||
so nothing here reimplements those rules.
|
||||
|
||||
Hosts arrive as a list in billing order, each one either an
|
||||
|
|
@ -33,12 +33,13 @@ import { awardHref, personHref, refHref } from '../lib/hrefs.ts'
|
|||
import { personPhoto } from '../lib/media.ts'
|
||||
import { eventTypeLabel } from '../lib/eventTypes.ts'
|
||||
import { occurrenceLabel, seriesLabel, seriesTimes, upcomingOccurrences } from '../lib/eventSeries.ts'
|
||||
import { capitalize } from '../lib/text.ts'
|
||||
|
||||
const TEAL = '#138ba0'
|
||||
const BODY = '#4a6b72'
|
||||
|
||||
/* Billing order. A role missing from here still renders, at the
|
||||
end, under its own name — better than a speaker vanishing
|
||||
end, under its own name, better than a speaker vanishing
|
||||
because somebody added a role to the CHECK and not to this list. */
|
||||
const ROLE_ORDER = [
|
||||
'speaker',
|
||||
|
|
@ -262,7 +263,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
|||
{/* Outlined rather than filled: the status pill is the one
|
||||
thing in this strip that should read as loud, and two
|
||||
solid blocks side by side would compete. Shown
|
||||
unconditionally — a card suppresses its own type badge in
|
||||
unconditionally, a card suppresses its own type badge in
|
||||
a band of one kind, but here there is no band to make it
|
||||
redundant. */}
|
||||
{event.event_type && (
|
||||
|
|
@ -297,7 +298,7 @@ function Facts({ event, accent }: { event: EventRecord; accent: string }) {
|
|||
/* One host reads as "Hosted by Northwest"; several read as a
|
||||
sentence, so they're joined with commas and an "and" rather than
|
||||
stacked. A host whose id didn't resolve to a route renders as
|
||||
plain text — refHref returns null for that — because a dead link
|
||||
plain text, refHref returns null for that, because a dead link
|
||||
is worse than a name. */
|
||||
function HostList({ hosts, accent }: { hosts: EventHost[]; accent: string }) {
|
||||
return (
|
||||
|
|
@ -327,7 +328,7 @@ function HostList({ hosts, accent }: { hosts: EventHost[]; accent: string }) {
|
|||
)
|
||||
}
|
||||
|
||||
/* date_label is what a card shows and is free text — "March/April
|
||||
/* date_label is what a card shows and is free text, "March/April
|
||||
2026" is legitimate. This is only the fallback for an event that
|
||||
has dates and no label. */
|
||||
function dateRange(start?: string | null, end?: string | null): string | null {
|
||||
|
|
@ -398,4 +399,3 @@ function peopleGroups(people: EventPerson[], accent: string): PeopleGroupInput[]
|
|||
}))
|
||||
}
|
||||
|
||||
const capitalize = (word: string) => word.charAt(0).toUpperCase() + word.slice(1)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import PageShell from "../components/PageShell";
|
||||
import PageShell from "../components/PageShell.tsx";
|
||||
import { sitePage } from "../lib/site.ts";
|
||||
import FeedbackForm from "./sections/FeedbackForm";
|
||||
import FeedbackForm from "./sections/FeedbackForm.tsx";
|
||||
|
||||
/* Title and intro: site.json, which also gives the search metadata. */
|
||||
const PAGE = sitePage("/feedback");
|
||||
|
|
@ -9,7 +9,7 @@ const PAGE = sitePage("/feedback");
|
|||
Feedback page.
|
||||
|
||||
Section ids match the nav hashes. Right now there's one:
|
||||
#website. Add more entries to SECTIONS as the page grows —
|
||||
#website. Add more entries to SECTIONS as the page grows,
|
||||
program feedback, retreat surveys, etc.
|
||||
|
||||
The form itself lives in sections/FeedbackForm, including its
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import PageShell from "../components/PageShell";
|
||||
import PageShell from "../components/PageShell.tsx";
|
||||
import { sitePage } from "../lib/site.ts";
|
||||
import HistoryTimeline from "./sections/history/HistoryTimeline";
|
||||
import { HISTORY_DECADES } from "../data/historyDecades";
|
||||
import { useHistory } from "../lib/useHistory";
|
||||
import HistoryTimeline from "./sections/history/HistoryTimeline.tsx";
|
||||
import { HISTORY_DECADES } from "../data/historyDecades.ts";
|
||||
import { useHistory } from "../lib/useHistory.ts";
|
||||
|
||||
/* Title and intro: site.json, which also gives the search metadata. */
|
||||
const PAGE = sitePage("/history");
|
||||
|
|
@ -10,7 +10,7 @@ const PAGE = sitePage("/history");
|
|||
/**
|
||||
* Year the program starts. Decades ending before this render with the
|
||||
* pre-program treatment, so the gap moves if the founding date is ever
|
||||
* corrected — no hardcoded 2000 anywhere in the components.
|
||||
* corrected, no hardcoded 2000 anywhere in the components.
|
||||
*/
|
||||
const PROGRAM_START_YEAR = 2000;
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ export default function History() {
|
|||
|
||||
// Section renders `content` outside its own max-width wrapper, so the
|
||||
// container lives here. The custom properties bind the timeline to
|
||||
// this section's accent and background — --tl-surface must match
|
||||
// this section's accent and background, --tl-surface must match
|
||||
// `background` or the rail will show through the year dots.
|
||||
const wrap = (children: React.ReactNode) => (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
HOME — /
|
||||
HOME: /
|
||||
|
||||
Not a PageShell page: the front page has no title bar, and each
|
||||
band draws its own heading in its own style.
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
The hero comes first, always. After it, the bands in the order
|
||||
the admin dragged them into, minus any they hid. Which component
|
||||
draws a band is decided here, in SECTIONS, keyed on the same list
|
||||
the CHECK on front_page_sections holds — the database says "retreats,
|
||||
the CHECK on front_page_sections holds, the database says "retreats,
|
||||
third, called National Retreats"; this file says what a retreats
|
||||
band looks like.
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ type BandProps = {
|
|||
}
|
||||
|
||||
/* Default headings for a band the admin didn't title, and how each
|
||||
one renders. The ids are the page anchors — #connect is what the
|
||||
one renders. The ids are the page anchors, #connect is what the
|
||||
hero's second button points at out of the box. */
|
||||
const SECTIONS: Record<
|
||||
FrontPageSectionKey,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
One component behind four routes, because organizations are one
|
||||
table. The kind decides which extras render, not which file runs.
|
||||
|
||||
The URL kind is decoration — the slug is what identifies the
|
||||
record — so a request for /chapters/great-lakes when that slug is
|
||||
The URL kind is decoration, the slug is what identifies the
|
||||
record, so a request for /chapters/great-lakes when that slug is
|
||||
a region redirects to the canonical path rather than rendering a
|
||||
correct page at a wrong address.
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ export default function OrganizationDetail() {
|
|||
// /chapters/x when x is a region: same record, wrong address.
|
||||
//
|
||||
// useLocation, not window.location: the latter is outside the
|
||||
// router's awareness — always "/" under HashRouter, and free to
|
||||
// router's awareness, always "/" under HashRouter, and free to
|
||||
// be stale mid-navigation, either of which turns this into a
|
||||
// redirect loop rather than a one-shot correction.
|
||||
//
|
||||
|
|
@ -232,7 +232,7 @@ export default function OrganizationDetail() {
|
|||
})
|
||||
}
|
||||
|
||||
// EventList-Cards fetches and renders this itself — its own
|
||||
// EventList-Cards fetches and renders this itself, its own
|
||||
// docstring offers `host` for exactly this case, and a card there
|
||||
// already knows about gradients, logos, past-event collapsing and
|
||||
// the carousel. A second grid here was the same component written
|
||||
|
|
@ -414,7 +414,7 @@ function groupLeadership(org: OrganizationRecord): TeamBlock[] {
|
|||
const blocks: TeamBlock[] = []
|
||||
|
||||
// People who hold a role in the organization without sitting on a
|
||||
// team. Usually the leads. No heading — they are the page.
|
||||
// team. Usually the leads. No heading, they are the page.
|
||||
if (loose.length > 0) {
|
||||
blocks.push({ key: 'loose', teamId: null, label: null, people: loose })
|
||||
}
|
||||
|
|
@ -432,7 +432,7 @@ function groupLeadership(org: OrganizationRecord): TeamBlock[] {
|
|||
}
|
||||
|
||||
// Whatever is left is filed under an unpublished team. Its page
|
||||
// isn't reachable, so the heading is plain text — but the people
|
||||
// isn't reachable, so the heading is plain text, but the people
|
||||
// are real and shouldn't silently vanish from the org.
|
||||
for (const [teamId, people] of byTeam) {
|
||||
blocks.push({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
PERSON DETAIL — /people/:id
|
||||
PERSON DETAIL: /people/:id
|
||||
|
||||
Everything public that points at one person, gathered by
|
||||
GET /people/:id in people.js. Visibility is decided there, the
|
||||
|
|
@ -33,6 +33,7 @@ import {
|
|||
import { awardHref, eventHref, orgHref, teamHref } from '../lib/hrefs.ts'
|
||||
import { initials, personPhoto } from '../lib/media.ts'
|
||||
import { eventTypeLabel } from '../lib/eventTypes.ts'
|
||||
import { capitalize } from '../lib/text.ts'
|
||||
|
||||
const TEAL = '#138ba0'
|
||||
const BODY = '#4a6b72'
|
||||
|
|
@ -47,8 +48,6 @@ const ROLE_LABEL: Record<string, string> = {
|
|||
member: 'Member',
|
||||
}
|
||||
|
||||
const capitalize = (word: string) =>
|
||||
word ? word.charAt(0).toUpperCase() + word.slice(1) : ''
|
||||
|
||||
export default function PersonDetail() {
|
||||
const { id } = useParams()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import PageShell from "../components/PageShell.jsx";
|
||||
import PageShell from "../components/PageShell.tsx";
|
||||
import { sitePage } from "../lib/site.ts";
|
||||
|
||||
/* Title and intro: site.json, which also gives the search metadata. */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import PageShell from "../components/PageShell.jsx";
|
||||
import PageShell from "../components/PageShell.tsx";
|
||||
import { sitePage } from "../lib/site.ts";
|
||||
|
||||
/* Title and intro: site.json, which also gives the search metadata. */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const PAGE = sitePage("/retreats");
|
|||
RETREATS PAGE
|
||||
|
||||
Three bands, all the same view of the same table with a
|
||||
different filter. The page declares them and does nothing else —
|
||||
different filter. The page declares them and does nothing else,
|
||||
each section fetches its own slice.
|
||||
|
||||
Two filters per band now, and they answer different questions:
|
||||
|
|
@ -29,7 +29,7 @@ const PAGE = sitePage("/retreats");
|
|||
What this page deliberately does not show: local, international
|
||||
and other scopes, and every non-retreat type. Those are reachable
|
||||
from their host's page and by URL, and get a band here when
|
||||
there's enough of them to fill one — see the block at the bottom.
|
||||
there's enough of them to fill one, see the block at the bottom.
|
||||
|
||||
To reorder the page, move a line. To add a different kind of
|
||||
section, add an entry with another Component.
|
||||
|
|
@ -74,7 +74,7 @@ const SECTIONS = [
|
|||
},
|
||||
|
||||
/* The other three scopes, ready to uncomment. Each needs an accent
|
||||
and a background of its own — those are presentation and live
|
||||
and a background of its own, those are presentation and live
|
||||
here, not in event_scopes.
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
TEAM DETAIL — /teams/:id
|
||||
TEAM DETAIL: /teams/:id
|
||||
|
||||
teams.id is a global primary key rather than scoped to the
|
||||
organization, which is what lets this route be flat: 'ngu-board'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import PageShell from "../components/PageShell.jsx";
|
||||
import PageShell from "../components/PageShell.tsx";
|
||||
import { sitePage } from "../lib/site.ts";
|
||||
|
||||
/* Title and intro: site.json, which also gives the search metadata. */
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
edge and marked as continuing
|
||||
series every meeting the schedule produces in view (see
|
||||
eventSeries.ts), one day each, with its time
|
||||
undated nowhere — there's no day to put it on. Counted
|
||||
undated nowhere, there's no day to put it on. Counted
|
||||
under the grid so it doesn't vanish without a word.
|
||||
|
||||
Bars are laid out per week in lanes, so a long event keeps its
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
import { useMemo, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { typesPresent, useEvents } from '../../data/eventData.ts'
|
||||
import { typesPresent, useEvents } from '../../lib/eventData.ts'
|
||||
import { EVENT_TYPES, eventTypeLabel, type EventType } from '../../lib/eventTypes.ts'
|
||||
import { firstOccurrenceFrom, occurrencesBetween, seriesTimes } from '../../lib/eventSeries.ts'
|
||||
import { eventHref } from '../../lib/hrefs.ts'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { splitByStatus, typesPresent, useEvents } from "../../data/eventData.ts";
|
||||
import { splitByStatus, typesPresent, useEvents } from "../../lib/eventData.ts";
|
||||
import { eventHref } from "../../lib/hrefs.ts";
|
||||
import { EVENT_TYPES, eventTypeLabel } from "../../lib/eventTypes.ts";
|
||||
import { seriesLabel } from "../../lib/eventSeries.ts";
|
||||
|
|
@ -8,7 +8,7 @@ import PlatformIcon from "../../components/PlatformIcon.tsx";
|
|||
import { eventBackground, eventLogo as eventLogoSrc, orgLogo as orgLogoSrc } from "../../lib/media.ts";
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
EVENT LIST — CARDS
|
||||
EVENT LIST: CARDS
|
||||
|
||||
A band of event cards, as a peek carousel or a grid. Self
|
||||
contained: give it a filter and it fetches, so the same section
|
||||
|
|
@ -23,7 +23,7 @@ import { eventBackground, eventLogo as eventLogoSrc, orgLogo as orgLogoSrc } fro
|
|||
|
||||
`type` pre-filters the band the way `scope` and `host` do. Left
|
||||
off, the band takes every kind it finds and grows a row of chips
|
||||
to narrow by — but only once it holds more than one, so a band of
|
||||
to narrow by, but only once it holds more than one, so a band of
|
||||
nothing but retreats shows no control at all.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ const PAST_FADE = "linear-gradient(to bottom, black 0%, black 45%, transparent 1
|
|||
|
||||
/* ── Carousel sizing ──────────────────────────────────────────
|
||||
CARD the card itself
|
||||
GAP space between cards — raise to push neighbors out
|
||||
GAP space between cards, raise to push neighbors out
|
||||
FADE_DIST how far past the card's edge neighbors fade to nothing
|
||||
───────────────────────────────────────────────────────────── */
|
||||
const CARD = "min(48rem, 90vw)";
|
||||
|
|
@ -113,7 +113,7 @@ const EDGE_FADE = `linear-gradient(to right,
|
|||
A link on the title rather than a wrapper around the whole card:
|
||||
the footer already holds anchors, and an anchor inside an anchor
|
||||
is invalid markup that every browser resolves by guessing. The
|
||||
carousel has the same constraint — it needs the card's click to
|
||||
carousel has the same constraint, it needs the card's click to
|
||||
mean "bring this one to the front" on anything that isn't the
|
||||
active slide. */
|
||||
function TitleLink({ ev, linked, children }) {
|
||||
|
|
@ -126,7 +126,7 @@ function TitleLink({ ev, linked, children }) {
|
|||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
EVENT CARD — one component, two sizes.
|
||||
EVENT CARD: one component, two sizes.
|
||||
compact=false → the full card used in the carousel
|
||||
compact=true → the grid card: details left, text right, and a
|
||||
footer pinned to the bottom so every card in a
|
||||
|
|
@ -136,9 +136,9 @@ function TitleLink({ ev, linked, children }) {
|
|||
page or a home strip can render one without the section around
|
||||
it.
|
||||
|
||||
Fields arrive pre-resolved from the API — `color` is the event's
|
||||
Fields arrive pre-resolved from the API: `color` is the event's
|
||||
own or its host's, `status` is derived from the dates when it
|
||||
isn't set — so nothing here reimplements those rules.
|
||||
isn't set, so nothing here reimplements those rules.
|
||||
|
||||
`linked` is the one thing a caller turns off: a card on the
|
||||
event's own page shouldn't link to the page it's already on.
|
||||
|
|
@ -165,7 +165,7 @@ export function Card({
|
|||
|
||||
/* Off unless the caller says the band is mixed. A "Retreat" badge
|
||||
on every card in a row of nothing but retreats is noise, and
|
||||
the card can't tell on its own — it only ever sees one event. */
|
||||
the card can't tell on its own, it only ever sees one event. */
|
||||
const typeBadge =
|
||||
showType && ev.event_type ? (
|
||||
<span
|
||||
|
|
@ -262,14 +262,14 @@ export function Card({
|
|||
</>
|
||||
)}
|
||||
|
||||
{/* Footer — mt-auto pins the whole block to the bottom so
|
||||
{/* Footer, mt-auto pins the whole block to the bottom so
|
||||
buttons line up across every card in a grid row.
|
||||
|
||||
Three registration states, as before: links to follow, a
|
||||
past event, or an announcement still to come. What's new
|
||||
is that all three end in the same row, because every
|
||||
event now has a page and a past one is often the more
|
||||
worth reading — speakers, awards, what actually
|
||||
worth reading, speakers, awards, what actually
|
||||
happened. The notice is what changes; the way in
|
||||
doesn't. */}
|
||||
<div className={`mt-auto ${compact ? "pt-6" : "pt-8"}`}>
|
||||
|
|
@ -306,7 +306,7 @@ export function Card({
|
|||
))}
|
||||
|
||||
{/* Only when there's nothing to register for and the
|
||||
event hasn't happened — the same condition as before,
|
||||
event hasn't happened, the same condition as before,
|
||||
just no longer nested inside that branch. */}
|
||||
{igHandle && !past && links.length === 0 && (
|
||||
<a
|
||||
|
|
@ -346,7 +346,7 @@ export function Card({
|
|||
TYPE FILTER
|
||||
|
||||
Drawn only when a band actually holds more than one kind, so it
|
||||
costs nothing today — every event is a retreat — and appears on
|
||||
costs nothing today, every event is a retreat, and appears on
|
||||
its own the first time a class or a workshop lands in that band.
|
||||
Nothing on Retreats.tsx has to be reconfigured for it.
|
||||
|
||||
|
|
@ -387,7 +387,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
|
|||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
TOGGLE — the control for the section heading's action bar
|
||||
TOGGLE: the control for the section heading's action bar
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
export function EventCardsToggle({ view, setView, accent }) {
|
||||
const btn = active => ({
|
||||
|
|
@ -437,8 +437,8 @@ export function EventCardsToggle({ view, setView, accent }) {
|
|||
Fetches its own slice of the events, then draws it as a carousel
|
||||
or a grid.
|
||||
|
||||
An empty list means three different things now — still loading,
|
||||
failed, or genuinely nothing scheduled — and they read very
|
||||
An empty list means three different things now, still loading,
|
||||
failed, or genuinely nothing scheduled, and they read very
|
||||
differently to someone waiting, so they're distinguished rather
|
||||
than all falling through to "coming soon".
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
|
@ -464,7 +464,7 @@ export default function EventListCards({
|
|||
const [showPast, setShowPast] = useState(false);
|
||||
const [activeType, setActiveType] = useState("all");
|
||||
|
||||
/* What this band holds, which is what the chips offer — not the
|
||||
/* What this band holds, which is what the chips offer, not the
|
||||
full list of declared types, three quarters of which would be
|
||||
dead buttons. */
|
||||
const availableTypes = useMemo(
|
||||
|
|
@ -483,7 +483,7 @@ export default function EventListCards({
|
|||
);
|
||||
|
||||
/* Open on the first upcoming event. The list is empty on the
|
||||
first render, so this can't be a useState initialiser — it has
|
||||
first render, so this can't be a useState initialiser, it has
|
||||
to wait for the data and then run once. Clearing the guard when
|
||||
the list empties means a refetch re-seeds. */
|
||||
const seeded = useRef(false);
|
||||
|
|
@ -546,7 +546,7 @@ export default function EventListCards({
|
|||
if (error && events.length === 0) {
|
||||
return (
|
||||
<div className="overflow-hidden">
|
||||
{notice("· Events couldn't be loaded just now — please try again shortly ·")}
|
||||
{notice("· Events couldn't be loaded just now, please try again shortly ·")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -572,7 +572,7 @@ export default function EventListCards({
|
|||
: `· No ${eventTypeLabel(activeType).toLowerCase()} events in this section yet ·`,
|
||||
)
|
||||
) : view === "grid" ? (
|
||||
/* ── GRID VIEW — upcoming first, past events collapsed below ── */
|
||||
/* ── GRID VIEW: upcoming first, past events collapsed below ── */
|
||||
<div className="mx-auto px-8 md:px-12 lg:px-16" style={{ maxWidth: GRID_MAX }}>
|
||||
{upcoming.length > 0 && (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ export default function FeedbackForm() {
|
|||
className="rounded-2xl border border-[#138ba0]/20 bg-white p-8 sm:p-10"
|
||||
>
|
||||
<h3 className="text-2xl font-bold" style={{ color: ACCENT }}>
|
||||
Thanks — we've got it
|
||||
Thanks, we've got it
|
||||
</h3>
|
||||
{where && (
|
||||
<p className="mt-3 text-sm" style={{ color: MUTED }}>
|
||||
|
|
@ -301,7 +301,7 @@ export default function FeedbackForm() {
|
|||
<p className="mt-3 max-w-prose" style={{ color: MUTED }}>
|
||||
{email
|
||||
? `We'll follow up at ${email} if we have questions.`
|
||||
: "You sent this anonymously, so we won't be able to reply — but we read everything that comes in."}
|
||||
: "You sent this anonymously, so we won't be able to reply, but we read everything that comes in."}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
|
|
@ -375,7 +375,7 @@ export default function FeedbackForm() {
|
|||
</div>
|
||||
<p className="mt-1 max-w-prose text-sm" style={{ color: MUTED }}>
|
||||
Leave these blank and your feedback comes through anonymously. Fill
|
||||
them in only if you'd like a reply — we won't add you to any list.
|
||||
them in only if you'd like a reply, we won't add you to any list.
|
||||
</p>
|
||||
|
||||
<div className="mt-5 grid gap-4 sm:grid-cols-2">
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import {
|
|||
initialsFor,
|
||||
orgPath,
|
||||
useOrganizations,
|
||||
} from "../../data/organizations.ts";
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST — CARDS
|
||||
ORGANIZATION LIST: CARDS
|
||||
|
||||
A grid of organization cards. No toggle: this view is the grid,
|
||||
which is why the section that uses it declares no `views` in the
|
||||
|
|
@ -19,7 +20,7 @@ import {
|
|||
Where the vertical list expands in place, a card links out. The
|
||||
card carries as much as fits at a glance and the organization's
|
||||
own page carries the rest, so nothing here reads a `blocks`
|
||||
array — only the short card description.
|
||||
array, only the short card description.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
const MUTED = "#7a9299";
|
||||
|
|
@ -87,11 +88,11 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
|
|||
|
||||
{/* Top-right rather than in the footer: the footer holds
|
||||
outbound links, and the arrow goes somewhere different
|
||||
in kind — deeper into this site. */}
|
||||
in kind, deeper into this site. */}
|
||||
{path && (
|
||||
<ArrowLink
|
||||
to={path}
|
||||
label={`${org.name} — ${pageLabel}`}
|
||||
label={`${org.name}: ${pageLabel}`}
|
||||
color={color}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -166,7 +167,6 @@ function Block({ title, orgs, accent, pageLabel, siteLabel }) {
|
|||
);
|
||||
}
|
||||
|
||||
const byName = (a, b) => a.name.localeCompare(b.name);
|
||||
|
||||
export default function OrgListCards({
|
||||
kind,
|
||||
|
|
@ -196,7 +196,7 @@ export default function OrgListCards({
|
|||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-600" style={{ color: accent }}>
|
||||
· This list couldn't be loaded just now — please try again shortly ·
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import { useEffect, useRef, useState } from "react";
|
||||
import { useCommunity } from "../../data/chapters.ts";
|
||||
import { useCommunity } from "../../lib/chapters.ts";
|
||||
import { Link } from "react-router-dom";
|
||||
import ArrowLink from "../../components/ArrowLink.tsx";
|
||||
import { orgLogo } from "../../lib/media.ts";
|
||||
import { initialsFor, orgPath } from "../../data/organizations.ts";
|
||||
import { initialsFor, orgPath } from "../../lib/organizations.ts";
|
||||
import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST — MAP
|
||||
ORGANIZATION LIST: MAP
|
||||
|
||||
Organizations placed on a tile grid: the map on the left, the
|
||||
list on the right, selecting on either side filtering both.
|
||||
|
|
@ -15,7 +15,7 @@ import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
|
|||
Filtered to chapters, and unlike the other sections that isn't
|
||||
a prop. A map only makes sense for organizations that sit
|
||||
somewhere, and it reads regions off the same data to colour the
|
||||
tiles — so "plot partners instead" isn't a filter change, it's a
|
||||
tiles, so "plot partners instead" isn't a filter change, it's a
|
||||
different component. Named for the view rather than the filter
|
||||
so that stays visible.
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
|
|||
stays legible on a phone, it needs no map library or GeoJSON,
|
||||
and a state split between two regions is just a tile painted in
|
||||
two colors. If you later want true geography, the swap point is
|
||||
<RegionMap> — everything else works off the data.
|
||||
<RegionMap>, everything else works off the data.
|
||||
|
||||
The tile layout comes from mapGrid.ts; who paints what comes
|
||||
from the API. A state and the Canada band are the same shape
|
||||
|
|
@ -109,7 +109,7 @@ function Blocks({ blocks = [] as any[], color }) {
|
|||
{item.detail && (
|
||||
<span className="text-sm" style={{ color: MUTED }}>
|
||||
{" "}
|
||||
— {item.detail}
|
||||
({item.detail})
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
|
|
@ -180,7 +180,7 @@ function Tile({
|
|||
className="transition-opacity duration-200"
|
||||
>
|
||||
<title>
|
||||
{AREA_NAMES[code] || code} — {slices.map(s => s.name).join(" / ")}
|
||||
{AREA_NAMES[code] || code}: {slices.map(s => s.name).join(" / ")}
|
||||
{count ? ` · ${count} chapter${count > 1 ? "s" : ""}` : ""}
|
||||
</title>
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ function RegionMap({ slices, chapterCounts, ...props }: any) {
|
|||
role="group"
|
||||
aria-label="Chapters by Unity region"
|
||||
>
|
||||
{/* States and bands are the same shape — a tile with a span —
|
||||
{/* States and bands are the same shape, a tile with a span,
|
||||
so this is one loop rather than two. */}
|
||||
{AREAS.map(area => (
|
||||
<Tile
|
||||
|
|
@ -386,7 +386,7 @@ function RegionBlock({
|
|||
{region.name}
|
||||
</h4>
|
||||
<span className="text-sm ml-auto" style={{ color: MUTED }}>
|
||||
{chapters.length || "—"}
|
||||
{chapters.length || "-"}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ function RegionBlock({
|
|||
|
||||
{chapters.length === 0 ? (
|
||||
<p className="text-sm ml-5 mb-4" style={{ color: MUTED }}>
|
||||
No chapters yet — interested in starting one?
|
||||
No chapters yet. Interested in starting one?
|
||||
</p>
|
||||
) : (
|
||||
<ul className="ml-5 mb-4 flex flex-col gap-3">
|
||||
|
|
@ -444,7 +444,7 @@ function RegionBlock({
|
|||
{orgPath(c) && (
|
||||
<ArrowLink
|
||||
to={orgPath(c)}
|
||||
label={`${c.name} — chapter page`}
|
||||
label={`${c.name}: chapter page`}
|
||||
color={colorOf(region)}
|
||||
size="h-8 w-8"
|
||||
/>
|
||||
|
|
@ -545,7 +545,7 @@ function ChapterCard({ chapter, color, open, onOpen }) {
|
|||
{orgPath(chapter) && (
|
||||
<ArrowLink
|
||||
to={orgPath(chapter)}
|
||||
label={`${chapter.name} — chapter page`}
|
||||
label={`${chapter.name}: chapter page`}
|
||||
color={color}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -711,7 +711,7 @@ function ChapterGrid({ regions, chapters, chaptersIn, subtextFor, openId, setOpe
|
|||
|
||||
{empty.length > 0 && (
|
||||
<p className="text-sm" style={{ color: MUTED }}>
|
||||
No chapters yet in {empty.map(r => r.name).join(", ")} — interested in
|
||||
No chapters yet in {empty.map(r => r.name).join(", ")}. Interested in
|
||||
starting one?
|
||||
</p>
|
||||
)}
|
||||
|
|
@ -835,7 +835,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
if (error && regions.length === 0) {
|
||||
return shell(
|
||||
<p className="font-600" style={{ color: accent }}>
|
||||
· Chapters couldn't be loaded just now — please try again shortly ·
|
||||
· Chapters couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
@ -871,7 +871,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
);
|
||||
|
||||
return (
|
||||
/* Wider than the section heading above it — the map needs the
|
||||
/* Wider than the section heading above it, the map needs the
|
||||
room. CONTENT_MAX is the knob; drop it toward 72rem to pull
|
||||
the whole block back in line with the heading. */
|
||||
shell(
|
||||
|
|
@ -897,7 +897,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
</p>
|
||||
</div>
|
||||
|
||||
{/* List — h-0 + min-h-full makes this column take its height
|
||||
{/* List, h-0 + min-h-full makes this column take its height
|
||||
from the map column rather than the other way round, so a
|
||||
long list scrolls instead of stretching the section. */}
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@ import {
|
|||
initialsFor,
|
||||
orgPath,
|
||||
useOrganizations,
|
||||
} from "../../data/organizations.ts";
|
||||
byName,
|
||||
} from "../../lib/organizations.ts";
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATION LIST — VERTICAL
|
||||
ORGANIZATION LIST: VERTICAL
|
||||
|
||||
A stack of organizations, each collapsed to a line and
|
||||
expandable for the rest. Every row carries two ways out: an
|
||||
|
|
@ -44,7 +45,7 @@ const FALLBACK_COLOR = "#4a6b72";
|
|||
|
||||
/* ── Row button ───────────────────────────────────────────────
|
||||
Deliberately a sibling of the summary button rather than inside
|
||||
it — a link nested in a button is invalid, and a screen reader
|
||||
it, a link nested in a button is invalid, and a screen reader
|
||||
announces the whole row as one confused control.
|
||||
───────────────────────────────────────────────────────────── */
|
||||
function RowButton({ as: As = "button", color, children, ...rest }: any) {
|
||||
|
|
@ -107,7 +108,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
|
|||
const chapterCount = (org.details?.chapters ?? []).length;
|
||||
const note = org.details?.map_note;
|
||||
|
||||
/* Collapsed, a row says who it is and nothing else — the areas
|
||||
/* Collapsed, a row says who it is and nothing else, the areas
|
||||
sentence runs long and lives in the panel, where it appears
|
||||
exactly once rather than in both places. */
|
||||
const summary = org.tagline;
|
||||
|
|
@ -181,7 +182,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
|
|||
{path && (
|
||||
<ArrowLink
|
||||
to={path}
|
||||
label={`${org.name} — ${pageLabel}`}
|
||||
label={`${org.name}: ${pageLabel}`}
|
||||
color={color}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -263,7 +264,6 @@ function Block({ title, orgs, pageLabel, siteLabel }) {
|
|||
);
|
||||
}
|
||||
|
||||
const byName = (a, b) => a.name.localeCompare(b.name);
|
||||
|
||||
export default function OrgListVertical({
|
||||
kind,
|
||||
|
|
@ -291,7 +291,7 @@ export default function OrgListVertical({
|
|||
if (error && organizations.length === 0) {
|
||||
return shell(
|
||||
<p className="font-600" style={{ color: accent }}>
|
||||
· This list couldn't be loaded just now — please try again shortly ·
|
||||
· This list couldn't be loaded just now, please try again shortly ·
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import {
|
|||
type DecadeMeta,
|
||||
type SortDirection,
|
||||
type TimelineItem,
|
||||
} from '../../../lib/timeline'
|
||||
import TimelineDecade from './TimelineDecade'
|
||||
import TimelineUpcoming from './TimelineUpcoming'
|
||||
} from '../../../lib/timeline.ts'
|
||||
import TimelineDecade from './TimelineDecade.tsx'
|
||||
import TimelineUpcoming from './TimelineUpcoming.tsx'
|
||||
import './timeline.css'
|
||||
|
||||
const PARAM = 'y'
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import {
|
|||
withGapYears,
|
||||
type GroupedDecade,
|
||||
type SortDirection,
|
||||
} from '../../../lib/timeline'
|
||||
import TimelineYear from './TimelineYear'
|
||||
} from '../../../lib/timeline.ts'
|
||||
import TimelineYear from './TimelineYear.tsx'
|
||||
|
||||
type Props = {
|
||||
decade: GroupedDecade
|
||||
|
|
@ -45,7 +45,7 @@ export default function TimelineDecade({
|
|||
{decade.preProgram ? (
|
||||
<p className="ngu-tl__gapNote">
|
||||
<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>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Link } from 'react-router-dom'
|
||||
import { MONTH_LABELS, type PersonRef, type TimelineItem } from '../../../lib/timeline'
|
||||
import { hrefFor, logoSrc, photoSrc } from '../../../lib/timelineRefs'
|
||||
import { MONTH_LABELS, type PersonRef, type TimelineItem } from '../../../lib/timeline.ts'
|
||||
import { hrefFor, logoSrc, photoSrc } from '../../../lib/timelineRefs.ts'
|
||||
import { initials } from '../../../lib/media.ts'
|
||||
|
||||
const KIND_NAMES: Record<TimelineItem['kind'], string> = {
|
||||
milestone: 'Milestone',
|
||||
|
|
@ -10,7 +11,7 @@ const KIND_NAMES: Record<TimelineItem['kind'], string> = {
|
|||
people: 'People',
|
||||
}
|
||||
|
||||
/** Day number only — the month node above already carries the month. */
|
||||
/** Day number only, the month node above already carries the month. */
|
||||
function dayMarker(item: TimelineItem): string {
|
||||
if (item.precision !== 'day') return ''
|
||||
const day = Number(item.date.split('-')[2])
|
||||
|
|
@ -26,16 +27,6 @@ function fullMarker(item: TimelineItem): string {
|
|||
return `${month} ${Number(d)}`
|
||||
}
|
||||
|
||||
/** Initials stand in when a person has no photo on file. */
|
||||
function initials(name: string): string {
|
||||
return name
|
||||
.split(/\s+/)
|
||||
.slice(0, 2)
|
||||
.map((part) => part[0] ?? '')
|
||||
.join('')
|
||||
.toUpperCase()
|
||||
}
|
||||
|
||||
function PersonChip({ person }: { person: PersonRef }) {
|
||||
const src = photoSrc(person.photo)
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState } from 'react'
|
||||
import type { GroupedYear, SortDirection } from '../../../lib/timeline'
|
||||
import TimelineYear from './TimelineYear'
|
||||
import type { GroupedYear, SortDirection } from '../../../lib/timeline.ts'
|
||||
import TimelineYear from './TimelineYear.tsx'
|
||||
|
||||
type Props = {
|
||||
years: GroupedYear[]
|
||||
|
|
@ -17,7 +17,7 @@ type Props = {
|
|||
* order. That keeps the button anchored next to the decade marker
|
||||
* instead of drifting up the page as items appear.
|
||||
*
|
||||
* Membership is decided by date, not by a flag — see partitionByDate.
|
||||
* Membership is decided by date, not by a flag, see partitionByDate.
|
||||
* An event moves into the record on its own, with nothing to update.
|
||||
*/
|
||||
export default function TimelineUpcoming({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { CSSProperties } from 'react'
|
||||
import type { GroupedYear } from '../../../lib/timeline'
|
||||
import TimelineEntry from './TimelineEntry'
|
||||
import type { GroupedYear } from '../../../lib/timeline.ts'
|
||||
import TimelineEntry from './TimelineEntry.tsx'
|
||||
|
||||
/** Dot diameter scales with volume, so the rail reads as a density chart. */
|
||||
function dotSize(count: number): string {
|
||||
|
|
@ -42,7 +42,7 @@ export default function TimelineYear({ year, open, onToggle }: Props) {
|
|||
/>
|
||||
<span className="ngu-tl__yearLabel">{year.year}</span>
|
||||
<span className="ngu-tl__yearCount">
|
||||
{empty ? '—' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
||||
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* History timeline — scoped under .ngu-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
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* ——— Decade block ——————————————————————————————————————————————— */
|
||||
/* --- Decade block ----------------------------------------------- */
|
||||
|
||||
.ngu-tl__decade {
|
||||
position: relative;
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
color: var(--tl-muted);
|
||||
}
|
||||
|
||||
/* ——— Decade header ——————————————————————————————————————————————— */
|
||||
/* --- Decade header ----------------------------------------------- */
|
||||
|
||||
.ngu-tl__decadeHead {
|
||||
position: relative;
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
/* ——— Year node ———————————————————————————————————————————————— */
|
||||
/* --- Year node ------------------------------------------------ */
|
||||
|
||||
.ngu-tl__year {
|
||||
position: relative;
|
||||
|
|
@ -231,7 +231,7 @@
|
|||
font-weight: 450;
|
||||
}
|
||||
|
||||
/* ——— Expanded panel ——————————————————————————————————————————— */
|
||||
/* --- Expanded panel ------------------------------------------- */
|
||||
|
||||
.ngu-tl__panel {
|
||||
padding: 0.25rem 0 1.5rem var(--tl-gutter);
|
||||
|
|
@ -286,7 +286,7 @@
|
|||
gap: 0.125rem;
|
||||
}
|
||||
|
||||
/* ——— Entry ————————————————————————————————————————————————————— */
|
||||
/* --- Entry ----------------------------------------------------- */
|
||||
|
||||
.ngu-tl__entry {
|
||||
display: grid;
|
||||
|
|
@ -371,7 +371,7 @@ a.ngu-tl__entry:hover .ngu-tl__entryTitle {
|
|||
box-shadow: inset 0 0 0 1.5px var(--tl-faint);
|
||||
}
|
||||
|
||||
/* ——— Featured entries ————————————————————————————————————————— */
|
||||
/* --- Featured entries ----------------------------------------- */
|
||||
|
||||
.ngu-tl__featured {
|
||||
display: flex;
|
||||
|
|
@ -403,7 +403,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
background: color-mix(in srgb, var(--tl-accent) 18%, transparent);
|
||||
}
|
||||
|
||||
/* ——— Empty state ——————————————————————————————————————————————— */
|
||||
/* --- Empty state ----------------------------------------------- */
|
||||
|
||||
.ngu-tl__empty {
|
||||
padding: 0.5rem 0 1.25rem var(--tl-gutter);
|
||||
|
|
@ -420,7 +420,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
}
|
||||
|
||||
/* ——— Toolbar + utilities ————————————————————————————————————— */
|
||||
/* --- Toolbar + utilities ------------------------------------- */
|
||||
|
||||
.ngu-tl__toolbar {
|
||||
display: flex;
|
||||
|
|
@ -468,7 +468,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
/* ——— Upcoming block ——————————————————————————————————————————
|
||||
/* --- Upcoming block ------------------------------------------
|
||||
Opens upward: the toggle is first in the DOM, column-reverse puts the
|
||||
list above it. Faded because none of it has happened yet. */
|
||||
|
||||
|
|
@ -556,7 +556,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
}
|
||||
}
|
||||
|
||||
/* ——— Event / org / award logo ————————————————————————————————— */
|
||||
/* --- Event / org / award logo --------------------------------- */
|
||||
|
||||
.ngu-tl__logo {
|
||||
display: inline-block;
|
||||
|
|
@ -574,7 +574,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
vertical-align: -0.3125rem;
|
||||
}
|
||||
|
||||
/* ——— People roster ——————————————————————————————————————————— */
|
||||
/* --- People roster ------------------------------------------- */
|
||||
|
||||
.ngu-tl__entryWrap {
|
||||
display: block;
|
||||
|
|
@ -643,7 +643,7 @@ a.ngu-tl__entry--featured:hover {
|
|||
color: var(--tl-faint);
|
||||
}
|
||||
|
||||
/* ——— Kind markers, continued ————————————————————————————————— */
|
||||
/* --- Kind markers, continued --------------------------------- */
|
||||
|
||||
.ngu-tl__kind--organization {
|
||||
border-radius: 2px;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
EventCalendar on the front page: every scope and every type, all
|
||||
four visitor filters, starting on this month. The same component
|
||||
can go on any page with a narrower filter — a region's page would
|
||||
pass host, a classes page would pass type — and this file only
|
||||
can go on any page with a narrower filter, a region's page would
|
||||
pass host, a classes page would pass type, and this file only
|
||||
adds the front page's heading around it.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
under the cards with a dot per entry, and a year label wherever
|
||||
the year changes. The last card goes to the full history.
|
||||
|
||||
Featured is the admin's call — timeline_entries.is_featured,
|
||||
Featured is the admin's call, timeline_entries.is_featured,
|
||||
"shown large" on the history page. Nothing else is filtered
|
||||
here; /history has already decided what's public.
|
||||
|
||||
Scrolling is native — touch, trackpad, shift-wheel — with
|
||||
Scrolling is native, touch, trackpad, shift-wheel, with
|
||||
scroll-snap so it settles on a card. A mouse can also drag it, and
|
||||
the arrow buttons step one card. A drag that moved more than a few
|
||||
pixels swallows the click it ends in, so letting go over a card
|
||||
|
|
@ -170,7 +170,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
|
|||
|
||||
const year = (item: TimelineItem) => item.date.slice(0, 4)
|
||||
|
||||
/* "June 2014", "2014", "12 June 2014" — only as much as precision
|
||||
/* "June 2014", "2014", "12 June 2014", only as much as precision
|
||||
says is true. */
|
||||
function dateLabel(item: TimelineItem): string {
|
||||
const [y, m, d] = item.date.split('-')
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
The API picks the event (pinned in the admin, or the next one that
|
||||
hasn't ended); this works out the moment to count to.
|
||||
|
||||
For a one-off event that's local midnight on starts_on — dates
|
||||
For a one-off event that's local midnight on starts_on, dates
|
||||
here are calendar dates with no time attached. For a series it's
|
||||
the next meeting, at the series' start time when it has one, so a
|
||||
weekly class counts down to Tuesday 7pm rather than to a start
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
PATHFINDER — "Find your way in"
|
||||
PATHFINDER: "Find your way in"
|
||||
|
||||
The connect section as a question rather than a wall of forms:
|
||||
pick what you're here for, and that path's actions arrive. Paths
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue