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>
This commit is contained in:
parent
ee61568911
commit
c74ad746f5
70 changed files with 829 additions and 596 deletions
|
|
@ -378,7 +378,6 @@ const events = {
|
|||
text("org_logo"),
|
||||
text("event_logo"),
|
||||
text("color"),
|
||||
text("gradient"),
|
||||
text("card_image"),
|
||||
bool("is_published"),
|
||||
bool("is_listed"),
|
||||
|
|
|
|||
12
server/src/migrations/040_drop_event_gradient.sql
Normal file
12
server/src/migrations/040_drop_event_gradient.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- ═══════════════════════════════════════════════════════════════
|
||||
-- 040 NO MORE CARD GRADIENTS
|
||||
--
|
||||
-- An event card is its photo (card_image) under a light veil, or a
|
||||
-- plain card, always with the event's colour as its border. The
|
||||
-- gradient layer went over the photo and hid it, and gradients are
|
||||
-- leaving the design, so the column goes. Any gradient saved on an
|
||||
-- event is dropped with it; the card falls back to its photo or the
|
||||
-- plain surface.
|
||||
-- ═══════════════════════════════════════════════════════════════
|
||||
|
||||
ALTER TABLE events DROP COLUMN gradient;
|
||||
|
|
@ -147,7 +147,6 @@ function shapeEvent(row, links, cardBlocks, hosts = []) {
|
|||
org_logo: row.effective_org_logo,
|
||||
event_logo: row.event_logo,
|
||||
color: row.effective_color,
|
||||
gradient: row.gradient,
|
||||
card_image: row.card_image,
|
||||
|
||||
hosts: hosts.map(shapeHost),
|
||||
|
|
|
|||
|
|
@ -352,7 +352,6 @@ tx(db, () => {
|
|||
org_logo: IMAGE,
|
||||
event_logo: IMAGE,
|
||||
color: "#d62976",
|
||||
gradient: "linear-gradient(160deg, rgba(214,41,118,0.10), rgba(19,139,160,0.10))",
|
||||
card_image: IMAGE,
|
||||
is_published: 1,
|
||||
is_listed: LISTED,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue