Feature fixes: admin nav, hero event, schedule block, SEO, site settings, Google sign-in, QR tool #12

Merged
ngu-git-admin merged 14 commits from feature-fixes into main 2026-09-28 08:12:29 +01:00

Fixes and features after v1.7.4. 13 commits.

What's new

  • Admin nav grouped into Data, Pages, Forms, Tools and Panel, with hover/focus menus; the admin home shows the same groups.
  • Featured event hero (033): the event's card beside the headline. Pick one, or blank for the countdown's event.
  • Schedule content block (034): day tabs (today's opens first), entries with time, location, person and link that fold out for a description, graphic and Google map (satellite view).
  • SEO and link previews: the API fills each page's title, description, preview image, canonical URL and structured data into the HTML; /sitemap.xml and /robots.txt. Unlisted records are noindex; missing ones 404. If the metadata can't be built the page is still served.
  • Site settings (035, Panel, superadmins only): site name, description, preview image, favicon, home-screen icon, static page titles and intros, and a per-database search indexing switch. Blank falls back to site.json.
  • Google sign-in for @nextgenerationofunity.org, beside passwords. Only existing accounts; the first sign-in links the account.
  • QR tool: centre image (dove or any SVG in src/assets/qr), typed links, colours with a scan warning.
  • Images: every record image resolves from /uploads/; the NGU logos moved to src/assets/logos. Files copied into the uploads folder by hand now appear in the media library.

Before deploying

  • Back up /var/lib/ngu/ngu.db. Migrations 033 to 035 run at boot; 034 rebuilds content_blocks.
  • On the ngu-api service: SITE_CONFIG (copy site.json to /srv/ngu-api/ each deploy), SITE_INDEX (the built index.html), GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI for each host. See docs/seo.md and docs/google-sign-in.md.
  • nginx: the page, home page, /robots.txt, /sitemap.xml and upload blocks from docs/seo.md.
  • Records whose image is a bare filename need that file in /var/lib/ngu/uploads/.
  • On a dev server, set Panel → Site settings → search indexing to Off.

Testing

Type-check and build pass. Server changes (migrations, page metadata, Google sign-in with a stubbed Google, write roles, media registration, feeds) were tested in-process against a scratch database. The new screens have not been checked in a browser.

🤖 Generated with Claude Code

Fixes and features after v1.7.4. 13 commits. ## What's new - **Admin nav** grouped into Data, Pages, Forms, Tools and Panel, with hover/focus menus; the admin home shows the same groups. - **Featured event hero** (033): the event's card beside the headline. Pick one, or blank for the countdown's event. - **Schedule content block** (034): day tabs (today's opens first), entries with time, location, person and link that fold out for a description, graphic and Google map (satellite view). - **SEO and link previews**: the API fills each page's title, description, preview image, canonical URL and structured data into the HTML; `/sitemap.xml` and `/robots.txt`. Unlisted records are noindex; missing ones 404. If the metadata can't be built the page is still served. - **Site settings** (035, Panel, superadmins only): site name, description, preview image, favicon, home-screen icon, static page titles and intros, and a per-database search indexing switch. Blank falls back to `site.json`. - **Google sign-in** for @nextgenerationofunity.org, beside passwords. Only existing accounts; the first sign-in links the account. - **QR tool**: centre image (dove or any SVG in `src/assets/qr`), typed links, colours with a scan warning. - **Images**: every record image resolves from `/uploads/`; the NGU logos moved to `src/assets/logos`. Files copied into the uploads folder by hand now appear in the media library. ## Before deploying - Back up `/var/lib/ngu/ngu.db`. Migrations 033 to 035 run at boot; 034 rebuilds `content_blocks`. - On the `ngu-api` service: `SITE_CONFIG` (copy `site.json` to `/srv/ngu-api/` each deploy), `SITE_INDEX` (the built `index.html`), `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_REDIRECT_URI` for each host. See `docs/seo.md` and `docs/google-sign-in.md`. - nginx: the page, home page, `/robots.txt`, `/sitemap.xml` and upload blocks from `docs/seo.md`. - Records whose image is a bare filename need that file in `/var/lib/ngu/uploads/`. - On a dev server, set Panel → Site settings → search indexing to Off. ## Testing Type-check and build pass. Server changes (migrations, page metadata, Google sign-in with a stubbed Google, write roles, media registration, feeds) were tested in-process against a scratch database. The new screens have not been checked in a browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ngu-git-admin added 13 commits 2026-09-28 08:08:23 +01:00
The header now has one menu per group: its name opens the first
item, and hovering or tabbing into it drops down the rest. The strip
under the header lists the open group's items, which is also the way
around on a touch screen. The admin home shows the same groups as
card blocks, from the same list in adminNav.ts.

Data holds the record types, Pages the front page, timeline, blog
posts and the Community blog section, Tools the media library and QR
codes. Docs and comments name the new menu paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Front page → Feature gains "Featured event" (migration 033): the
event's card beside the headline, with its photo or colour, dates or
schedule, place, tagline, action buttons and a link to its page,
under a "Featured event" badge, over either backdrop.

Front page → Featured event pins one. Blank uses the countdown's
event, and a pinned event that's over or unpublished falls back to
it, so the hero and the countdown never disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A schedule block's entries (migration 034) each have a day, time,
title, detail, location, person and link, and fold out for a longer
description, the person's photo and page, a graphic and a Google map
of a place or address. Entries sit in one tab per day, in the order
entered; the tab for today's weekday opens first, and a one-day
schedule draws no tabs.

In the editor, the entry fields show only under a schedule block:
repeater `when` can now look at the parent row (scope "parent"), and
a field's label can depend on the row. The block preview names an
entry's person. The showcase retreat and post each have a schedule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Page requests now go through the API (routes/pages.js), which fills
the built index.html in for that path before the app loads: title,
description, preview image, canonical URL, and structured data
(Organization, Event, BlogPosting). Shared links preview the page
itself. Unlisted records are noindex; missing ones return 404.
/sitemap.xml lists every public, listed page.

site.json is the one place for the site's name, address, default
description and preview image, and each static page's title and
intro, which the pages now read too. Indexing is switched on:
robots.txt allows all but /admin and /api and names the sitemap. The
browser tab title follows the page.

nginx setup, with a fallback to the plain page if the API is down,
is in docs/seo.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The login page offers "Sign in with Google" above email and password,
once GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are set on the service.
It's the server-side authorization-code flow with PKCE; the ID token
comes straight from Google's token endpoint and is checked for
issuer, audience, expiry, a verified email and the Workspace domain
(Google's hd claim).

Only accounts admin-cli has made get in. The first Google sign-in
links the account with the same email; later ones match by the link.
A disabled account, one linked to another Google account, or a
missing account is refused, with a message on the login page, and a
refused sign-in never changes the account. admin-cli list shows which
accounts are linked. Setup is in docs/google-sign-in.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/api/auth/providers read site.json to build Google's return address,
and the deploy copies server/ into /srv/ngu-api without site.json, so
it threw and the login page hid the button. Whether Google is on now
depends only on the client id and secret; a missing return address is
logged when a sign-in starts, naming GOOGLE_REDIRECT_URI and
SITE_CONFIG. The docs say how the server is actually deployed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no site.json on the server, every page request threw and came
back as the API's JSON 500, so the site didn't load. The page route
now serves index.html as built, with the default tags, and logs the
cause once; the sitemap answers 503. The nginx snippet in docs/seo.md
also falls back to the plain page on a 500, sends the home page
through the API, and gives uploads their own body-size limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The site's own logos now live in src/assets/logos. Event logos are no
longer bundled: the event cards resolve them through media.ts like
every other image, and a bare event-logo filename now means one in
the uploads directory (fall-retreat-logo.svg has been moved there by
hand). Organization logos on the cards resolve from org-logos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The centre can be nothing, the NGU dove, or any SVG dropped into
src/assets/qr, embedded in the code so downloads carry it. "A link I
type" takes a site path (sent to the live site), a full http(s)
address, or a bare domain. The code, background and dove colours can
be changed, with a warning under 4:1 contrast or for an inverted
code, which many scanners can't read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare image filename, whatever it belongs to (organization and event
logos, people photos, team and award logos, backgrounds, hero photos,
block images), now resolves to /uploads/<file>, in media.ts and for
link previews in pageMeta.js. The per-kind public/ folders were
guesses that don't exist. Only the site's own chosen assets, the NGU
logos in the nav, footer and admin, stay bundled from
src/assets/logos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The library only knew files uploaded through the admin. Listing it
now registers any image in the uploads folder that has no media row,
under its own name and unprocessed, at most every 30 seconds.
Non-images, dotfiles and temporary names are skipped. The delete
check also counts records that name a file by its bare filename, and
a hand-copied name is escaped in its URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
ngu-git-admin added 1 commit 2026-09-28 08:12:04 +01:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ngu-git-admin merged commit 8f3f907311 into main 2026-09-28 08:12:29 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ngu-git-admin/NGU-Web#12
No description provided.