diff --git a/src/assets/images/journey/.gitkeep b/src/assets/images/journey/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/components/About.astro b/src/components/About.astro index 877221f..17ad9cd 100644 --- a/src/components/About.astro +++ b/src/components/About.astro @@ -15,7 +15,7 @@ const { more } = Astro.props; {about.paragraphs.map((p) =>

{p}

)}
- {more && } + {more && }
diff --git a/src/components/Gallery.astro b/src/components/Gallery.astro new file mode 100644 index 0000000..53ed23f --- /dev/null +++ b/src/components/Gallery.astro @@ -0,0 +1,30 @@ +--- +import { Image } from 'astro:assets'; + +interface Props { + dir: string; + images: { file: string; alt: string }[]; +} +const { dir, images } = Astro.props; + +const found = import.meta.glob<{ default: ImageMetadata }>('../assets/images/**/*.{jpg,jpeg,png,webp}', { eager: true }); +const photo = (file: string) => found[`../assets/images/${dir}/${file}`]?.default; +--- + + diff --git a/src/components/Journey.astro b/src/components/Journey.astro new file mode 100644 index 0000000..d7f899c --- /dev/null +++ b/src/components/Journey.astro @@ -0,0 +1,22 @@ +--- +import Gallery from './Gallery.astro'; +import { journey } from '../data/journey'; +--- + +
    + { + journey.map((c, i) => ( +
  1. +
    + {String(i + 1).padStart(2, '0')} + {c.dates} +
    +

    {c.title}

    +
    + {c.paragraphs.map((p) =>

    {p}

    )} +
    + +
  2. + )) + } +
diff --git a/src/components/RecordList.astro b/src/components/RecordList.astro index f65a641..e3049bc 100644 --- a/src/components/RecordList.astro +++ b/src/components/RecordList.astro @@ -1,12 +1,9 @@ --- -import { Image } from 'astro:assets'; +import Gallery from './Gallery.astro'; import type { Entry } from '../data/records'; interface Props { items: Entry[]; } const { items } = Astro.props; - -const photos = import.meta.glob<{ default: ImageMetadata }>('../assets/images/presentations/**/*.{jpg,jpeg,png,webp}', { eager: true }); -const photo = (file: string) => photos[`../assets/images/presentations/${file}`]?.default; ---