Implement image galleries

This commit is contained in:
2024-12-02 17:42:20 -06:00
parent 51a1693265
commit 686239ea03
47 changed files with 420 additions and 15 deletions

40
content/galleryImage.njk Normal file
View File

@ -0,0 +1,40 @@
---
pagination:
data: collections.galleryImages
size: 1
alias: picture
layout: layouts/base.njk
structuredData: none
eleventyComputed:
title: "Image: {{ picture.title }}"
permalink: "/gallery/{{ picture.containingGallery | slugify }}/{{ picture.filename | slugify }}/"
description: "{{ picture.title }} from gallery: {{ picture.containingGallery}}"
---
<article>
<h1>{{ picture.title }}</h1>
<div class="buttonContainer">
{% if picture.previousImage %}
<a href="../{{ picture.previousImage | slugify }}">
<button type="button">🡠 Previous</button>
</a>
{% endif %}
<a href="/gallery/{{ picture.containingGallery | slugify }}/">
<button type="button">Gallery</button>
</a>
{% if picture.nextImage %}
<a href="../{{ picture.nextImage | slugify }}">
<button type="button">Next 🡢</button>
</a>
{% endif %}
</div>
<figure>
<a href="{{ picture.baseUrl }}/{{ picture.filename }}">
<img src="{{ picture.baseUrl }}/{{ picture.filename }}" alt="{{ picture.altText }}">
</a>
{% if picture.caption %}
<figcaption>
{{ picture.caption }}
</figcaption>
{% endif %}
</figure>
</article>