diff --git a/src/lib/JournalDetail.svelte b/src/lib/JournalDetail.svelte new file mode 100644 index 0000000..a00c0b0 --- /dev/null +++ b/src/lib/JournalDetail.svelte @@ -0,0 +1,313 @@ + + +
+ + + + {#if entry.photos.length > 0} + + {/if} + +
+
+ πŸ“ {entry.location.city}, {entry.location.country} + + {entry.tripType === 'solo' ? '🧍 Solo' : 'πŸ‘₯ With Friends'} + +
+ +

{entry.title}

+ +
+
+ Date + +
+
+
+ Duration + {entry.days} {entry.days === 1 ? 'day' : 'days'} +
+
+ +
+

{entry.memo}

+
+ +
+ +
+ Soundtrack + {entry.song.title} + {entry.song.artist} +
+
+
+
+ + diff --git a/src/lib/TimelineView.svelte b/src/lib/TimelineView.svelte index a357b6a..25a2e6d 100644 --- a/src/lib/TimelineView.svelte +++ b/src/lib/TimelineView.svelte @@ -1,15 +1,20 @@ -
+{#if selected} + (selected = null)} /> +{:else} +
- -
-
-

Travel Journal

-

My Journey

-
- -
- +
+
+

Travel Journal

+

My Journey

+
- (sortKey = e.currentTarget.value)}> {#each sortOptions as opt} - + {/each}
+
- -
- - -
-
-
- - - {#if sortedEntries.length === 0} -

No journal entries yet.

- - - {:else if layout === 'vertical'} -
    - {#each sortedEntries as entry (entry.id)} - {@const idx = photoIdx[entry.id] ?? 0} -
  1. - -
    - - - {#if entry.photos.length > 0} - - {/if} - -
    - -

    {entry.title}

    - {#if entry.memo} -

    {entry.memo}

    - {/if} -
    - - {entry.song.title} - Β· - {entry.song.artist} -
    -
    -
    -
  2. - {/each} -
- - - {:else} -
- -
    + {#if sortedEntries.length === 0} +

    No journal entries yet.

    + {:else} +
      {#each sortedEntries as entry (entry.id)} {@const idx = photoIdx[entry.id] ?? 0} -
    1. -
      +
    2. + +
      +
      + + Β· + {entry.location.city}, {entry.location.country} + Β· + {entry.days} {entry.days === 1 ? 'day' : 'days'} +
      +
      (selected = entry)} + onkeydown={(e) => e.key === 'Enter' && (selected = entry)}> - - {#if entry.photos.length > 0} - - {/if} - -
      - -

      {entry.title}

      - {#if entry.memo} -

      {entry.memo}

      + {#if entry.photos.length > 0} + {/if} -
      - - {entry.song.title} - Β· - {entry.song.artist} + +
      +

      {entry.title}

      + {#if entry.memo} +

      {entry.memo}

      + {/if} +
      + + + + + + {entry.song.title} + Β· + {entry.song.artist} + + {entry.tripType === 'solo' ? 'Solo' : 'With Friends'} + +
      -
    3. +
{/each} - - {/if} + {/if} -
- {sortedEntries.length} {sortedEntries.length === 1 ? 'entry' : 'entries'} -
-
+ +
+{/if}