Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Not-sidebar (outer): videos & posts.
class="grow-999 basis-0 min-inline-3/5"
>
<h2 class="mb-4 flex items-center gap-1 text-ink-muted">
<h2 class="mb-4 flex items-center gap-2 text-ink-muted">
<Clock class="size-5" />
<span class="text-lg font-semibold">Latest videos</span>
</h2>
Expand All @@ -39,7 +39,7 @@
</div>
</div>

<h2 class="mb-4 flex items-center gap-1 text-ink-muted">
<h2 class="mb-4 flex items-center gap-2 text-ink-muted">
<Clock class="size-5" />
<span class="text-lg font-semibold">Latest posts</span>
</h2>
Expand All @@ -51,7 +51,7 @@
// Sidebar (outer): notes.
class="@container grow basis-2xs"
>
<h2 class="mb-4 flex items-center gap-1 text-ink-muted">
<h2 class="mb-4 flex items-center gap-2 text-ink-muted">
<Clock class="size-5" />
<span class="text-lg font-semibold">Latest notes</span>
</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/notes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<NoteHeader value={data.note} class="mb-8" />
{@render children()}

<p aria-hidden="true" class="mt-8 text-center text-xl text-ink-muted">◆◆</p>
<p aria-hidden="true" class="mt-8 text-center text-lg text-ink-muted">◆◆</p>
</div>

<aside class="flex grow basis-2xs flex-col gap-3">
<h2 class="flex items-center gap-1 text-ink-muted">
<h2 class="flex items-center gap-2 text-ink-muted">
<Clock class="size-5" />
<span class="text-lg font-semibold">Latest videos</span>
</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/posts/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<PostHeader value={data.post} class="mb-12" />
{@render children()}

<p aria-hidden="true" class="mt-8 text-center text-xl text-ink-muted">◆◆</p>
<p aria-hidden="true" class="mt-8 text-center text-lg text-ink-muted">◆◆</p>
</div>

<aside class="flex grow basis-2xs flex-col gap-3">
<h2 class="flex items-center gap-1 text-ink-muted">
<h2 class="flex items-center gap-2 text-ink-muted">
<Clock class="size-5" />
<span class="text-lg font-semibold">Latest videos</span>
</h2>
Expand Down
3 changes: 3 additions & 0 deletions src/routes/videos/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export const load: LayoutServerLoad = async ({ url }) => {
error(404, 'Video not found.');
}

const recommendedVideos = videos.filter((v) => v.path !== video.path).slice(0, 3);

return {
origin: ORIGIN,
video,
recommendedVideos,
seo: {
title: video.title,
description: video.description,
Expand Down
43 changes: 31 additions & 12 deletions src/routes/videos/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import { VideoList } from '$lib/components';
import { ListVideo } from '@lucide/svelte';
import { SeoCanonicalUrl, VideoHeader, VideoPlayer, Button } from '@maiertech/sveltekit-helpers';
import { siYoutube } from 'simple-icons';
import type { LayoutProps } from './$types';
Expand All @@ -8,18 +10,35 @@

<SeoCanonicalUrl origin={data.origin} />

<VideoHeader value={data.video} class="mb-12" />
<div class="flex flex-wrap gap-10">
<div
// `basis-0` to prevent `basis-auto`, which resolves to intrinsic width of longest para.
class="grow-999 basis-0 min-inline-3/5"
>
<VideoHeader value={data.video} class="mb-12" />

<VideoPlayer value={data.video} class="mb-8" />
<VideoPlayer value={data.video} class="mb-8" />

<Button href={`https://www.youtube.com/watch?v=${data.video.id}`} class="mb-8">
{#snippet icon()}
<svg class="block size-4" viewBox="0 0 24 24" fill="currentColor" role="img">
<path d={siYoutube.path} />
<title>{siYoutube.title}</title>
</svg>
{/snippet}
Watch on YouTube
</Button>
<Button href={`https://www.youtube.com/watch?v=${data.video.id}`} class="mb-8">
{#snippet icon()}
<svg class="block size-4" viewBox="0 0 24 24" fill="currentColor" role="img">
<path d={siYoutube.path} />
<title>{siYoutube.title}</title>
</svg>
{/snippet}
Watch on YouTube
</Button>

{@render children()}
{@render children()}

<p aria-hidden="true" class="mt-8 text-center text-lg text-ink-muted">◆ ◆ ◆</p>
</div>

<aside class="flex grow basis-2xs flex-col gap-3">
<h2 class="flex items-center gap-2 text-ink-muted">
<ListVideo class="size-5" />
<span class="text-lg font-semibold">More videos</span>
</h2>
<VideoList values={data.recommendedVideos} level={3} />
</aside>
</div>
Loading