From abaea70c7b1a9e015ec4a2d69b4ae7df9c8c2e91 Mon Sep 17 00:00:00 2001
From: itsfinniii <102350242+itsfinniii@users.noreply.github.com>
Date: Sat, 25 Apr 2026 15:04:47 +0200
Subject: [PATCH] Add albums to the project
---
astro/astro.config.mjs | 8 +++++++-
astro/src/pages/[...route].astro | 17 +++++++++++++++++
astro/src/types/photos/photo.d.ts | 5 +++++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/astro/astro.config.mjs b/astro/astro.config.mjs
index ec9a596..82cba77 100644
--- a/astro/astro.config.mjs
+++ b/astro/astro.config.mjs
@@ -11,6 +11,12 @@ export default defineConfig({
domains: ['development.directus.itsfinniii.com']
},
vite: {
- plugins: [tailwindcss(), graphql()]
+ plugins: [tailwindcss(), graphql()],
+ resolve: {
+ alias: {
+ react: "preact/compat",
+ "react-dom": "preact/compat",
+ },
+ },
}
});
\ No newline at end of file
diff --git a/astro/src/pages/[...route].astro b/astro/src/pages/[...route].astro
index a63c4fb..fd4c1d7 100644
--- a/astro/src/pages/[...route].astro
+++ b/astro/src/pages/[...route].astro
@@ -14,6 +14,7 @@ import ProjectPost from "@/components/projects/ProjectPost.astro";
import CategoryIndex from "@/components/photos/CategoryIndex.astro";
import Category from "@/components/photos/Category.astro";
import { getImageUrl } from "@/lib/images";
+import AlbumPage from "@/components/photos/AlbumPage.astro";
export async function getStaticPaths() {
const settings = await getSettings();
@@ -144,6 +145,22 @@ if (page === null || page.page === null || !page.page.exists) {
) }
+{ page.pageType === "PhotoAlbum" && (
+
+
+
+
+
+) }
+
{ page.pageType === "Photo" && (