diff --git a/MEMORY.md b/MEMORY.md index 6a1b5d3..146ff0a 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -150,4 +150,12 @@ - **Problem**: the chores todo card rendered `due 050826` (DDMMYY code) — ambiguous/terrible for a due date. - **Fix**: added `formatShortDate()` to `frontend/src/lib/format.ts` — renders `5 Aug` (adds ` 26` when the year isn't the current one). Chores todo card now shows `due 5 Aug`. AGENTS.md date rule updated: DDMMYY for dense/range contexts, `formatShortDate()` for single human-readable dates like due dates. +### 2026-08-04 — Child-Dashboard Design Lead Applied to All Pages + +- **Design principal** (from `[fam]/[username]` child dash): gradient hero lead (`linear-gradient(135deg, #6366f1, #8b5cf6 55%, #a855f7)`, radius 16px, glow shadow, white text), gradient stat tiles, rounded white cards. +- **`ViewHeader` hero variant**: added `hero` prop to `frontend/src/lib/components/ViewHeader.svelte` — renders the title/subtitle/tools on the gradient hero (tabs/nav/sort get tinted-on-white styling). Off by default, so no behavior change elsewhere. +- **Applied `hero` to**: admin dashboard (fam name), chores, bonuses, rewards, settings, preferences, platform admin `/admin`. +- **Admin dashboard stat tiles**: added 4 gradient tiles (members / points / cash / chores done) reusing the child `.tiles`/`.tile` pattern + new `.tile-members`/`.tile-chores` colors, from a new `adminTiles` derived summing `summary.summaries`. Also fixed admin subtitle `Week of {YYYY-MM-DD}` → `Week of {DDMMYY}`. +- **Check**: frontend `svelte-check` stays at 12 baseline errors. Note: frontend dev server on :2080 was not running when verified (proxy :3456 up). + diff --git a/frontend/src/lib/components/Card.svelte b/frontend/src/lib/components/Card.svelte index 3899029..b3c1f1f 100644 --- a/frontend/src/lib/components/Card.svelte +++ b/frontend/src/lib/components/Card.svelte @@ -3,21 +3,23 @@ cols = 1, title, accent, + scrollX = false, children - }: { cols?: 1 | 2 | 3 | 4 | 5 | 6; title?: string; accent?: string; children?: any } = $props(); + }: { cols?: 1 | 2 | 3 | 4 | 5 | 6; title?: string; accent?: string; scrollX?: boolean; children?: any } = $props();
{subtitle}
{/if} @@ -68,4 +69,24 @@ padding: 0.3rem 0.6rem; border: 1px solid #d1d5db; border-radius: 5px; font-size: 0.85rem; background: #fff; } + + /* ── Hero lead (child-dashboard style) ── */ + .view-header.hero { + background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #a855f7); + border-radius: 16px; + padding: 1.25rem 1.5rem; + color: #fff; + box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35); + } + .view-header.hero .view-title-group { margin-bottom: 0.25rem; } + .view-header.hero .view-title { color: #fff; } + .view-header.hero .view-subtitle { color: rgba(255, 255, 255, 0.85); } + .view-header.hero .view-tools { margin-top: 0.75rem; } + .view-header.hero .tab-bar { background: rgba(255, 255, 255, 0.16); } + .view-header.hero .tab-btn { color: rgba(255, 255, 255, 0.9); } + .view-header.hero .tab-btn:hover { color: #fff; } + .view-header.hero .tab-btn.active { background: #fff; color: #4338ca; } + .view-header.hero .nav-btn { background: rgba(255, 255, 255, 0.92); border-color: transparent; color: #4338ca; } + .view-header.hero .nav-label { color: #fff; } + .view-header.hero .sort-select { background: rgba(255, 255, 255, 0.92); color: #1e1b4b; } diff --git a/frontend/src/routes/[fam]/+layout.svelte b/frontend/src/routes/[fam]/+layout.svelte index d31c2ab..37b57a7 100644 --- a/frontend/src/routes/[fam]/+layout.svelte +++ b/frontend/src/routes/[fam]/+layout.svelte @@ -74,6 +74,7 @@ min-height: 100vh; display: flex; flex-direction: column; + background: whitesmoke; } .app-main { margin-left: 220px; diff --git a/frontend/src/routes/[fam]/+page.svelte b/frontend/src/routes/[fam]/+page.svelte index f957488..4b97a17 100644 --- a/frontend/src/routes/[fam]/+page.svelte +++ b/frontend/src/routes/[fam]/+page.svelte @@ -1,8 +1,9 @@ -| Member | Points | Done |
|---|---|---|
| ■ {s.memberName} | -{s.pointsEarned} | -{s.choresCompleted}/{s.totalChores} | -
No data yet this week
+ {:else} +No data yet
+ {/if} +No templates created
+ {:else} +
@@ -1328,10 +1364,17 @@
.member-card {
border: 1px solid #e5e7eb;
- border-radius: 8px;
- padding: 0.65rem;
+ border-left: 4px solid #6366f1;
+ border-radius: 10px;
+ padding: 0.65rem 0.85rem;
background: white;
margin-bottom: 0.6rem;
+ transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
+ }
+ .member-card:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
+ border-color: #c7d2fe;
}
.member-card:last-child {
margin-bottom: 0;
@@ -1386,7 +1429,7 @@
}
.bar-fill {
height: 100%;
- background: #6366f1;
+ background: linear-gradient(90deg, #6366f1, #8b5cf6);
border-radius: 4px;
transition: width 0.3s;
}
@@ -1430,11 +1473,16 @@
.trigger-card {
border: 1px solid #e5e7eb;
- border-radius: 8px;
- padding: 0.65rem;
+ border-left: 3px solid #22c55e;
+ border-radius: 10px;
+ padding: 0.65rem 0.85rem;
background: #f0fdf4;
margin-bottom: 0.6rem;
- border-left: 3px solid #22c55e;
+ transition: transform 0.15s, box-shadow 0.15s;
+ }
+ .trigger-card:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}
.trigger-card:last-child {
margin-bottom: 0;
@@ -1753,6 +1801,16 @@
color: #6d28d9;
}
+ /* ── Kanban scroll for parent view cards ── */
+ .kanban-scroll {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ margin-bottom: 1rem;
+ }
+ .kanban-inner {
+ min-width: 450px;
+ }
+
.tiles {
display: grid;
grid-template-columns: 1fr 1fr;
@@ -1774,6 +1832,12 @@
.tile-pts {
background: linear-gradient(135deg, #7c3aed, #a855f7);
}
+ .tile-members {
+ background: linear-gradient(135deg, #6366f1, #8b5cf6);
+ }
+ .tile-chores {
+ background: linear-gradient(135deg, #0284c7, #38bdf8);
+ }
.tile-val {
font-size: 1.6rem;
font-weight: 800;
diff --git a/frontend/src/routes/[fam]/[username]/bonuses/+page.svelte b/frontend/src/routes/[fam]/[username]/bonuses/+page.svelte
index 4733993..8f3b744 100644
--- a/frontend/src/routes/[fam]/[username]/bonuses/+page.svelte
+++ b/frontend/src/routes/[fam]/[username]/bonuses/+page.svelte
@@ -205,7 +205,7 @@
);
- No templates yet
{form.error}
{/if} -No templates yet
{/if}Drop a chore here
- {/if} + {/each} + +Drop a chore here
+ {/if} +