|
1 | 1 | <script lang="ts"> |
| 2 | + import { VideoList } from '$lib/components'; |
| 3 | + import { ListVideo } from '@lucide/svelte'; |
2 | 4 | import { SeoCanonicalUrl, VideoHeader, VideoPlayer, Button } from '@maiertech/sveltekit-helpers'; |
3 | 5 | import { siYoutube } from 'simple-icons'; |
4 | 6 | import type { LayoutProps } from './$types'; |
|
8 | 10 |
|
9 | 11 | <SeoCanonicalUrl origin={data.origin} /> |
10 | 12 |
|
11 | | -<VideoHeader value={data.video} class="mb-12" /> |
| 13 | +<div class="flex flex-wrap gap-10"> |
| 14 | + <div |
| 15 | + // `basis-0` to prevent `basis-auto`, which resolves to intrinsic width of longest para. |
| 16 | + class="grow-999 basis-0 min-inline-3/5" |
| 17 | + > |
| 18 | + <VideoHeader value={data.video} class="mb-12" /> |
12 | 19 |
|
13 | | -<VideoPlayer value={data.video} class="mb-8" /> |
| 20 | + <VideoPlayer value={data.video} class="mb-8" /> |
14 | 21 |
|
15 | | -<Button href={`https://www.youtube.com/watch?v=${data.video.id}`} class="mb-8"> |
16 | | - {#snippet icon()} |
17 | | - <svg class="block size-4" viewBox="0 0 24 24" fill="currentColor" role="img"> |
18 | | - <path d={siYoutube.path} /> |
19 | | - <title>{siYoutube.title}</title> |
20 | | - </svg> |
21 | | - {/snippet} |
22 | | - Watch on YouTube |
23 | | -</Button> |
| 22 | + <Button href={`https://www.youtube.com/watch?v=${data.video.id}`} class="mb-8"> |
| 23 | + {#snippet icon()} |
| 24 | + <svg class="block size-4" viewBox="0 0 24 24" fill="currentColor" role="img"> |
| 25 | + <path d={siYoutube.path} /> |
| 26 | + <title>{siYoutube.title}</title> |
| 27 | + </svg> |
| 28 | + {/snippet} |
| 29 | + Watch on YouTube |
| 30 | + </Button> |
24 | 31 |
|
25 | | -{@render children()} |
| 32 | + {@render children()} |
| 33 | + |
| 34 | + <p aria-hidden="true" class="mt-8 text-center text-lg text-ink-muted">◆ ◆ ◆</p> |
| 35 | + </div> |
| 36 | + |
| 37 | + <aside class="flex grow basis-2xs flex-col gap-3"> |
| 38 | + <h2 class="flex items-center gap-2 text-ink-muted"> |
| 39 | + <ListVideo class="size-5" /> |
| 40 | + <span class="text-lg font-semibold">More videos</span> |
| 41 | + </h2> |
| 42 | + <VideoList values={data.recommendedVideos} level={3} /> |
| 43 | + </aside> |
| 44 | +</div> |
0 commit comments