summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/art/doodles/2021-lazy-firefox/index.md4
-rw-r--r--content/art/drawings/2021-cute-ava/index.md2
-rw-r--r--content/art/drawings/2021-eeveelutions/index.md9
-rw-r--r--content/art/drawings/2021-lycanroc-ava/index.md2
-rw-r--r--content/art/drawings/2021-refsheet/index.md9
-rw-r--r--content/art/drawings/2021-spooky-ava-1/index.md2
-rw-r--r--content/art/drawings/2021-spooky-ava-2/index.md2
-rw-r--r--content/art/drawings/2022-autumn-fox/index.md2
-rw-r--r--content/lightbox.js18
-rw-r--r--scripts/metadata_filter.lua14
-rw-r--r--templates/feed_entry.xml3
-rw-r--r--templates/layouts/exhibit.html3
12 files changed, 45 insertions, 25 deletions
diff --git a/content/art/doodles/2021-lazy-firefox/index.md b/content/art/doodles/2021-lazy-firefox/index.md
index 4e91afb..d7d47e1 100644
--- a/content/art/doodles/2021-lazy-firefox/index.md
+++ b/content/art/doodles/2021-lazy-firefox/index.md
@@ -6,6 +6,6 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - firefox_lazy.png 9 - url: firefox_lazy.png
10 - firefox_lazy_transparent.png 10 - url: firefox_lazy_transparent.png
11--- 11---
diff --git a/content/art/drawings/2021-cute-ava/index.md b/content/art/drawings/2021-cute-ava/index.md
index 3f9304e..dd350bb 100644
--- a/content/art/drawings/2021-cute-ava/index.md
+++ b/content/art/drawings/2021-cute-ava/index.md
@@ -6,5 +6,5 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - ava.png 9 - url: ava.png
10--- 10---
diff --git a/content/art/drawings/2021-eeveelutions/index.md b/content/art/drawings/2021-eeveelutions/index.md
index 3fa6b4c..87c0869 100644
--- a/content/art/drawings/2021-eeveelutions/index.md
+++ b/content/art/drawings/2021-eeveelutions/index.md
@@ -6,7 +6,10 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - eevee.png 9 - url: eevee.png
10 - flareon.png 10 description: Eevee
11 - flareon_wink.png 11 - url: flareon.png
12 description: Flareon
13 - url: flareon_wink.png
14 description: Flareon, winking
12--- 15---
diff --git a/content/art/drawings/2021-lycanroc-ava/index.md b/content/art/drawings/2021-lycanroc-ava/index.md
index a23eb5e..3e0fe64 100644
--- a/content/art/drawings/2021-lycanroc-ava/index.md
+++ b/content/art/drawings/2021-lycanroc-ava/index.md
@@ -6,7 +6,7 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - ava.png 9 - url: ava.png
10--- 10---
11 11
12Avatar for [@feralbot@botsin.space](https://botsin.space/@feralbot), a bot that posts pictures of feral characters from [e926](https://e926.net/). 12Avatar for [@feralbot@botsin.space](https://botsin.space/@feralbot), a bot that posts pictures of feral characters from [e926](https://e926.net/).
diff --git a/content/art/drawings/2021-refsheet/index.md b/content/art/drawings/2021-refsheet/index.md
index d331217..8617a95 100644
--- a/content/art/drawings/2021-refsheet/index.md
+++ b/content/art/drawings/2021-refsheet/index.md
@@ -6,7 +6,10 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - bottom.png 9 - url: bottom.png
10 - bottom_cofe.png 10 description: Bottom view
11 - side.png 11 - url: bottom_cofe.png
12 description: Bottom view, holding a cup of coffee
13 - url: side.png
14 description: Side view
12--- 15---
diff --git a/content/art/drawings/2021-spooky-ava-1/index.md b/content/art/drawings/2021-spooky-ava-1/index.md
index 4d65b49..500bd11 100644
--- a/content/art/drawings/2021-spooky-ava-1/index.md
+++ b/content/art/drawings/2021-spooky-ava-1/index.md
@@ -6,5 +6,5 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - ava.png 9 - url: ava.png
10--- 10---
diff --git a/content/art/drawings/2021-spooky-ava-2/index.md b/content/art/drawings/2021-spooky-ava-2/index.md
index 74a60ce..7fca6f0 100644
--- a/content/art/drawings/2021-spooky-ava-2/index.md
+++ b/content/art/drawings/2021-spooky-ava-2/index.md
@@ -6,5 +6,5 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - ava.png 9 - url: ava.png
10--- 10---
diff --git a/content/art/drawings/2022-autumn-fox/index.md b/content/art/drawings/2022-autumn-fox/index.md
index 0384675..6816680 100644
--- a/content/art/drawings/2022-autumn-fox/index.md
+++ b/content/art/drawings/2022-autumn-fox/index.md
@@ -6,7 +6,7 @@ thumbnail: png
6layout: exhibit 6layout: exhibit
7 7
8images: 8images:
9 - pic.png 9 - url: pic.png
10--- 10---
11 11
12First attempt at cel shading. 12First attempt at cel shading.
diff --git a/content/lightbox.js b/content/lightbox.js
index 66facd6..e4a2c29 100644
--- a/content/lightbox.js
+++ b/content/lightbox.js
@@ -27,13 +27,14 @@
27 } 27 }
28 28
29 const setIndex = (i) => { 29 const setIndex = (i) => {
30 if (i < 0 || i >= thumbnailEls.length) { 30 if (i < 0 || i >= images.length) {
31 return; 31 return;
32 } 32 }
33 thumbnailEls[currentIndex].classList.remove("is-selected"); 33 images[currentIndex].thumbnailEl.classList.remove("is-selected");
34 currentIndex = i; 34 currentIndex = i;
35 lightboxImgEl.src = figureEls[i].firstElementChild.href; 35 lightboxImgEl.src = figureEls[i].firstElementChild.href;
36 thumbnailEls[i].classList.add("is-selected"); 36 lightboxImgEl.alt = images[currentIndex].description;
37 images[i].thumbnailEl.classList.add("is-selected");
37 }; 38 };
38 39
39 const prev = () => { 40 const prev = () => {
@@ -48,7 +49,7 @@
48 lightboxPrevEl.addEventListener("click", prev); 49 lightboxPrevEl.addEventListener("click", prev);
49 lightboxNextEl.addEventListener("click", next); 50 lightboxNextEl.addEventListener("click", next);
50 51
51 const thumbnailEls = figureEls.map((figureEl, i) => { 52 const images = figureEls.map((figureEl, i) => {
52 const go = e => { 53 const go = e => {
53 e.preventDefault(); 54 e.preventDefault();
54 show(); 55 show();
@@ -72,7 +73,6 @@
72 } 73 }
73 74
74 anchorEl.addEventListener("click", go); 75 anchorEl.addEventListener("click", go);
75
76 const thumbnailButtonEl = document.createElement("button"); 76 const thumbnailButtonEl = document.createElement("button");
77 const thumbnailImgEl = document.createElement("img"); 77 const thumbnailImgEl = document.createElement("img");
78 78
@@ -89,7 +89,13 @@
89 89
90 lightboxFooterEl.appendChild(thumbnailButtonEl); 90 lightboxFooterEl.appendChild(thumbnailButtonEl);
91 91
92 return thumbnailButtonEl; 92 const captionEl = figureEl.querySelector("figcaption");
93 const description = captionEl?.innerHTML ?? "";
94
95 return {
96 thumbnailEl: thumbnailButtonEl,
97 description,
98 };
93 }); 99 });
94 100
95 setIndex(0); 101 setIndex(0);
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index 5e71994..4f7200a 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -290,16 +290,22 @@ function process(global, meta)
290 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end 290 if meta.list_limit then meta.list_limit = tonumber(pandoc.utils.stringify(meta.list_limit)) end
291 if meta.position then meta.position = pandoc.utils.stringify(meta.position) end 291 if meta.position then meta.position = pandoc.utils.stringify(meta.position) end
292 292
293 if meta.images then
294 for i = 1, #meta.images do
295 local image = meta.images[i]
296 image.url = make_absolute(pandoc.utils.stringify(image.url), meta.file_out)
297 image.url = resolve_url(global.site.url, global.file_out, image.url)
298 end
299 end
300
293 if meta.feed then 301 if meta.feed then
294 if meta.file_out:match(".html$") then 302 if meta.file_out:match(".html$") then
295 meta.feed = { 303 meta.feed = {
296 url = resolve_url(global.site.url, global.file_out, 304 url = resolve_url(global.site.url, global.file_out, meta.file_out:gsub(".html$", ".xml")),
297 meta.file_out:gsub(".html$", ".xml")),
298 } 305 }
299 else 306 else
300 meta.page = { 307 meta.page = {
301 url = resolve_url(global.site.url, global.file_out, 308 url = resolve_url(global.site.url, global.file_out, meta.file_out:gsub(".xml$", ".html")),
302 meta.file_out:gsub(".xml$", ".html")),
303 } 309 }
304 end 310 end
305 end 311 end
diff --git a/templates/feed_entry.xml b/templates/feed_entry.xml
index a71b579..f0a7f1e 100644
--- a/templates/feed_entry.xml
+++ b/templates/feed_entry.xml
@@ -28,7 +28,8 @@ $endif$
28 $if(it.layout.is_exhibit)$ 28 $if(it.layout.is_exhibit)$
29 $for(it.images)$ 29 $for(it.images)$
30 <figure> 30 <figure>
31 <img src="$it$" /> 31 <img src="$it.url.full$" alt="$it.description$" />
32 <figcaption>$it.description$</figcaption>
32 </figure> 33 </figure>
33 $endfor$ 34 $endfor$
34 $endif$ 35 $endif$
diff --git a/templates/layouts/exhibit.html b/templates/layouts/exhibit.html
index 22f4bcf..a7eeec1 100644
--- a/templates/layouts/exhibit.html
+++ b/templates/layouts/exhibit.html
@@ -55,7 +55,8 @@ $body$
55 55
56 $for(images)$ 56 $for(images)$
57 <figure class="c-figure js-lightbox__image u-d-none@js"> 57 <figure class="c-figure js-lightbox__image u-d-none@js">
58 <img src="$it$" /> 58 <img src="$it.url.rel$" alt="$it.description$" />
59 <figcaption>$it.description$</figcaption>
59 </figure> 60 </figure>
60 $endfor$ 61 $endfor$
61 </div> 62 </div>