summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-06-18 08:47:28 +0200
committerVolpeon <git@volpeon.ink>2022-06-18 08:47:28 +0200
commit7050b8141eae25a0cdc394fd195e66dd9af29ad7 (patch)
tree5ff32ef829157143f6f47278d114900b23f7616c /content
parentUse dvh unit to make exhibit component fill viewport (diff)
downloadvolpeon.ink-7050b8141eae25a0cdc394fd195e66dd9af29ad7.tar.gz
volpeon.ink-7050b8141eae25a0cdc394fd195e66dd9af29ad7.tar.bz2
volpeon.ink-7050b8141eae25a0cdc394fd195e66dd9af29ad7.zip
Improved exhibit
Diffstat (limited to 'content')
-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
9 files changed, 31 insertions, 19 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);