From 6f41f6e53ed5666a63ed395e5c41f150b2fc694b Mon Sep 17 00:00:00 2001 From: haerikimmm Date: Tue, 16 Jun 2026 19:33:50 +0900 Subject: [PATCH] fix: proper 2-column layout with scroll, header above columns, side padding --- src/lib/timeline/TimelineView.svelte | 125 ++++++++++++++------------- 1 file changed, 64 insertions(+), 61 deletions(-) diff --git a/src/lib/timeline/TimelineView.svelte b/src/lib/timeline/TimelineView.svelte index c47e168..b658987 100644 --- a/src/lib/timeline/TimelineView.svelte +++ b/src/lib/timeline/TimelineView.svelte @@ -65,54 +65,56 @@ /> {:else} -
-
- - - (sortKey = k)} /> - - {#if sortedEntries.length === 0} -

No journal entries yet.

- {:else} -
- Sort by - -
-
    - {#each sortedEntries as entry, i (entry.id)} - {#if i === 0 || getYear(entry.date) !== getYear(sortedEntries[i - 1].date)} - - {/if} - { selectedId = entry.id; view = 'detail'; onDetailChange(true); }} /> - {/each} -
- {/if} - -
- {sortedEntries.length} {sortedEntries.length === 1 ? 'trip' : 'trips'} -
+
+ - {#if sortedEntries.length > 0} -
- (showShare = true)} /> +
+
+ (sortKey = k)} /> + + {#if sortedEntries.length === 0} +

No journal entries yet.

+ {:else} +
+ Sort by + +
+
    + {#each sortedEntries as entry, i (entry.id)} + {#if i === 0 || getYear(entry.date) !== getYear(sortedEntries[i - 1].date)} + + {/if} + { selectedId = entry.id; view = 'detail'; onDetailChange(true); }} /> + {/each} +
+ {/if} + +
+ {sortedEntries.length} {sortedEntries.length === 1 ? 'trip' : 'trips'} +
- {/if} + + {#if sortedEntries.length > 0} +
+ (showShare = true)} /> +
+ {/if} +
{/if} @@ -132,41 +134,42 @@ overflow: hidden; } - /* ── Two-column layout ── */ - .two-col { + /* ── List view wrapper (scrollable) ── */ + .list-view { flex: 1; + overflow-y: auto; + padding: 48px 48px 80px; + box-sizing: border-box; + min-width: 0; + } + + /* ── Two-column below header ── */ + .two-col { display: flex; flex-direction: row; - min-width: 0; - height: 100%; - overflow: hidden; + gap: 32px; + align-items: flex-start; + margin-top: 24px; } .left-col { flex: 1; min-width: 0; - overflow-y: auto; - padding: 48px 48px 80px; - box-sizing: border-box; - max-width: 680px; } .right-col { - width: 280px; + width: 260px; flex-shrink: 0; - overflow-y: auto; - padding: 48px 24px 80px; - border-left: 1px solid var(--border); - box-sizing: border-box; + position: sticky; + top: 0; } @media (max-width: 900px) { .right-col { display: none; } - .left-col { max-width: 100%; } } @media (max-width: 760px) { - .left-col { padding: 32px 24px 60px; } + .list-view { padding: 32px 24px 60px; } } /* ── Detail view ── */