diff --git a/frontend/src/routes/CalendarPage.svelte b/frontend/src/routes/CalendarPage.svelte
index 91f8504..9043ff8 100644
--- a/frontend/src/routes/CalendarPage.svelte
+++ b/frontend/src/routes/CalendarPage.svelte
@@ -1,7 +1,21 @@
-
Calendar
+
{#if !calendars.length}
- Add a calendar in Settings first.
+
+ A calendar is what you download into Apple or Google Calendar: one per child, or one for the family.
+ Add a calendar
+
{:else}
-
-
- {#each calendars as c (c.id)}{c.name} {/each}
-
- (view = view === 'list' ? 'grid' : 'list')}>{view === 'list' ? 'Month view' : 'List view'}
-
-
-
- (month = shiftMonth(month, -1))}>‹
- {monthLabel(month)}
- (month = shiftMonth(month, 1))}>›
-
-
-
-
-
Download new and changed (.ics)
-
Download everything
+
+
+
+ {#each calendars as c (c.id)}{c.name} {/each}
+
+
-
- On iPhone, open the file and tap “Add All”. Each download holds what changed since the last one, so re-importing
- doesn't duplicate events in Apple Calendar.
- {#if calendar?.last_exported_at}Last download: {new Date(calendar.last_exported_at.replace(' ', 'T') + 'Z').toLocaleString()}.{/if}
-
-
-
- addOn(`${month}-01`)}>Add event
-
- {#if editing === 'new'}
-
-
(editing = null)} />
+
+
+
+
+
Add to your phone's calendar
+
On iPhone, open the file and tap “Add All”. Each download holds only what changed since the last one, so nothing is duplicated.
+
+
+
+ {#if lastDownload}Last download {lastDownload.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })}
{/if}
+
+
+
+ (month = shiftMonth(month, -1))}>
+
{monthLabel(month)}
+ (month = shiftMonth(month, 1))}>
+
+ addOn(`${month}-01`)}> Add event
- {/if}
- {#if error}
- {error}
- {:else if events === null}
- Loading…
- {:else if view === 'grid'}
-
- {:else if !events.length}
- Nothing this month.
- {:else}
- {#each byDay as [day, list] (day)}
- {dayLabel(day)}
-
- {#each list as e (e.id)}
-
- (editing = editing === e.id ? null : e.id)} aria-expanded={editing === e.id}>
- {e.title}
- {whenLabel(e)} · {KINDS[e.kind]}{e.location ? ` · ${e.location}` : ''}
-
- {#if editing === e.id}
- (editing = null)} ondelete={remove(e.id)} />
- {/if}
+ {#if editing === 'new'}
+
+
New event
+ (editing = null)} />
+
+ {/if}
+
+ {#if error}
+ {error}
+ {:else if events === null}
+
+ {#each [1, 2, 3] as _}
{/each}
+
+ {:else if view === 'grid'}
+
+ {:else if !events.length}
+
+ Publish a scan, or add an event by hand.
+
+ {:else}
+
+ {#each byDay as [day, list] (day)}
+ {@const d = parse(day)}
+
+
+ {d.toLocaleDateString(undefined, { weekday: 'short' })}
+ {d.getDate()}
+
+
+ {#each list as e (e.id)}
+ {@const KindIcon = KIND_ICONS[e.kind]}
+
+ (editing = editing === e.id ? null : e.id)} aria-expanded={editing === e.id}>
+
+
+ {e.title}
+ {whenLabel(e)} · {KINDS[e.kind]}{#if e.location} · {e.location}{/if}
+
+
+ {#if editing === e.id}
+ (editing = null)} ondelete={remove(e.id)} />
+ {/if}
+
+ {/each}
+
{/each}
-
- {/each}
- {/if}
+
+ {/if}
+
{/if}