Implement image galleries
This commit is contained in:
40
content/galleryImage.njk
Normal file
40
content/galleryImage.njk
Normal 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>
|
Reference in New Issue
Block a user