Commit graph

67 commits

Author SHA1 Message Date
Zaldimmar
0ed7315156 People directories, ministries, organization contacts (migrations 062 to 064)
- People tags (062): Data → People tags (Musicians seeded); a person's
  Directories repeater tags them and their Specialty line shows on
  their tile. A People directory section preset shows a tag's first
  12 and links to its full page, /directory/<tag>, with page meta and
  a sitemap entry. Tiles' details panels show a person's links.
- Ministries (063): a new organization kind. A group picks its
  ministry and its page says "Ministry: <name>", linked to the
  ministry's website. Ministries have no public page, list, sitemap
  or timeline entry, and aren't offered where a record links to its
  organization. organizations is rebuilt for the kind CHECK.
- Organization contacts (064): Data → Contact types; a private
  Contacts repeater on each organization (editors and up, readRole on
  a child collection). Tools → Newsletter → Recipients filters them
  by type, kind, region and published and downloads a Mailchimp CSV.
- A trigger refusing a save with a sentence is shown as that message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:57:34 -05:00
Zaldimmar
27e5fbd690 Reading mode: every page and section reads as text
The reader (ReaderView.tsx) now reads an icon-only link's label, puts
a card's link on its first line or picture when it has no heading,
gives each item of a row of facts or links its own line, keeps line
breaks, skips what CSS hides, turns a form into one line saying it
can't be used there, shows empty table cells as "-", keeps section and
heading ids so #links land, and opens file links as files.

What it can't read draws its own text version (useReadingMode()):
the hero, pathfinder, front page history, event lists (every event,
past ones too), org lists and groups map (every region and group,
linked), history timeline (every year open), schedules (every day,
fold-outs included), people tiles (everyone, with details) and videos.

Also: org names are linked headings, heading levels fixed where cards
repeated their section's, Team pages lose the doubled "Members",
Giving links the treasurer's email and names Church Center.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:12:27 -05:00
Zaldimmar
c79910ef8d Reading mode: text versions of the front page's bands
- Stats: one line per number, no longer stuck at 0 (the count waited
  for the band to scroll into view, which the hidden page never
  does); reduced motion shows the numbers at once too.
- Calendar: the next six weeks from today as a list (date, linked
  title, time, type, place), wherever a calendar is drawn.
- Featured cards: a linked heading and its words each; a video card
  links to its video.
- Countdown: left out, the retreats band shows the same event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:54:55 -05:00
Zaldimmar
502a294940 Reading mode spacing, phone map width, no fixed back links
- Reading mode: parts the page draws on their own lines get a space
  between them, so words no longer run together; the column is 60rem
  (was 42rem) and headings are bold in the display face.
- Local groups map scales to its column on a phone instead of holding
  34rem and scrolling sideways.
- Group, region, partner and team pages drop their fixed back link
  (records are reached from many pages); orgListHref is gone.
  Not-found pages keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:46:41 -05:00
Zaldimmar
de17da7dc8 Accessibility: reader view and full palette swaps; version v1.12.1-accessibility
- Reading mode is now a reader view (ReaderView.tsx): the page renders
  hidden and its headings, paragraphs, links and described pictures
  are written out in one column, with no header, backdrop or footer.
- Color blind modes swap all three color families (teal, green,
  amber); palette hexes in components and CSS are now
  var(--pal-<family>-<shade>) so the modes reach them.
- CLAUDE.md and docs/updating-data-in-code.md describe both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 16:10:57 -05:00
Zaldimmar
b816203c0c Accessibility: reading and color blind modes, audit fixes, calendar window
- Accessibility panel: the switch knob stays in its track; the panel
  follows its button in the Tab order and opens on its first switch.
- Reading mode is the page as plain text: one column, no colors,
  pictures, cards or motion; descriptions stay in place.
- Color blind mode (protanopia, deuteranopia, tritanopia, monochrome):
  palette swaps chosen by simulation, applied to code, data and CSS
  colors on public pages only. The newsletter uses the stored palette.
- Audit fixes: focus not hidden by the header, focus on page change
  and in-page jumps, focus return for the menu, day list and people
  details, labelled admin fields and dialogs, keyboard map tiles,
  scrollable tables, and more.
