diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..182a4a6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +public/images/photos/*.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/public/images/photography/DSC05932.jpg b/public/images/photography/DSC05932.jpg new file mode 100644 index 0000000..17e7d12 Binary files /dev/null and b/public/images/photography/DSC05932.jpg differ diff --git a/public/images/photography/DSC06124.jpg b/public/images/photography/DSC06124.jpg new file mode 100644 index 0000000..1c77533 Binary files /dev/null and b/public/images/photography/DSC06124.jpg differ diff --git a/public/images/photography/DSC06196.jpg b/public/images/photography/DSC06196.jpg new file mode 100644 index 0000000..af1bfa1 Binary files /dev/null and b/public/images/photography/DSC06196.jpg differ diff --git a/public/images/photography/UKN_Topo_01.jpg b/public/images/photography/UKN_Topo_01.jpg new file mode 100644 index 0000000..107ac70 Binary files /dev/null and b/public/images/photography/UKN_Topo_01.jpg differ diff --git a/public/images/photography/UKN_Topo_02.jpg b/public/images/photography/UKN_Topo_02.jpg new file mode 100644 index 0000000..c5d6a43 Binary files /dev/null and b/public/images/photography/UKN_Topo_02.jpg differ diff --git a/public/images/photography/UKN_Topo_03.jpg b/public/images/photography/UKN_Topo_03.jpg new file mode 100644 index 0000000..2549c90 Binary files /dev/null and b/public/images/photography/UKN_Topo_03.jpg differ diff --git a/src/components/Gallery.astro b/src/components/Gallery.astro new file mode 100644 index 0000000..689c59c --- /dev/null +++ b/src/components/Gallery.astro @@ -0,0 +1,49 @@ +--- +import type { Photo } from '../models/Photo.ts'; + +const photos: Photo[] = Astro.props.photos; +const collection: string = Astro.props.collection; + +const color = Astro.props.color || 'var(--text)'; +--- +
+{ +photos.map((photo) => ( + + + + )) +} +
+ + diff --git a/src/components/Header.astro b/src/components/Header.astro index 7ddacc6..595e235 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -10,9 +10,9 @@ import Socials from "./Socials.astro"; ಠ_ಠ diff --git a/src/content.config.ts b/src/content.config.ts index e5792d5..cd2681b 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -1,4 +1,4 @@ -import { glob } from 'astro/loaders'; +import { glob, file } from 'astro/loaders'; import { defineCollection, z } from 'astro:content'; const bachelor = defineCollection({ @@ -28,6 +28,22 @@ const blog = defineCollection({ updatedDate: z.coerce.date().optional(), heroImage: z.string().optional(), }), +} +); + +const photography = defineCollection({ + // Load Markdown and MDX files in the `src/content/projects/` directory. + loader: file( + './src/content/photography/index.json' + ), + // Type-check frontmatter using a schema + schema: z.object({ + title: z.string(), + description: z.string(), + src: z.string(), + // Transform string to Date object + pubDate: z.coerce.date(), + }), }); const projects = defineCollection({ @@ -46,4 +62,4 @@ const projects = defineCollection({ }), }); -export const collections = { bachelor, blog, projects }; +export const collections = { bachelor, blog, photography, projects }; diff --git a/src/content/photography/index.json b/src/content/photography/index.json new file mode 100644 index 0000000..267d50a --- /dev/null +++ b/src/content/photography/index.json @@ -0,0 +1,44 @@ +[ + { + "id": "DSC05932", + "src": "DSC05932.jpg", + "title": "DSC05932", + "pubDate": "2026-04-06", + "description": "" + }, + { + "id": "DSC06124", + "src": "DSC06124.jpg", + "title": "DSC06124", + "pubDate": "2026-04-06", + "description": "" + }, + { + "id": "DSC06196", + "src": "DSC06196.jpg", + "title": "DSC06196", + "pubDate": "2026-04-06", + "description": "" + }, + { + "id": "UKN_Topo_01", + "src": "UKN_Topo_01.jpg", + "title": "UKN_Topo_01", + "pubDate": "2026-04-06", + "description": "" + }, + { + "id": "UKN_Topo_02", + "src": "UKN_Topo_02.jpg", + "title": "UKN_Topo_02", + "pubDate": "2026-04-06", + "description": "" + }, + { + "id": "UKN_Topo_03", + "src": "UKN_Topo_03.jpg", + "title": "UKN_Topo_03", + "pubDate": "2026-04-06", + "description": "" + } +] diff --git a/src/layouts/GalleryPhoto.astro b/src/layouts/GalleryPhoto.astro new file mode 100644 index 0000000..1f3a3c8 --- /dev/null +++ b/src/layouts/GalleryPhoto.astro @@ -0,0 +1,103 @@ +--- +import type { CollectionEntry } from "astro:content"; +import BaseHead from "../components/BaseHead.astro"; +import Header from "../components/Header.astro"; +import Main from "../components/Main.astro"; +import Footer from "../components/Footer.astro"; +import FormattedDate from "../components/FormattedDate.astro"; + +type Props = CollectionEntry<"photography">["data"]; + +const { title, description, pubDate, src } = Astro.props; +--- + + + + + + + + +
+
+
+
+ +
+
+
+
+ +
+

{title}

+
+

+ {description} +

+
+
+
+