-
Map Journal
@@ -66,15 +65,16 @@
diff --git a/src/lib/timeline/JournalDetail.svelte b/src/lib/timeline/JournalDetail.svelte
new file mode 100644
index 0000000..fe43a0f
--- /dev/null
+++ b/src/lib/timeline/JournalDetail.svelte
@@ -0,0 +1,401 @@
+
+
+
+{#if lightboxSrc}
+
lightboxSrc = null} role="button" tabindex="0"
+ onkeydown={(e) => e.key === 'Escape' && (lightboxSrc = null)}>
+

+
+{/if}
+
+
+
+
+
+
+
+
{flagEmoji(entry.location.country)}
+
+
{entry.location.city}
+
{entry.location.country}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
When did you go?
+
{formatDate(entry.date)}
+
+
+
+
How long did you stay?
+
{entry.days} {entry.days === 1 ? 'day' : 'days'}
+
+
+
+
Who did you go with?
+
+ {#if entry.tripType === 'solo'}
+ Just me — solo trip
+ {:else}
+ With friends
+ {/if}
+
+
+
+
+
How was it?
+
{entry.memo}
+
+
+
+
Trip soundtrack
+
+
+
+
{entry.song.title}
+
{entry.song.artist}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/lib/timeline/JournalSummary.svelte b/src/lib/timeline/JournalSummary.svelte
new file mode 100644
index 0000000..de0de9d
--- /dev/null
+++ b/src/lib/timeline/JournalSummary.svelte
@@ -0,0 +1,215 @@
+
+
+{#if stats}
+
+
+
My Journey
+
{stats.yearRange}
+
+
+
+
+
+
+ {stats.countries.length}
+ Countries
+
+
+ {stats.cities.length}
+ Cities
+
+
+ {stats.totalDays}
+ Days abroad
+
+
+ {stats.tripCount}
+ Trips
+
+
+
+
+
+
+
+ Most visited
+ {stats.topCountry[0]}
+ {stats.topCountry[1]} {stats.topCountry[1] === 1 ? 'trip' : 'trips'}
+
+
+
+
+ Latest trip
+ {stats.latest.location.city}
+ {stats.latest.location.country}
+
+
+
+
+
+
+
Trip style
+
+
+ {stats.soloPct}% Solo
+ {100 - stats.soloPct}% Friends
+
+
+
+
+{/if}
+
+
diff --git a/src/lib/timeline/TimelineCard.svelte b/src/lib/timeline/TimelineCard.svelte
new file mode 100644
index 0000000..ad4f8da
--- /dev/null
+++ b/src/lib/timeline/TimelineCard.svelte
@@ -0,0 +1,320 @@
+
+
+
+
+
+
+
+
+ {flagEmoji(entry.location.country)}
+ {entry.location.country}
+
+
+
+
e.key === 'Enter' && onClick()}>
+
+
+
+ {entry.tripType === 'solo' ? 'Solo' : 'Friends'}
+
+
+
+
0}>
+
+ {#if mainPhoto}
+

{
+ e.currentTarget.style.display = 'none';
+ e.currentTarget.nextElementSibling.style.display = 'flex';
+ }} />
+
+ {:else}
+
+ {/if}
+
+
+ {#if thumbPhotos.length > 0}
+
+ {#each thumbPhotos as photo, i}
+
+

{
+ e.currentTarget.style.display = 'none';
+ e.currentTarget.nextElementSibling.style.display = 'flex';
+ }} />
+
+ {#if i === 2 && extraCount > 0}
+
+ {/if}
+
+ {/each}
+
+ {/if}
+
+
+
+
+
{entry.location.city}
+
+ {formatDate(entry.date)}
+ ·
+ {entry.days} {entry.days === 1 ? 'day' : 'days'}
+
+
+
+
+
+
+
+
diff --git a/src/lib/timeline/TimelineToolbar.svelte b/src/lib/timeline/TimelineToolbar.svelte
new file mode 100644
index 0000000..507b12f
--- /dev/null
+++ b/src/lib/timeline/TimelineToolbar.svelte
@@ -0,0 +1,62 @@
+
+
+
+
+
diff --git a/src/lib/timeline/TimelineView.svelte b/src/lib/timeline/TimelineView.svelte
new file mode 100644
index 0000000..a75b903
--- /dev/null
+++ b/src/lib/timeline/TimelineView.svelte
@@ -0,0 +1,168 @@
+
+
+
+
+ {#if selected}
+
+ (selected = null)} />
+
+ {:else}
+
+
+
+
+
(sortKey = k)} />
+
+ {#if sortedEntries.length === 0}
+ No journal entries yet.
+ {:else}
+
+ {#each sortedEntries as entry, i (entry.id)}
+ {#if i === 0 || getYear(entry.date) !== getYear(sortedEntries[i - 1].date)}
+ -
+ {getYear(entry.date)}
+
+ {/if}
+ (selected = entry)} />
+ {/each}
+
+ {/if}
+
+
+
+
+ {/if}
+
+
+
+
diff --git a/src/lib/world-map/StatsPanel.svelte b/src/lib/world-map/StatsPanel.svelte
index 9e0e154..bb14ffa 100644
--- a/src/lib/world-map/StatsPanel.svelte
+++ b/src/lib/world-map/StatsPanel.svelte
@@ -137,12 +137,12 @@
{seg.cont}
{/each}
-
+
{:else}
{/if}
@@ -157,11 +157,11 @@
diff --git a/src/lib/world-map/continents.js b/src/lib/world-map/continents.js
index 2eabc73..7a5ad24 100644
--- a/src/lib/world-map/continents.js
+++ b/src/lib/world-map/continents.js
@@ -210,4 +210,3 @@ for (const id of Object.keys(map)) {
export function getContinent(id) {
return map[id] ?? null;
}
-