From a953b1bcf43660f867a6e92ac89d7e985600ebe0 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Fri, 6 Nov 2026 11:36:43 -0600 Subject: [PATCH] Highlight today in the Calendar list --- CHANGELOG.md | 2 +- frontend/src/routes/CalendarPage.svelte | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91d0467..3b52022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and ### Added - A published scan's photo can still be viewed from its scan page, under "Scanned photo", until it's deleted after `IMAGE_RETENTION_DAYS`. -- Today stands out on the Lunch screen: a filled day number like the month view, a "Today" label and a tinted card. +- Today stands out on the Lunch screen and in the Calendar list: a filled day number like the month view, a "Today" label and a tinted card. ## [0.0.3] - 2026-11-06 diff --git a/frontend/src/routes/CalendarPage.svelte b/frontend/src/routes/CalendarPage.svelte index 7d17440..9cf4ed2 100644 --- a/frontend/src/routes/CalendarPage.svelte +++ b/frontend/src/routes/CalendarPage.svelte @@ -11,7 +11,7 @@ import MapPin from '@lucide/svelte/icons/map-pin'; import { api, KINDS, type CalEvent, type EventValues } from '../lib/api'; import { app, toast } from '../lib/state.svelte'; - import { monthEnd, monthLabel, parse, shiftMonth, thisMonth, whenLabel } from '../lib/dates'; + import { iso, monthEnd, monthLabel, parse, shiftMonth, thisMonth, whenLabel } from '../lib/dates'; import { KIND_ICONS } from '../lib/icons'; import PageHeader from '../lib/ui/PageHeader.svelte'; import EmptyState from '../lib/ui/EmptyState.svelte'; @@ -43,6 +43,7 @@ } return [...days.entries()].sort(); }); + const today = iso(new Date()); const lastDownload = $derived(calendar?.last_exported_at ? new Date(calendar.last_exported_at.replace(' ', 'T') + 'Z') : null); async function load() { @@ -143,11 +144,14 @@
    {#each byDay as [day, list] (day)} {@const d = parse(day)} -
  1. + {@const isToday = day === today} +
  2. + {#if isToday}Today{/if}