mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 09:40:40 +00:00
Improve flyer tear-offs, shorten poster URL, adaptive tracking
- Tear-off tabs: single hyperlinked statement (no printed URL), with "Share and reprint." on its own line; localize "Click to open this poster." across all 14 languages. - Show the full event ID, bottom-anchored on each tab, split into two 32-char lines at max readable monospace size. - Shorten the poster URL by encoding the naddr with a single relay hint instead of the full relay list (~233 -> ~171 chars) for an easier-to- scan QR; still a standard naddr, older URLs resolve unchanged. - Add per-script letter-spacing policy (ls-full/ls-cjk/ls-none) to fit more text per line where safe, and turn tracking off for Arabic, Persian, and Hindi (fixes broken cursive joins / combining marks). - Move the "field too long" warning inline under the offending field instead of a single bottom status line. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
9baf5fb195
commit
aedb381dfb
4 files changed
+188
-73
No files matched your search
@@ -100,6 +100,8 @@ Default behavior: `qr_target: "flyer_url"`.
|
||||
|
||||
When publishing, the client computes the replaceable-event `naddr` and writes the generated poster URL to `tear_off_link`. The tear-off tabs and tear-off QR code point at `tear_off_link`, so people can re-open and reprint the flyer. The main flyer QR code points at `url`, so viewers can visit the creator's intended destination.
|
||||
|
||||
The `naddr` is encoded with a **single relay hint** (the primary configured relay) instead of the full relay list. This keeps the poster URL short and its tear-off QR code easy to scan — a typical poster URL drops from ~233 characters (full list) to ~171 — while still pointing a fresh viewer at a relay that has the event. Viewers also fall back to `DEFAULT_RELAYS`, which is where flyers are published by default. This stays a standard NIP-19 `naddr`, so any Nostr client can resolve it, and older relay-bearing `naddr` URLs continue to decode and resolve unchanged.
|
||||
|
||||
Supported values:
|
||||
|
||||
- `flyer_url`: tear-off QR points to the hosted client URL for the poster
|
||||
@@ -135,6 +137,27 @@ Language changes should:
|
||||
- update printed side-tab labels
|
||||
- respect RTL direction metadata
|
||||
|
||||
### Letter-spacing by script
|
||||
|
||||
Flyer text uses tighter letter-spacing than the original design to fit more
|
||||
characters per line, but `letter-spacing` is not script-neutral, so it is
|
||||
applied per script via a policy class on the flyer `.container`
|
||||
(`LETTER_SPACING_POLICY` in `nostr-client.js`; `ls-full` / `ls-cjk` / `ls-none`
|
||||
rules and `--ls-*` variables in `nostr-client.css`):
|
||||
|
||||
- `full` — Latin, Cyrillic, Hebrew: reduced positive tracking on the display
|
||||
fields plus a slight negative on body/URL to reclaim line width.
|
||||
- `cjk` — Japanese, Chinese: tracking is clamped to `0` and never negative, so
|
||||
full-width glyphs do not overlap.
|
||||
- `none` — Arabic, Persian, Hindi: letter-spacing is turned off entirely. These
|
||||
are cursive or complex scripts where any tracking breaks the letter joins or
|
||||
detaches combining marks. (This also corrected the prior behavior, which
|
||||
applied the design's display tracking to every language unconditionally.)
|
||||
|
||||
When adding a language, classify its script in `LETTER_SPACING_POLICY` (default
|
||||
is `full`) and verify the headline, subtitle, and body render correctly in the
|
||||
browser.
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user