From 7340591ae894bf807a70b31f4415cf34dd422ffc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 21:29:06 +0000 Subject: [PATCH 1/3] Initial plan From 04d113fbe72bdc07171c943817d5de24c82465e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 21:31:58 +0000 Subject: [PATCH 2/3] Add next/prev pager to video layout Agent-Logs-Url: https://github.com/maiertech/website/sessions/dae2899e-bd48-4c1e-8412-081a40f3ce19 Co-authored-by: maiertech <1482402+maiertech@users.noreply.github.com> --- src/routes/videos/+layout.server.ts | 10 ++++++++-- src/routes/videos/+layout.svelte | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/routes/videos/+layout.server.ts b/src/routes/videos/+layout.server.ts index ff8e4f43..c6aa6cfc 100644 --- a/src/routes/videos/+layout.server.ts +++ b/src/routes/videos/+layout.server.ts @@ -6,17 +6,23 @@ import type { LayoutServerLoad } from './$types'; export const prerender = true; export const load: LayoutServerLoad = async ({ url }) => { - const video = videos.find((video) => video.path === url.pathname); + const index = videos.findIndex((video) => video.path === url.pathname); - if (!video) { + if (index === -1) { error(404, 'Video not found.'); } + const video = videos[index]; + const prev = index < videos.length - 1 ? videos[index + 1] : undefined; // The higher the index the older the video. + const next = index > 0 ? videos[index - 1] : undefined; + const recommendedVideos = videos.filter((v) => v.path !== video.path).slice(0, 3); return { origin: ORIGIN, video, + prev, + next, recommendedVideos, seo: { title: video.title, diff --git a/src/routes/videos/+layout.svelte b/src/routes/videos/+layout.svelte index 2e0ccbeb..4276ea83 100644 --- a/src/routes/videos/+layout.svelte +++ b/src/routes/videos/+layout.svelte @@ -1,5 +1,5 @@