- Calendar asks /events for its six weeks only (?from=&to=); carousels
  take their 12 most recent past events (?past=12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:33:09 -05:00
Zaldimmar
00170ca912 Newsletter: social bar and event countdown parts, full-width builder
- Social bar: a colored band of the site's platform icons, linked;
  no links added shows the footer's (src/data/socialLinks.ts, shared)
- Icons are white and ink PNGs in public/email/, made from
  PlatformIcon.tsx by scripts/email-icons.mjs (no SVG in Gmail/Outlook)
- Event countdown: a picture drawn by /api/countdown/<id>.png when the
  email is opened (days, hours, minutes to local midnight in
  America/Chicago; then happening now; then over), with a fixed line
  under it as of copying
- The builder takes the whole window (useWideAdminPage('full'))

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:43:28 -05:00
Zaldimmar
3194fdbb7d Newsletter: every part editable and movable
A draft is one ordered list of parts (migration 060, newsletters.layout
as JSON), edited with the content block editor so any part can be
moved, copied or removed, each aligned left or center:
- header: words, a PNG/JPEG logo, band color or none
- title
- any email block; dividers take color, thickness and spacing
- picked items: events, posts or front page cards picked in order,
  with the heading, its underline, the card bar and the button label
- footer: its lines and the line above

Colors come from the palette or none. 057's fixed fields and blocks
are dropped; that migration never reached a live database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:37:26 -05:00
Zaldimmar
f65664217e Details & Contact as blocks, not a preset; the side nav sits in the margin instead of shifting the sections
Migration 058 turns the organization_details preset into the
section's own blocks and drops it from page_sections' CHECK. The side
nav is placed in the left margin beside the 72rem content, from 88rem
screens up, so sections stay where they'd be without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 03:28:03 -05:00
Zaldimmar
9daf7b1a4f Page editors: Retreats, Community, Resources, Organization and History built from sections
Each page is now a list of sections edited in Admin → Pages: a title
(30 characters at most, for the side nav), URL ID, blurb and accent,
its own content blocks, and an optional preset (Community blog, groups
map, region list, partner cards, events, timeline, NGU's details).
Migration 056 seeds every page as the code drew it and moves the
Organization editor's blocks and volunteering into its sections. The
Community blog's settings move into the Community editor. The header,
footer and side nav read each page's sections from the API.

The admin engine reads and writes nested collections to any depth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:15:30 -05:00
Zaldimmar
ed0f12022f Navigation: section dropdowns, a side nav, Home's sections from the front page
- The header's second strip is gone: each top link drops down its
  page's sections on hover or keyboard focus.
- Retreats, Community, Resources, Organization and History get the
  admin editors' "On this page" column (SectionNav), sticky at the
  left from lg up, with the section being read lit.
- Home's sections in the dropdown, mobile menu, footer site map, the
  feedback form and the QR maker are the bands the front page is
  showing, in its order and under its headings (navSections.ts,
  frontPageBands.ts, which Home.tsx now draws from too).
- Resources comes before Organization in the nav and footer.
- The Organization page draws from its own editor's content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:37:36 -05:00
Zaldimmar
43797f38bc Cleanup of old-data fixes; an editor for the Organization page
Nothing before these changes was ever public, so the fixes kept for
older data go: the /leadership redirect (MOVED in routes/pages.js),
index.html's move of "ngu-" browser keys to "site-", the boot-time
sorting of images from before folders (media.js), and emoji path
icons (a path with no named icon shows a dot; migration 055 turns
the baseline's seeded emoji into their names).

Pages → Organization page (migration 055): a singleton with the
Mission, Vision & Values blocks, the Leadership blocks (a People
block per team, in order) with a heading and blurb, and Volunteering
(title, blurb, links). content_blocks gains the two owner kinds;
GET /organization-page serves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 23:37:35 -05:00
Zaldimmar
499662b59a Leadership becomes the Organization page, at /organization
Three sections: Mission, Vision & Values from the national
organization record's own description and content blocks;
Leadership as that record's teams with their people; Details &
Contact with NGU's address, nonprofit status, email and the
record's contact links. /leadership answers with a 301 to
/organization (MOVED in routes/pages.js), and a page title or intro
saved for it in Site settings moves with it (migration 054).

OrganizationDetail's team list and contact buttons are now shared
components (OrgTeams, OrgContact), and NGU's address and email live
once in src/data/organizationDetails.ts for the footer, the page and
ComingSoon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:30:18 -05:00
Zaldimmar
57f8020542 Video stills skip YouTube's gray placeholder; timeline back to teal dots; people rows fill
- A still that fails or comes back as YouTube's 120 x 90 "no
  thumbnail" image gives way to the next; with none left the player
  is a flat teal panel with the play button showing.
- Timeline: solid teal dots, a solid teal rail and teal decade tags
  (still on their branch), one color throughout, until a vine or
  tree drawing replaces them. The leaf colors are gone.
- People tiles fill each row with as many as fit (2 to 10), one
  fewer only when the last row would be a single tile, instead of
  evening rows out (8 where 6 fit had come out 4 and 4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:44:42 -05:00
Zaldimmar
2df908f7c4 Backdrop: four parallax layers, laid out per page, tones per top-level section
Sixteen circles in four layers, big and slow at the back to small
and quicker at the front, each rising by its share of the page's
scroll (none at the page's own speed); how far is measured from the
page's height, so the back layer visibly moves on a long page. Each
path gets its own seeded arrangement. The tone moves on only when a
new top-level section arrives, and eases over 2.4s. Dark shades are
chosen so text passes 4.5:1 however many circles overlap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:28:55 -05:00
Zaldimmar
e5c14dffa3 Timeline on a brown branch with leaf-colored decade tags; solid featured entries; admin home in two alternating colors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:26:38 -05:00
Zaldimmar
dd33ee2da0 Document the palette, square corners, notices and the page backdrop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:55:21 -05:00
Zaldimmar
2ad65cdc15 Write the site in US English
color, center, canceled, labeled, recognize and the rest, in UI
text, help text, comments, docs and names (ColorInput, QrCenter).
Migration 053 renames the two Site settings color CHECKs, whose
names are the messages the admin shows. Kept: events.status's
stored value 'cancelled' (shown as canceled), aria-labelledby,
schema.org's EventCancelled, and old migrations as they ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:24:11 -05:00
Zaldimmar
38aff34c97 Call local chapters groups, everywhere
The organization kind is 'group', its side table is groups, pages
live at /groups/<id> and the Community page's section is #groups.
Migration 052 converts existing databases: the kind and the tables
whose CHECKs name chapters are rebuilt, the front page count and
request category follow, and the site's own /chapters/ and
#chapters links in records are rewritten. Request files now go in
Requests/Groups on the shared drive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:19:51 -05:00
Zaldimmar
06a0e07a79 Let a downloaded video be saved whole, before or without cutting
Save to library and Save to Drive on a finished download, not only on
clips. The download stays on the server to cut clips from either way;
a clip's library save still clears its working file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 00:14:26 -05:00
Zaldimmar
42d1536ee6 Let the clip tool save a clip to a Drive folder
Save to Drive, beside Save to library, puts a finished clip in a folder
under Media (Videos or Audio chosen first to match it) as a Files
entry, shared by link, so pages can link to it (migration 051). The
clip streams from disk through a resumable upload, so a long one
isn't read into memory. A clip can be in both the library and Drive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 23:29:28 -05:00
Zaldimmar
e1542d8d87 Manage request files: mark missing ones, remove them, list them all
Forms → Content requests and a new Tools → Media → Requests tab (by
type folder, each linked to its request) mark a file Drive no longer
has under Requests as Missing from Drive. Remove (admins and up)
trashes a file and takes it off its request. Drive is asked at most
every 30 seconds, and folder lookups now cache every level walked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 23:25:58 -05:00
Zaldimmar
9ff1cd6e99 Make link cards smaller, up to three in a row
One grid whatever the count, so a lone card takes a column rather than
the width. Also the Blog Posts request folder's name, as it is in Drive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 23:21:48 -05:00
Zaldimmar
7f05076a86 Add Drive folders: per request type, and managed from the Media page
Request files go in Requests/<type> (Chapters, Events...). Media →
Files shows a tab per folder under Media, up to three deep, and can
make, rename (files follow) and delete empty folders, move a file with
its Folder dropdown, and upload into the folder showing; Choose a file
has the same tabs. A folder made, or a file moved, in Drive by hand is
followed on the next look (migration 050 records each file's folder).

Deletes now move to Drive's trash: a shared drive's Content manager,
the service account's role, can't delete outright, so request and file
deletes would have failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:34:27 -05:00
Zaldimmar
9854da965e Keep uploaded images in folders by what they're for
logos/ for logo and icon fields, thumbnails/ for previews the site
saves (link previews, Drive first pages), images/ for everything else;
each small copy beside its image. Images from before folders are
sorted once at boot by their uses, and every record naming them is
rewritten in one transaction after the files move.

The Media page and image pickers get a tab per folder; a picker opens
on its field's folder and uploads there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:29:22 -05:00
Zaldimmar
4b249c9e52 Let a content request carry the record's details, and open its editor
The Request form asks each type for its main details (a chapter's
city, meeting time, website and email; an event's dates, venue and
registration link...), stored as one JSON column (migration 049). The
server only checks the shape; the fields are src/data/requestTypes.ts.

Forms → Content requests shows them, and for a new record opens the
New editor filled in (URL ID from the name, links and a description
paragraph added); for an update, picks the record (closest name
first) and opens it with each requested value beside the current one
to use or skip. Nothing is saved until Save.

Also centres the image and file pickers, which Tailwind's reset had
pinned to the top left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:21:33 -05:00
Zaldimmar
b504c24fb0 Keep page files in the shared drive's Media folder, not Blog
The folder isn't only for blog posts. A Blog folder made before this
can be renamed to Media in Drive; its files keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:33:19 -05:00
Zaldimmar
6191322fea Pick up files added to the Blog folder in Drive, and name nginx errors
Opening Tools → Media → Files (or a Choose a file picker) now looks in
the shared drive's Blog folder, at most every 30 seconds, and adds
anything put there in Drive itself: shared as anyone with the link,
previewed, Google Docs, Sheets and Slides included, folders and
shortcuts left out. A file Drive won't share is named in a note and
tried again every ten minutes.

A reply that isn't the API's (nginx's own error page) now says what it
was: a 413 names nginx's upload limit, a 502 the service, a 504 the
timeout, instead of "Server did not return JSON".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:14:40 -05:00
Zaldimmar
934598f954 Add a file library in Google Drive for pages to link to
Tools → Media → Files uploads PDF, Office (.docx, .xlsx, .pptx), MP3,
M4A and zip files, up to 50 MB, to the shared drive's Blog folder and
shares each as anyone with the link can view (migration 048). A file's
name and contents must agree.

Content block links get "Choose a file" (paragraph, button and image
links, list and link items, link cards). A link card also takes the
file's name and Drive's picture of its first page, fetched after
upload and saved into the image library; cards to Drive say "Google
Drive". Deleting a file says first what still links to it.

Setup and the nginx block: docs/google-drive-and-mail.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:37:15 -05:00
Zaldimmar
80877a4659 Let Google Workspace groups grant admin access
Site settings → Access names a group for each of admin, editor and
viewer (migration 047). Someone in one who signs in with Google gets a
Google-only account with their highest group's role, and the role
follows the groups: at every sign-in, hourly while signed in, and on
Panel → Google groups → Re-sync now. Out of every group, the account
is disabled and signed out until they're back in one.

Group accounts' roles are locked in the Panel; a superadmin's Disable
sticks. Superadmins and admin-cli accounts are never changed. If
Google can't be asked, sign-ins are refused but the hourly check
leaves accounts alone. Panel → Check their groups tests an email.

Lookups use the service account through the Directory API as
GOOGLE_DIRECTORY_AS. Setup: docs/google-sign-in.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:44:04 -05:00
Zaldimmar
8fd3a9b15b Add a test notice button to Site settings
Panel → Site settings → Notices → Send a test notice emails the
addresses in the box now and shows where it came from, or Google's
reason for refusing, so the Gmail setup can be checked without the
journal. Superadmins only (POST /api/admin/panel/test-notice).

The docs now say the sender must be a Workspace user: a group can't
be acted as through delegation, though it can receive notices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:18:43 -05:00
Zaldimmar
0f6a796021 Keep Drive files in named folders of one shared drive
GOOGLE_SHARED_DRIVE (the shared drive's bare id) replaces
GOOGLE_DRIVE_FOLDER. driveUpload takes a folder path, found by name in
the shared drive or made the first time, so each use gets its own
folder: "Requests" for the Request form now, others later. The docs
say plainly that the setting is the id only, not the address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:53:40 -05:00
Zaldimmar
dc53af238f Add a Request form, with files in Google Drive and email notices
One form at /request for blog posts, events, and new or updated
chapters, regions (updates only), partners, teams, awards and people.
?type= opens it on one; buttons on the Community sections, blog posts,
Retreats and the front page calendar do. Files (.docx, PDF, JPEG, PNG)
go to a Google Drive folder through a service account.

Requests are feedback rows of type 'content' (migration 046), in a
third Forms queue: files download from Drive, a .docx can become a
draft blog post, and deleting a request deletes its files. New content
and data requests email the addresses in Site settings through Gmail.

Setup: docs/google-drive-and-mail.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:54:00 -05:00
Zaldimmar
c03914a210 Move Blog posts from Pages to Data in the admin menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:33:09 -05:00
Zaldimmar
7f12824c93 Import a Word document as a blog post, and add table blocks
- Table content blocks (migration 044): a grid of text, a row per
  line, cells split by |, the first row the header; cells take the
  same formatting as a paragraph; wide tables scroll on a phone
- Blog posts -> Import from Word: the server reads the .docx (zip and
  XML read without a library, sizes capped) and creates an unpublished
  post through the CRUD engine: title, date, headings, paragraphs,
  lists, tables, bold, italic and links; the editor opens with a note
  of what came over and what didn't (images)
- docs/importing.md, and an nginx block for the upload

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 12:44:20 -05:00
Zaldimmar
2b009beac1 Use organization-neutral names in code and browser keys
- The timeline's ngu-tl classes and keyframes are site-tl; nguLogo is
  siteLogo; the event card's ngu grid area is org; window.__NGU_SITE__
  is window.__SITE__; QR downloads are qr-<page>.png
- Browser keys (theme, closed banner and privacy notice, chunk reload)
  start site-; the page's first script moves any old ngu- values over
  once, so nobody loses their theme or sees a closed notice again
- Session and Google sign-in cookies are site_session and site_oauth
  (__Host- over https); everyone signs in again once

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 09:23:29 -05:00
Zaldimmar
f934b1dd93 Tidy the structure the audit found
- The colour defaults have one source, server/src/themeDefaults.js,
  read by the server and the admin; the build stops if src/index.css
  disagrees with it
- server/src/admin-schema.js split into admin-schema/, one file per
  entity plus columns.js (the registry checked identical)
- loadOwned() in shape.js replaces the same three loads on four
  detail routes (every public route checked identical); one NO_STORE
- One OrgLogo component for the org lists and the chapter map; an
  organization's own page now shows the same initials as the lists
- One localISO() for the viewer's calendar day, in place of three
- Boot refuses a descriptor dropdown value the table's CHECK doesn't
  allow, instead of it failing on save
- Deleted the unused Other.tsx and white-background logo;
  chapters.ts is useCommunity.ts; isSuper() in the Panel; stale
  comments and docs corrected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 03:02:21 -05:00
Zaldimmar
048c7599ce Fix dark mode and bring the public design in line with the taste audit
- Dark mode: the countdown card, timeline section, Giving text, error
  text, the Leadership button, skeletons and the admin's dark text all
  follow the tokens; logos get a light plate in dark mode
- One BRAND accent (the button token, so the admin palette reaches
  every page) and one ACCENTS family in color.ts, replacing 20 local
  teal constants and the purple, ochre and rust section colours;
  neon green and gold become mint and brand green
- Shadows are tinted with the site's ink; glow shadows are gone
- One giving label, Give, in the nav, footer and Giving page
- Phosphor icons replace the hand-drawn SVGs and the glyph icons;
  Pathfinder paths pick a named icon (emoji still shown) and lose the
  watermark
- Home keeps two eyebrows; StatsBand's title is a real heading;
  section headings step down under the page title
- Nav links switch to the menu below lg, so they never wrap; jump
  links land clear of the header; press feedback on buttons
- Empty sections say what's coming and who to ask; loading is a
  skeleton; form placeholders and borders are readable; one
  corner-radius rule; theme-color for both modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 02:54:03 -05:00
Zaldimmar
f72a9604d2 Make the site faster to load and lighter on the server
- Every page but Home, and the whole admin, loads on first visit: the
  main bundle drops from 579 kB to 314 kB (173 to 98 kB gzipped); a
  tab on an old build reloads once when a page chunk has gone
- Home asks for events and the timeline alongside its own data, and
  the server preloads /api/front-page and the first hero photo
- Hero headline rises in as one piece (it held back the page's
  largest paint), sized to stay within two lines; min-h in dvh; first
  slide fetched at high priority
- Every raster upload gets a 640px copy (at upload, and at boot for
  older files); logos, avatars and card pictures load it and fall
  back to the full file
- Login password checks run off the event loop; only admin requests
  are logged per request; ffmpeg runs at nice 19 on Linux
- Page HTML is no-cache, so a deploy can't strand a cached page on
  missing assets; source maps are no longer linked
- Migration 042: index person_awards by award
- docs/performance.md, and gzip and HTTP/2 for nginx

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 02:41:45 -05:00
Zaldimmar
be7e92417e Fix the Panel account bug and harden what the second audit found
- Panel: changing a role or disabling an account always failed
  (db.transaction doesn't exist on node:sqlite); it uses tx() now
- Feeds and link previews are scanned with indexOf, not whole-document
  regexes, so a hostile feed or page can't freeze the server; entity
  decoding can't throw; escaped-HTML descriptions make clean excerpts
- Feed reads share one fetch per feed and serve the stale copy while
  a refresh runs
- Deliberate HTTP errors (the CSRF 403) keep their status instead of
  becoming logged 500s; a JSON null body is handled
- url columns read the scheme the way the URL parser does, so
  control characters can't hide javascript:
- Google sign-in state cookie is __Host- and its return page is
  checked again; more reserved ranges blocked for previews and feeds,
  and a 15 s cap on each whole fetch
- Log lines from visitor text are made single-line and short; list
  limits can't go negative; entity names can't hit object prototypes
- A clip title can't point the clip tool at another file
- Uploads over 60 MP are refused before decoding; the Keep original
  help says a photo's location stays in it
- admin-cli add defaults to the editor role

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 02:34:26 -05:00
Zaldimmar
b165e612c2 Harden sign-in: __Host- session cookie and a per-email login lock
- The session cookie is __Host-ngu_session when Secure (production),
  so a sibling subdomain can't set or overwrite it; plain ngu_session
  over local http. Every admin signs in again once after deploying.
- Five wrong passwords for one email lock that email for 15 minutes,
  from any address; a correct password clears it. On top of the
  per-IP limit.
- CLAUDE.md: noImplicitAny stays off on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 02:11:57 -05:00
Zaldimmar
f1edaaf92a Let superadmins change the whole colour palette
Panel -> Site settings -> Colours: any colour token, with a light and a
dark value (migration 041). The server writes the overrides into each
page's head in the same cascade layers as index.css, so a light-only
change leaves dark mode alone. Values must be #rrggbb (a table CHECK),
and saving refuses a palette that puts any text under 4.5:1 in either
mode, through a new descriptor hook, check(db, id), run inside the
save's transaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 23:26:35 -05:00
Zaldimmar
f94f1a6584 Point the docs at the split admin schema files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:49:36 -05:00
Zaldimmar
e4a9c96f7e Finish the audit leftovers
- One mediaUrl in media.ts instead of 12 identical aliases and a
  kind map; orgPath builds on hrefs.ts's orgHref
- One Logo component (hides itself or shows a fallback when the file
  is missing) for event cards, org lists and chapter marks
- useHistory is a thin wrapper over useRecord
- adminSchema.ts split into adminSchema/, one file per entity plus
  shared.ts; the registry is unchanged (checked by loading both)
- JS smooth scrolls respect reduced motion (lib/motion.ts)
- Content-Security-Policy in Report-Only, with /api/csp-report logging
  what it would block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:49:07 -05:00
Zaldimmar
c74ad746f5 Add colour tokens, dark mode and drop gradients
- Colour tokens in index.css named by role (ink, body, muted, link,
  brand, action, surface, tint, danger), used everywhere instead of hex
- Dark mode: follows the system, a header toggle (site and admin)
  overrides it and is remembered; set before first paint in index.html
- Data colours go through src/lib/color.ts: withAlpha for tints,
  accentText (lighter on dark) for text in an accent, readableOn for
  text on one, so an admin's pale colour still reads
- Migration 040 drops events.gradient: a card is its photo or plain,
  with its colour as the border; other decorative gradients are solid
- The countdown and a hero event without a photo mix their colour
  toward ink behind white text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:42:59 -05:00
Zaldimmar
ee61568911 Add the Privacy and Terms pages, data requests and click-to-load embeds
- Privacy Policy (with cookies and storage) and Terms of Service, from
  what the code actually stores and loads; shared LegalText layout
- Data requests: a 'privacy' feedback type sent from the Privacy page's
  form, email required, triaged in Admin -> Feedback
- Migration 039: Panel -> Site settings -> Privacy contact email (over
  site.json's privacyEmail), shown on the Privacy page
- The hero livestream, the hero featured video and schedule maps load
  only when pressed, so no third party sets anything before a click
- A small dismissible privacy notice instead of a consent banner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:34:46 -05:00
Zaldimmar
bff082652a Send HSTS from nginx, not the API
nginx serves /assets, /uploads and the fallback index.html itself, so
the API's HSTS header never reached them. nginx now sends it on
everything and the API stops, so proxied pages don't get it twice.
docs/security-headers.md says who sends which header and what nginx
must pass (Host, X-Forwarded-For) for the CSRF check and rate limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:20:53 -05:00
Zaldimmar
a393bde2da Let yt-dlp sign in with cookies when YouTube asks
When YouTube answers the server with "sign in to confirm you're not a
bot", yt-dlp needs a signed-in account's cookies. YTDLP_COOKIES points
at an exported cookies.txt, copied per download so the original is
never rewritten; YTDLP_COOKIES_FROM_BROWSER passes yt-dlp's
--cookies-from-browser for a browser on the server. Setup, and the
advice to use a separate account, is in docs/video-clips.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 03:03:48 -05:00
Zaldimmar
beca01c351 Add a video clip tool: download our videos, cut, reshape, export
Tools → Video clips (migration 036, admins and up). Paste a YouTube
or Facebook link and the server downloads it with yt-dlp; then cut
clips: start and end set while watching, a shape (as filmed, 16:9,
square or 9:16 at the sizes the platforms ask for, cropped around a
chosen point shown over the video), and MP4 video or MP3 audio.

Jobs queue and run one at a time with progress. Only YouTube and
Facebook links are accepted, and both tools run with argument lists,
never a shell. A clip's file is deleted once it has been downloaded
in full, unless it's saved to the media library first, which now
holds video and audio (image fields still pick images only).
Everything is swept a day after it's made. Setup is in
docs/video-clips.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 02:43:05 -05:00
Zaldimmar
47df7b1fe0 Add Site settings: name, description, icons, page titles, indexing
Panel → Site settings (migration 035, superadmins only) edits the
site's name, description, preview image, favicon and home-screen
icon, each static page's title and intro, and whether search engines
may list the site. Every value overrides site.json; a blank one falls
back to it. The indexing switch is per database, so the dev server
can be off while production is on from one build.

The server merges the two (siteFor in pageMeta.js) for page metadata,
the sitemap and a new /robots.txt route, and writes the merged
wording into each page as window.__NGU_SITE__, which site.ts reads so
headings match with no extra request. Entities can now require a
higher role to save (writeRole), checked on both sides. Panel is a
menu group with Accounts and server, and Site settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 00:36:58 -05:00