From dd4f6a7b0158892b126399e2574a6b791b1b37ba Mon Sep 17 00:00:00 2001 From: vorpax Date: Thu, 29 Jan 2026 11:46:37 +0100 Subject: [PATCH] feat: add event, news, technical, and workshop pages with pagination and details --- src/pages/events/[...page].astro | 32 +++++++++++++++++++++++ src/pages/events/[...slug]/index.astro | 27 +++++++++++++++++++ src/pages/news/[...page].astro | 32 +++++++++++++++++++++++ src/pages/news/[...slug]/index.astro | 27 +++++++++++++++++++ src/pages/technical/[...page].astro | 32 +++++++++++++++++++++++ src/pages/technical/[...slug]/index.astro | 27 +++++++++++++++++++ src/pages/workshops/[...page].astro | 32 +++++++++++++++++++++++ src/pages/workshops/[...slug]/index.astro | 27 +++++++++++++++++++ 8 files changed, 236 insertions(+) create mode 100644 src/pages/events/[...page].astro create mode 100644 src/pages/events/[...slug]/index.astro create mode 100644 src/pages/news/[...page].astro create mode 100644 src/pages/news/[...slug]/index.astro create mode 100644 src/pages/technical/[...page].astro create mode 100644 src/pages/technical/[...slug]/index.astro create mode 100644 src/pages/workshops/[...page].astro create mode 100644 src/pages/workshops/[...slug]/index.astro diff --git a/src/pages/events/[...page].astro b/src/pages/events/[...page].astro new file mode 100644 index 0000000..5d834aa --- /dev/null +++ b/src/pages/events/[...page].astro @@ -0,0 +1,32 @@ +--- +import type { GetStaticPaths } from "astro"; +import { getCollection } from "astro:content"; +import Main from "@/layouts/Main.astro"; +import Layout from "@/layouts/Layout.astro"; +import Header from "@/components/Header.astro"; +import Footer from "@/components/Footer.astro"; +import Card from "@/components/Card.astro"; +import Pagination from "@/components/Pagination.astro"; +import getSortedPosts from "@/utils/getSortedPosts"; +import { SITE } from "@/config"; + +export const getStaticPaths = (async ({ paginate }) => { + const events = await getCollection("events", ({ data }) => !data.draft); + return paginate(getSortedPosts(events), { pageSize: SITE.postPerPage }); +}) satisfies GetStaticPaths; + +const { page } = Astro.props; +--- + + +
+
+
    + {page.data.map(data => )} +
+
+ + + +