Commit graph

3 commits

Author SHA1 Message Date
Zaldimmar
9eeb13c5ec QR tool: choose the centre, type any link, pick the colours
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>
2026-09-27 23:20:55 -05:00
Zaldimmar
54bf649b8d Tidy the admin editor's text: previews, blank options, no em-dashes
Your wording pass on adminSchema.ts and fields.tsx: "Default: ..."
blank options, "eg." examples, "URL ID" for slugs, and relabelled
front page sections, stat sources and hero fields.

On top of it:

- Content block row titles end with an ellipsis when the paragraph
  is cut. preview() in src/lib/text.ts does it for anything that
  shortens text: it collapses whitespace, cuts on a word and adds
  "..." only when it actually shortened.
- No em-dashes in the editor, front end or server: placeholders
  ("Internal note: ..."), the Organizations blurb, the URL ID help,
  empty table cells (now "-"), the Award dropdown ("Torch Award
  (NGU)" in OPTION_QUERIES), a boot error message, and every comment
  in the admin files. Also cleared from the files added this branch
  (QR page, directory route, embeds, hero, migration 024), and the
  QR page's team labels read "Board (NGU)".
- A few comments where removing the dash had run two sentences
  together get a comma, colon or parentheses back.
- docs/updating-data-in-code.md matches the new labels and gains a
  "Writing text in the editor" section with these conventions;
  CLAUDE.md lists them under Rules and gotchas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 19:38:24 -05:00
Zaldimmar
97c1827ca9 Add a QR code page at /qr for any page on the site
Pick "Main navigation" or a kind of record (events, organizations,
teams, awards, people), then the page or record, and for a main page
optionally one of its #sections. The code, a copy-link button, and
PNG (1024px) and SVG downloads follow. An "NGU dove in the centre"
option puts the dove on a white badge over the code and raises error
correction to H so it still scans.

Codes always point at SITE_ORIGIN (https://nextgenerationofunity.org,
in src/lib/site.ts), so one made on localhost works on a poster.
Main pages come from navConfig.ts and record URLs from hrefs.ts, the
same sources the site links with.

GET /api/directory lists every published record with a page, as id,
name and (for organizations) kind, each filtered by the same rule as
that record's own page: a team also needs its organization
published. /api/people only answers for ids it's given, so there was
no public list to read.

The `qrcode` package does the encoding; QrCode.tsx draws the modules
as one SVG path, so the preview and both downloads are one picture.
The page is lazy-loaded so the encoder isn't in the main bundle.

The page is unlisted: not in navConfig, so not in the header or
footer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 18:24:08 -05:00