Add page routing and content fetchers

This commit is contained in:
itsfinniii
2026-03-15 18:55:30 +01:00
parent bc11be5669
commit 21d5ba23a4
22 changed files with 923 additions and 9 deletions

View File

@@ -1,4 +1,7 @@
type BlogPost = {
type: "BlogPost";
id: string;
title: string;
url: string;
date: string;
@@ -10,3 +13,8 @@ type BlogPost = {
lastModified: Date;
}
type BlogIndex = {
type: "BlogIndex";
pageNumber: number;
}

View File

@@ -1,4 +1,6 @@
type WebPage = {
type: "Webpage";
id: string;
lastModified: Date;
@@ -19,3 +21,20 @@ type WebpageComponent =
ReviewListComponent |
TextWithImageComponent |
WallOfTextComponent;
type PageRegexMatchProps = {
template: string;
allowPagination: boolean;
}
type PageType = {
route: string;
pageType: "Webpage" | "BlogIndex" | "BlogPost" |
"ProjectIndex" | "ProjectPost" | "PhotoCategoryIndex" |
"PhotoCategory" | "PhotoAlbum" | "Photo";
page: WebPage | BlogPost | ProjectPost | BlogIndex |
ProjectIndex | PhotoCategoryIndex | PhotoCategory |
PhotoAlbum | PhotoPage | null;
}

View File

@@ -1,4 +1,6 @@
type PhotoAlbum = {
type: "PhotoAlbum";
title: string;
url: string;
description: string | null;
@@ -27,3 +29,9 @@ type PhotoAlbumPhoto = {
photo: PhotoProps;
text: string | null;
}
type PhotoCategory = {
type: "PhotoCategory";
category: string;
pageNumber: number;
}

View File

@@ -1,3 +1,3 @@
type PhotoCategory = {
type PhotoCategoryIndex = {
type: "PhotoCategoryIndex";
}

View File

@@ -1,3 +1,6 @@
type PhotoPhoto = {
type PhotoPage = {
type: "PhotoPage";
id: string;
photo: PhotoProps;
text: string | null;
}

View File

@@ -10,3 +10,8 @@ type ProjectPost = {
lastModified: Date;
}
type ProjectIndex = {
type: "ProjectIndex";
pageNumber: number;
}