From 00365165fe714e98eff5a98f866dbe6ccacf752b Mon Sep 17 00:00:00 2001 From: agent Date: Mon, 26 Oct 2026 17:50:37 +0000 Subject: [PATCH] Public site on phones: basket lines, timeline, events calendar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Checkout: a basket line's quantity, price and remove button go on their own row under the description on a phone (a bundle's description was squeezed into a one-word column and the price ran into the ✕). - Timeline: cards stack in one column without the desktop overlap. - Events calendar: on a phone the grid shows thin coloured bars and a list of the month's events under it (name, dates, description, link); the hover box is desktop-only and opens leftwards on Thu–Sat so it stays on screen. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW --- .../shared/src/blocks/CheckoutBlock.svelte | 79 ++++++++++--------- .../shared/src/blocks/TimelineBlock.svelte | 7 +- .../src/blocks/UpcomingCalendarBlock.svelte | 49 +++++++++--- 3 files changed, 83 insertions(+), 52 deletions(-) diff --git a/packages/shared/src/blocks/CheckoutBlock.svelte b/packages/shared/src/blocks/CheckoutBlock.svelte index 4e9bbe7..ec271bc 100644 --- a/packages/shared/src/blocks/CheckoutBlock.svelte +++ b/packages/shared/src/blocks/CheckoutBlock.svelte @@ -394,7 +394,8 @@ diff --git a/packages/shared/src/blocks/TimelineBlock.svelte b/packages/shared/src/blocks/TimelineBlock.svelte index 9673c9e..4d3a3a9 100644 --- a/packages/shared/src/blocks/TimelineBlock.svelte +++ b/packages/shared/src/blocks/TimelineBlock.svelte @@ -6,8 +6,9 @@ let items = $derived(data.items?.length ? data.items : [ { title: 'Your story here', description: 'Add milestones, training, or the journey behind the practice.' } ]); + // Desktop only: cards alternate sides and overlap a little; on a phone they stack in one column. let widths = $derived(items.map((_: TimelineItem, i: number) => { - const opts = ['w-[78%]', 'w-[85%]', 'w-[90%]', 'w-[95%]', 'w-[98%]']; + const opts = ['md:w-[78%]', 'md:w-[85%]', 'md:w-[90%]', 'md:w-[95%]', 'md:w-[98%]']; return opts[(i * 7 + 3) % opts.length]; })); @@ -19,9 +20,9 @@
{#each items as item, index} -
+
-
+

{item.title}

{item.description}

diff --git a/packages/shared/src/blocks/UpcomingCalendarBlock.svelte b/packages/shared/src/blocks/UpcomingCalendarBlock.svelte index 2749794..d59c7ec 100644 --- a/packages/shared/src/blocks/UpcomingCalendarBlock.svelte +++ b/packages/shared/src/blocks/UpcomingCalendarBlock.svelte @@ -4,6 +4,7 @@ dateKey, eventMatchesCategories, eventOverlapsDay, + eventOverlapsRange, eventRange, formatEventDateRange, getCurrentAndNextMonths, @@ -26,6 +27,12 @@ return visibleEvents.filter((event) => eventOverlapsDay(event, date)); } + // On a phone the grid only shows coloured bars; this list under it says what they are. + function eventsInMonth(days: { date: Date; inMonth: boolean }[]) { + const inMonth = days.filter((day) => day.inMonth); + return visibleEvents.filter((event) => eventOverlapsRange(event, inMonth[0].date, inMonth[inMonth.length - 1].date)); + } + function eventStyle(event: CalendarEventRecord) { return `--event-color: ${event.color || '#8a9a7b'};`; } @@ -42,10 +49,11 @@ return { showLabel: visualStart, classes: [ - visualStart ? 'rounded-l-xl' : 'rounded-l-none -ml-3', - visualEnd ? 'rounded-r-xl' : 'rounded-r-none -mr-3', + // Continuing bars reach across the cell padding and the gap (p-1/p-2 + gap-1). + visualStart ? 'rounded-l-xl' : 'rounded-l-none -ml-2 sm:-ml-3', + visualEnd ? 'rounded-r-xl' : 'rounded-r-none -mr-2 sm:-mr-3', visualStart && visualEnd ? 'mx-0' : '', - !visualStart && !visualEnd ? '-mx-3' : '' + !visualStart && !visualEnd ? '-mx-2 sm:-mx-3' : '' ].filter(Boolean).join(' ') }; } @@ -63,14 +71,14 @@ {:else}
{#each months as month} -
+

{month.label}

{#each weekdays as weekday}
{weekday}
{/each}
{#each month.days as day} -
+
{day.dayNumber}
@@ -81,7 +89,7 @@ {@const segment = segmentMeta(event, day.date)} {#if href} - {segment.showLabel ? event.name : '\u00a0'} - {:else} - {segment.showLabel ? event.name : '\u00a0'} -
{/each}
+ {#if eventsInMonth(month.days).length} +
    + {#each eventsInMonth(month.days) as event} + {@const href = normalizeLink(event.link)} +
  • + +
    + {#if href} + {event.name} + {:else} + {event.name} + {/if} + · {formatEventDateRange(event)} + {#if event.description}

    {event.description}

    {/if} +
    +
  • + {/each} +
+ {/if}
{/each}
-- 2.51.2