Use organization-neutral names in code and browser keys
- The timeline's ngu-tl classes and keyframes are site-tl; nguLogo is siteLogo; the event card's ngu grid area is org; window.__NGU_SITE__ is window.__SITE__; QR downloads are qr-<page>.png - Browser keys (theme, closed banner and privacy notice, chunk reload) start site-; the page's first script moves any old ngu- values over once, so nobody loses their theme or sees a closed notice again - Session and Google sign-in cookies are site_session and site_oauth (__Host- over https); everyone signs in again once Record ids, server paths, the service and the database file keep their names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
92e7938b64
commit
2b009beac1
23 changed files with 191 additions and 181 deletions
|
|
@ -15,13 +15,13 @@ type Props = {
|
|||
|
||||
export default function TimelineYear({ year, open, onToggle }: Props) {
|
||||
const empty = year.count === 0
|
||||
const panelId = `ngu-tl-year-${year.year}`
|
||||
const panelId = `site-tl-year-${year.year}`
|
||||
|
||||
const className = [
|
||||
'ngu-tl__year',
|
||||
year.featured ? 'ngu-tl__year--featured' : '',
|
||||
open ? 'ngu-tl__year--open' : '',
|
||||
empty ? 'ngu-tl__year--empty' : '',
|
||||
'site-tl__year',
|
||||
year.featured ? 'site-tl__year--featured' : '',
|
||||
open ? 'site-tl__year--open' : '',
|
||||
empty ? 'site-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="ngu-tl__yearBtn"
|
||||
className="site-tl__yearBtn"
|
||||
aria-expanded={open}
|
||||
aria-controls={panelId}
|
||||
onClick={() => onToggle(year.year)}
|
||||
>
|
||||
<span
|
||||
className="ngu-tl__dot"
|
||||
className="site-tl__dot"
|
||||
style={{ '--tl-dot': dotSize(year.count) } as CSSProperties}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<span className="ngu-tl__yearLabel">{year.year}</span>
|
||||
<span className="ngu-tl__yearCount">
|
||||
<span className="site-tl__yearLabel">{year.year}</span>
|
||||
<span className="site-tl__yearCount">
|
||||
{empty ? '-' : `${year.count} ${year.count === 1 ? 'entry' : 'entries'}`}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
{open ? (
|
||||
empty ? (
|
||||
<div className="ngu-tl__empty" id={panelId}>
|
||||
<div className="site-tl__empty" id={panelId}>
|
||||
Nothing recorded for {year.year} yet.
|
||||
</div>
|
||||
) : (
|
||||
<div className="ngu-tl__panel" id={panelId}>
|
||||
<div className="site-tl__panel" id={panelId}>
|
||||
{year.featuredItems.length > 0 ? (
|
||||
<ul className="ngu-tl__featured ngu-tl__list">
|
||||
<ul className="site-tl__featured site-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="ngu-tl__month" key={month.month}>
|
||||
<h4 className="ngu-tl__monthLabel">{month.label}</h4>
|
||||
<ul className="ngu-tl__list">
|
||||
<section className="site-tl__month" key={month.month}>
|
||||
<h4 className="site-tl__monthLabel">{month.label}</h4>
|
||||
<ul className="site-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="ngu-tl__month ngu-tl__undated">
|
||||
<h4 className="ngu-tl__monthLabel">Elsewhere in {year.year}</h4>
|
||||
<ul className="ngu-tl__list">
|
||||
<section className="site-tl__month site-tl__undated">
|
||||
<h4 className="site-tl__monthLabel">Elsewhere in {year.year}</h4>
|
||||
<ul className="site-tl__list">
|
||||
{year.undated.map((item) => (
|
||||
<TimelineEntry key={item.id} item={item} />
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue