Skip to content

Commit 37fa8b4

Browse files
committed
Nail responsive behavior
1 parent dec1e95 commit 37fa8b4

4 files changed

Lines changed: 30 additions & 23 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@fontsource/roboto": "^5.2.10",
2323
"@fontsource/spectral": "^5.2.8",
2424
"@lucide/svelte": "^1.7.0",
25-
"@maiertech/sveltekit-helpers": "^0.48.0",
25+
"@maiertech/sveltekit-helpers": "^0.48.1",
2626
"@playwright/test": "^1.58.2",
2727
"@stackblitz/sdk": "^1.11.0",
2828
"@sveltejs/adapter-node": "^5.5.4",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/routes/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export const load: PageServerLoad = async function () {
1414
},
1515
posts: posts.slice(0, 6),
1616
notes: notes.slice(0, 7),
17-
videos: videos.slice(0, 2)
17+
videos: videos.slice(0, 3)
1818
};
1919
};

src/routes/+page.svelte

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,27 @@
99

1010
<p class="mb-12 max-w-[45ch] text-xl lg:text-2xl">{data.seo.description}</p>
1111

12-
<div class="flex flex-wrap gap-8">
13-
<!-- not-sidebar -->
14-
<div class="@container grow-999 min-inline-3/5">
15-
<div class="mb-8 flex flex-wrap gap-8">
16-
<!-- Latest video (not-sidebar) -->
17-
12+
<div class="flex flex-wrap gap-6">
13+
<div
14+
// Not-sidebar (outer): videos & posts.
15+
class="@container grow-999 min-inline-3/5"
16+
>
17+
<div class="mb-8 flex flex-wrap gap-6">
1818
<h2 class="sr-only">Videos</h2>
1919

20-
<div class="grow-999 min-inline-3/5">
21-
<VideoPreview value={data.videos[0]} />
22-
</div>
23-
24-
<!-- Second video (sidebar) -->
25-
<div class="grow basis-3xs">
26-
<VideoPreview value={data.videos[1]} class="h-full" />
20+
<VideoPreview
21+
// Not-sidebar (videos): latest video.
22+
value={data.videos[0]}
23+
class="grow-999 min-inline-3/5"
24+
/>
25+
26+
<div
27+
// Sidebar (videos): 2 more videos.
28+
class="flex grow basis-3xs flex-wrap gap-6"
29+
>
30+
{#each data.videos.slice(1) as video (video.id)}
31+
<VideoPreview value={video} showDescription={false} class="grow basis-80" />
32+
{/each}
2733
</div>
2834
</div>
2935

@@ -36,9 +42,10 @@
3642
</div>
3743
</div>
3844

39-
<!-- sidebar -->
40-
41-
<div class="@container grow basis-2xs">
45+
<div
46+
// Sidebar (outer): notes.
47+
class="@container grow basis-2xs"
48+
>
4249
<h2 class="sr-only">Notes</h2>
4350
<div class="grid grid-cols-1 gap-6 @lg:grid-cols-2 @4xl:grid-cols-3">
4451
{#each data.notes as note (note.path)}

0 commit comments

Comments
 (0)