diff --git a/astro/src/components/photos/CategoryIndex.astro b/astro/src/components/photos/CategoryIndex.astro new file mode 100644 index 0000000..9d47e15 --- /dev/null +++ b/astro/src/components/photos/CategoryIndex.astro @@ -0,0 +1,43 @@ +--- +import { getAllCategories } from "@/content/photos/categories"; +import { getSettings } from "@/content/settings/settings" +import { getImageUrl } from "@/lib/images"; +import { getCategoryRoute } from "@/lib/routing"; +import { Image } from "astro:assets"; + +const settings = await getSettings(); +const categories = await getAllCategories(settings); +--- + +
+
+

Categories

+
+ +
+ { categories.map((category) => ( + + )) } +
+
diff --git a/astro/src/pages/[...route].astro b/astro/src/pages/[...route].astro index 277f2b4..f6f90e0 100644 --- a/astro/src/pages/[...route].astro +++ b/astro/src/pages/[...route].astro @@ -10,6 +10,7 @@ import ProjectIndex from "@/components/projects/ProjectIndex.astro"; import Webpage from "@/components/webpage/Webpage.astro"; import BlogPost from "@/components/blogs/BlogPost.astro"; import ProjectPost from "@/components/projects/ProjectPost.astro"; +import CategoryIndex from "@/components/photos/CategoryIndex.astro"; export async function getStaticPaths() { const settings = await getSettings(); @@ -157,7 +158,7 @@ if (page === null || page.page === null || !page.page.exists) { } }}}> -
PhotoCategoryIndex
+
) }