mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
Add a dayTintProvider plugin hook
Lets a plugin colour-code days in the Plan sidebar. trip-segments can already announce "Kanazawa begins" in the day plan, but it can't make day 12 look like it belongs to Kanazawa. dayScheduleProvider can't cover this: it renders a fixed row, and it's capped at 60 items per provider, so one item per day would tint the first 60 days of a six-month trip and silently stop. This hook is bounded by day count instead. GET /api/day-tints/:tripId returns per-day tones for three regions of a day card - the number badge (also the mobile day chip), the header row, and the expanded activity list. `tone` is a shorthand filling every region a contribution doesn't name; unnamed regions render as they do today. Tones only, never hex, so the host can pick the alpha per theme and per region. One contribution per day, resolved whole: first entry wins within a provider, first granted provider wins across plugins.
This commit is contained in:
@@ -32,6 +32,11 @@
|
||||
--m-mkfg: #fff;
|
||||
--m-trackoff: rgba(16,16,19,.14);
|
||||
|
||||
/* Strength of a dayTintProvider plugin's colour on an inactive day chip. A notch
|
||||
* above the desktop badge: the chip has no neutral base under it, so a softer tint
|
||||
* reads as a rendering artifact rather than a deliberate colour. */
|
||||
--day-tint-chip: 20%;
|
||||
|
||||
/* Toggle knob is white on both themes (off-track is translucent enough). */
|
||||
--m-knob: #fff;
|
||||
|
||||
@@ -78,6 +83,7 @@
|
||||
--m-mkr: #F5F5F7;
|
||||
--m-mkfg: #101013;
|
||||
--m-trackoff: rgba(255,255,255,.14);
|
||||
--day-tint-chip: 28%;
|
||||
}
|
||||
|
||||
/* Geist "subtext" tier weight — single knob. The design's Geist labels/numbers
|
||||
|
||||
Reference in New Issue
Block a user