Page updates: v1.10.3 to v1.10.6 #20

Merged
ngu-git-admin merged 19 commits from page-updates into main 2026-10-01 09:23:31 +01:00
11 changed files with 62 additions and 39 deletions
Showing only changes of commit 8d319bcaaa - Show all commits

View file

@ -93,7 +93,7 @@ export default function AccessibilityPanel() {
} }
return ( return (
<div ref={rootRef} className="fixed right-4 bottom-4 z-40 print:hidden"> <div ref={rootRef} className="fixed right-4 bottom-4 z-50 print:hidden">
{open && ( {open && (
<div <div
id={panelId} id={panelId}
@ -109,7 +109,7 @@ export default function AccessibilityPanel() {
setOpen(false) setOpen(false)
buttonRef.current?.focus() buttonRef.current?.focus()
}} }}
className="btn flex h-8 w-8 items-center justify-center text-muted hover:bg-tint" className="btn flex h-10 w-10 items-center justify-center text-muted hover:bg-tint"
aria-label="Close accessibility options" aria-label="Close accessibility options"
> >
<X size={18} weight="bold" aria-hidden="true" /> <X size={18} weight="bold" aria-hidden="true" />

View file

@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
ARROW LINK ARROW LINK
═══════════════════════════════════════════════════════════════ */ ═══════════════════════════════════════════════════════════════ */
export default function ArrowLink({ to, label, color, size = "h-9 w-9" }) { export default function ArrowLink({ to, label, color, size = "h-10 w-10" }) {
return ( return (
<Link <Link
to={to} to={to}

View file

@ -29,12 +29,12 @@ export default function Banner() {
return ( return (
<div <div
className="relative w-full px-12 py-2.5 text-center" className="relative w-full py-2.5 pr-12 pl-4 text-center sm:px-12"
style={{ background: "rgba(0, 47, 57, 0.95)" }} style={{ background: "rgba(0, 16, 17, 0.95)" }}
role="region" role="region"
aria-label="Site announcement" aria-label="Site announcement"
> >
<p className="text-sm text-white/85"> <p className="text-xs text-white/85 sm:text-sm">
{SITE_BANNER.content.map((part, i) => { {SITE_BANNER.content.map((part, i) => {
if (!part.href) return <span key={i}>{part.text}</span>; if (!part.href) return <span key={i}>{part.text}</span>;
return part.external ? ( return part.external ? (
@ -53,7 +53,7 @@ export default function Banner() {
<button <button
onClick={dismiss} onClick={dismiss}
aria-label="Dismiss announcement" aria-label="Dismiss announcement"
className="absolute right-3 top-1/2 -translate-y-1/2 p-1.5 text-white/50 hover:text-white hover:bg-white/10 transition-colors" className="absolute right-1 top-1/2 -translate-y-1/2 p-3 text-white/50 hover:text-white hover:bg-white/10 transition-colors"
> >
<X className="w-4 h-4" weight="bold" aria-hidden="true" /> <X className="w-4 h-4" weight="bold" aria-hidden="true" />
</button> </button>

View file

@ -34,11 +34,12 @@ const Footer_Links = [
const footerLinkClass = const footerLinkClass =
"text-white/65 hover:text-[#9cc47c] text-sm transition-colors"; "text-white/65 hover:text-[#9cc47c] text-sm transition-colors";
// inline-block with a little height of its own, so a finger can hit it.
const pageLinkClass = const pageLinkClass =
"text-white/80 hover:text-[#9cc47c] text-sm font-semibold transition-colors"; "inline-block py-1 text-white/80 hover:text-[#9cc47c] text-sm font-semibold transition-colors";
const sectionLinkClass = const sectionLinkClass =
"text-white/65 hover:text-[#9cc47c] text-sm transition-colors"; "inline-block py-1 text-white/65 hover:text-[#9cc47c] text-sm transition-colors";
const headingClass = "text-white/90 text-sm font-semibold mb-4"; const headingClass = "text-white/90 text-sm font-semibold mb-4";
@ -92,7 +93,7 @@ export default function Footer() {
</Link> </Link>
{sections.length > 0 && ( {sections.length > 0 && (
<ul className="mt-2 flex flex-col gap-1.5"> <ul className="mt-1 flex flex-col">
{sections.map((section) => ( {sections.map((section) => (
<li key={section.hash}> <li key={section.hash}>
<Link <Link

View file

@ -99,8 +99,10 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
return ( return (
<li className="border-b border-brand/10 last:border-b-0"> <li className="border-b border-brand/10 last:border-b-0">
<div className="flex gap-4 py-4 sm:gap-6"> {/* On a phone the time sits on its own line above the entry,
<p className="w-24 shrink-0 pt-0.5 text-sm font-semibold sm:w-32" style={{ color: accentText(accent) }}> leaving the title the full width. */}
<div className="flex flex-wrap gap-x-4 gap-y-1 py-4 sm:flex-nowrap sm:gap-6">
<p className="w-full shrink-0 pt-0.5 text-sm font-semibold sm:w-32" style={{ color: accentText(accent) }}>
{entry.time} {entry.time}
</p> </p>
@ -131,7 +133,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
aria-expanded={open} aria-expanded={open}
aria-controls={panelId} aria-controls={panelId}
aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`} aria-label={open ? `Less about ${entry.text}` : `More about ${entry.text}`}
className="h-8 w-8 shrink-0 btn border text-sm transition-colors hover:bg-tint" className="h-10 w-10 shrink-0 btn border text-sm transition-colors hover:bg-tint"
style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }} style={{ borderColor: `${withAlpha(accent, 33)}`, color: accentText(accent) }}
> >
<CaretDown <CaretDown

View file

@ -112,6 +112,13 @@ html {
scroll-behavior: smooth; scroll-behavior: smooth;
} }
/* An email address is one long word: let it break anywhere rather
than push a button or card past a phone's edge. */
a[href^="mailto:"] {
overflow-wrap: anywhere;
max-width: 100%;
}
/* One visible focus ring for keyboard users, wherever a component /* One visible focus ring for keyboard users, wherever a component
doesn't draw its own. */ doesn't draw its own. */
:focus-visible { :focus-visible {

View file

@ -44,14 +44,14 @@ function OrgCard({ org, accent, pageLabel, siteLabel }) {
return ( return (
<div <div
className="p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]" className="p-4 sm:p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }} style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
> >
<div className="flex items-start gap-4"> <div className="flex items-start gap-3 sm:gap-4">
<OrgLogo org={org} color={color} /> <OrgLogo org={org} color={color} size="h-10 w-10 sm:h-14 sm:w-14" />
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
<h3 className="text-xl font-bold leading-tight" style={{ color }}> <h3 className="text-lg sm:text-xl font-bold leading-tight [overflow-wrap:anywhere]" style={{ color }}>
{org.name} {org.name}
</h3> </h3>
{subtitle && ( {subtitle && (

View file

@ -470,16 +470,16 @@ function RegionBlock({
function GroupCard({ group, color, open, onOpen }) { function GroupCard({ group, color, open, onOpen }) {
return ( return (
<div <div
className="p-4 flex items-start gap-4 transition-all duration-200" className="p-4 flex flex-wrap items-start gap-3 sm:gap-4 transition-all duration-200"
style={{ style={{
border: `1px solid ${color}`, border: `1px solid ${color}`,
background: open ? `color-mix(in srgb, ${color} 8%, var(--color-raised))` : "var(--color-raised)", background: open ? `color-mix(in srgb, ${color} 8%, var(--color-raised))` : "var(--color-raised)",
}} }}
> >
<OrgLogo org={group} color={color} /> <OrgLogo org={group} color={color} size="h-10 w-10 sm:h-14 sm:w-14" />
<div className="min-w-0 flex-1"> <div className="min-w-[8rem] flex-1">
<p className="font-bold leading-tight">{group.name}</p> <p className="font-bold leading-tight [overflow-wrap:anywhere]">{group.name}</p>
<p className="text-sm" style={{ color: FALLBACK_COLOR }}> <p className="text-sm" style={{ color: FALLBACK_COLOR }}>
{group.location_label} {group.location_label}
</p> </p>
@ -494,12 +494,12 @@ function GroupCard({ group, color, open, onOpen }) {
detail panel in place, the arrow leaves for the group's detail panel in place, the arrow leaves for the group's
own page. Keeping them distinct beats one control that own page. Keeping them distinct beats one control that
does different things depending on where you click. */} does different things depending on where you click. */}
<div className="shrink-0 flex items-center gap-2"> <div className="ml-auto shrink-0 flex items-center gap-2">
<button <button
onClick={onOpen} onClick={onOpen}
aria-expanded={open} aria-expanded={open}
aria-label={`${open ? "Hide" : "View"} details for ${group.name}`} aria-label={`${open ? "Hide" : "View"} details for ${group.name}`}
className="h-9 w-9 btn flex items-center justify-center transition-transform duration-200 hover:scale-110" className="h-10 w-10 btn flex items-center justify-center transition-transform duration-200 hover:scale-110"
style={{ style={{
border: `1px solid ${color}`, border: `1px solid ${color}`,
color, color,
@ -540,21 +540,21 @@ function GroupDetail({ group, region, onClose }) {
return ( return (
<div <div
className="p-6 mb-6" className="p-4 sm:p-6 mb-6"
style={{ border: `2px solid ${colorOf(region)}`, background: `color-mix(in srgb, ${colorOf(region)} 6%, var(--color-raised))` }} style={{ border: `2px solid ${colorOf(region)}`, background: `color-mix(in srgb, ${colorOf(region)} 6%, var(--color-raised))` }}
> >
<div className="flex items-start gap-4"> <div className="flex items-start gap-4">
<OrgLogo org={group} color={colorOf(region)} size="h-20 w-20" /> <OrgLogo org={group} color={colorOf(region)} size="h-12 w-12 sm:h-20 sm:w-20" />
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
<p className="text-2xl font-display font-bold leading-tight">{group.name}</p> <p className="text-xl sm:text-2xl font-display font-bold leading-tight [overflow-wrap:anywhere]">{group.name}</p>
<p style={{ color: FALLBACK_COLOR }}>{group.location_label}</p> <p style={{ color: FALLBACK_COLOR }}>{group.location_label}</p>
</div> </div>
<button <button
onClick={onClose} onClick={onClose}
aria-label="Close details" aria-label="Close details"
className="shrink-0 h-8 w-8 btn flex items-center justify-center text-lg transition-transform duration-200 hover:scale-110" className="shrink-0 h-10 w-10 btn flex items-center justify-center text-lg transition-transform duration-200 hover:scale-110"
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }} style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
> >
<X size={20} weight="bold" aria-hidden="true" /> <X size={20} weight="bold" aria-hidden="true" />
@ -844,13 +844,19 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
shell( shell(
<div className="grid grid-cols-1 lg:grid-cols-[1.45fr_1fr] gap-10 items-stretch"> <div className="grid grid-cols-1 lg:grid-cols-[1.45fr_1fr] gap-10 items-stretch">
{/* Map */} {/* Map */}
<div> <div className="min-w-0">
<RegionMap {/* On a phone the map keeps a readable size (tiles big enough
slices={slices} to read and tap) and scrolls sideways in its own box. */}
groupCounts={groupCounts} <div className="-mx-6 overflow-x-auto px-6 sm:mx-0 sm:px-0">
onPick={pickArea} <div className="min-w-[34rem] sm:min-w-0">
{...shared} <RegionMap
/> slices={slices}
groupCounts={groupCounts}
onPick={pickArea}
{...shared}
/>
</div>
</div>
<Legend <Legend
domestic={domestic} domestic={domestic}
international={international} international={international}

View file

@ -544,6 +544,13 @@ a.site-tl__entry--featured:hover {
opacity: 1; opacity: 1;
} }
/* A touch screen has no hover to bring it up, so it reads in full. */
@media (hover: none) {
.site-tl__upcomingList {
opacity: 1;
}
}
@keyframes site-tl-rise { @keyframes site-tl-rise {
from { from {
opacity: 0; opacity: 0;

View file

@ -141,7 +141,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
}} }}
> >
{featured.map((item, index) => ( {featured.map((item, index) => (
<li key={item.id} className="w-[19rem] shrink-0 md:w-[22rem]"> <li key={item.id} className="w-[min(19rem,80vw)] shrink-0 md:w-[22rem]">
<RailCard <RailCard
item={item} item={item}
showYear={index === 0 || year(item) !== year(featured[index - 1])} showYear={index === 0 || year(item) !== year(featured[index - 1])}
@ -149,7 +149,7 @@ export default function FeaturedTimelineRail({ id, title, blurb }: RailProps) {
</li> </li>
))} ))}
<li className="w-[19rem] shrink-0 md:w-[22rem]"> <li className="w-[min(19rem,80vw)] shrink-0 md:w-[22rem]">
<div className="flex h-full flex-col"> <div className="flex h-full flex-col">
<div className="h-12" /> <div className="h-12" />
<Link <Link

View file

@ -55,14 +55,14 @@ export default function StatsBand({ id, title, blurb, stats }: StatsBandProps) {
</h2> </h2>
{blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>} {blurb && <p className="mt-3 max-w-2xl text-white/70">{blurb}</p>}
<dl className="mt-12 grid grid-cols-2 gap-x-8 gap-y-14 md:grid-cols-4"> <dl className="mt-12 grid grid-cols-2 gap-x-4 gap-y-14 sm:gap-x-8 md:grid-cols-4">
{stats.map((stat, index) => ( {stats.map((stat, index) => (
<div <div
key={`${stat.label}-${index}`} key={`${stat.label}-${index}`}
className={`hp-stat border-l border-white/15 pl-6 ${seen ? 'hp-stat--in' : ''}`} className={`hp-stat border-l border-white/15 pl-4 sm:pl-6 ${seen ? 'hp-stat--in' : ''}`}
style={{ transitionDelay: `${index * 120}ms` }} style={{ transitionDelay: `${index * 120}ms` }}
> >
<dd className="font-display text-5xl font-extrabold leading-none text-white md:text-6xl"> <dd className="font-display text-4xl font-extrabold leading-none text-white sm:text-5xl md:text-6xl">
<CountUp value={stat.value} run={seen} /> <CountUp value={stat.value} run={seen} />
{stat.suffix && <span className="text-[#f0bd4f]">{stat.suffix}</span>} {stat.suffix && <span className="text-[#f0bd4f]">{stat.suffix}</span>}
</dd> </dd>