>
)
}
-
{
artist.albums && (
<>
diff --git a/src/pages/music/concerts.astro b/src/pages/music/concerts.astro
new file mode 100644
index 0000000..69532c4
--- /dev/null
+++ b/src/pages/music/concerts.astro
@@ -0,0 +1,87 @@
+---
+import Layout from "@layouts/Layout.astro";
+import Paginator from "@components/nav/Paginator.astro";
+import Modal from "@components/blocks/Modal.astro";
+import { fetchConcerts } from "@utils/data/concerts.js";
+import { fetchGlobalData } from "@utils/data/global/index.js";
+import { DateTime } from "luxon";
+
+export const prerender = true;
+
+const { globals } = await fetchGlobalData(Astro);
+const concerts = await fetchConcerts();
+const title = "Concerts";
+const description =
+ "These are concerts I've attended (not all of them — just the ones I could remember or glean from emails, photo metadata et al). I've been to at least " +
+ concerts.length +
+ " shows.";
+const pageSize = 30;
+const currentPage = parseInt(Astro.url.searchParams.get("page") || "1", 10);
+const totalPages = Math.ceil(concerts.length / pageSize);
+const paginatedConcerts = concerts.slice(
+ (currentPage - 1) * pageSize,
+ currentPage * pageSize
+);
+
+const pagination = {
+ currentPage,
+ totalPages,
+ hasPrevious: currentPage > 1,
+ hasNext: currentPage < totalPages,
+ previousPage: currentPage > 1 ? `/concerts?page=${currentPage - 1}` : null,
+ nextPage: currentPage < totalPages ? `/concerts?page=${currentPage + 1}` : null,
+ pages: Array.from({ length: totalPages }, (_, index) => ({
+ number: index + 1,
+ href: `/concerts?page=${index + 1}`,
+ })),
+};
+---
+
+
+ {currentPage === 1 && (
+ <>
+
{title}
+
These are concerts I've attended (not all of them — just the ones I could remember or glean from emails, photo metadata et al). I've been to at least {concerts.length} shows.