diff --git a/packages/shared/src/blocks/CheckoutBlock.svelte b/packages/shared/src/blocks/CheckoutBlock.svelte index ec271bc..4e9bbe7 100644 --- a/packages/shared/src/blocks/CheckoutBlock.svelte +++ b/packages/shared/src/blocks/CheckoutBlock.svelte @@ -394,8 +394,7 @@ diff --git a/packages/shared/src/blocks/TimelineBlock.svelte b/packages/shared/src/blocks/TimelineBlock.svelte index 4d3a3a9..9673c9e 100644 --- a/packages/shared/src/blocks/TimelineBlock.svelte +++ b/packages/shared/src/blocks/TimelineBlock.svelte @@ -6,9 +6,8 @@ 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 = ['md:w-[78%]', 'md:w-[85%]', 'md:w-[90%]', 'md:w-[95%]', 'md:w-[98%]']; + const opts = ['w-[78%]', 'w-[85%]', 'w-[90%]', 'w-[95%]', 'w-[98%]']; return opts[(i * 7 + 3) % opts.length]; })); @@ -20,9 +19,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 d59c7ec..2749794 100644 --- a/packages/shared/src/blocks/UpcomingCalendarBlock.svelte +++ b/packages/shared/src/blocks/UpcomingCalendarBlock.svelte @@ -4,7 +4,6 @@ dateKey, eventMatchesCategories, eventOverlapsDay, - eventOverlapsRange, eventRange, formatEventDateRange, getCurrentAndNextMonths, @@ -27,12 +26,6 @@ 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'};`; } @@ -49,11 +42,10 @@ return { showLabel: visualStart, classes: [ - // 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 ? 'rounded-l-xl' : 'rounded-l-none -ml-3', + visualEnd ? 'rounded-r-xl' : 'rounded-r-none -mr-3', visualStart && visualEnd ? 'mx-0' : '', - !visualStart && !visualEnd ? '-mx-2 sm:-mx-3' : '' + !visualStart && !visualEnd ? '-mx-3' : '' ].filter(Boolean).join(' ') }; } @@ -71,14 +63,14 @@ {:else}
{#each months as month} -
+

{month.label}

{#each weekdays as weekday}
{weekday}
{/each}
{#each month.days as day} -
+
{day.dayNumber}
@@ -89,7 +81,7 @@ {@const segment = segmentMeta(event, day.date)} {#if href} - - {:else} - -
{/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}