diff options
| author | Volpeon <git@volpeon.ink> | 2022-06-18 15:51:18 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-06-18 15:51:18 +0200 |
| commit | a43ca52aa2d102c7499c7fd8478304a26ea2cd0a (patch) | |
| tree | d44afb4720ffdb088a3c8f05f27befb446b195ae /content | |
| parent | Improved exhibit (diff) | |
| download | volpeon.ink-a43ca52aa2d102c7499c7fd8478304a26ea2cd0a.tar.gz volpeon.ink-a43ca52aa2d102c7499c7fd8478304a26ea2cd0a.tar.bz2 volpeon.ink-a43ca52aa2d102c7499c7fd8478304a26ea2cd0a.zip | |
Improved Lua filters, improved exhibit pages
Diffstat (limited to 'content')
| -rw-r--r-- | content/art/doodles/2021-lazy-firefox/index.md | 12 | ||||
| -rw-r--r-- | content/art/drawings/2021-cute-ava/index.md | 7 | ||||
| -rw-r--r-- | content/art/drawings/2021-eeveelutions/index.md | 20 | ||||
| -rw-r--r-- | content/art/drawings/2021-lycanroc-ava/index.md | 7 | ||||
| -rw-r--r-- | content/art/drawings/2021-refsheet/index.md | 20 | ||||
| -rw-r--r-- | content/art/drawings/2021-spooky-ava-1/index.md | 7 | ||||
| -rw-r--r-- | content/art/drawings/2021-spooky-ava-2/index.md | 7 | ||||
| -rw-r--r-- | content/art/drawings/2022-autumn-fox/index.md | 7 | ||||
| -rw-r--r-- | content/lightbox.js | 36 |
9 files changed, 63 insertions, 60 deletions
diff --git a/content/art/doodles/2021-lazy-firefox/index.md b/content/art/doodles/2021-lazy-firefox/index.md index d7d47e1..f57f184 100644 --- a/content/art/doodles/2021-lazy-firefox/index.md +++ b/content/art/doodles/2021-lazy-firefox/index.md | |||
| @@ -4,8 +4,12 @@ title: Lazy Firefox | |||
| 4 | date: 2021-10-16 | 4 | date: 2021-10-16 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: firefox_lazy.png | ||
| 10 | - url: firefox_lazy_transparent.png | ||
| 11 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
| 12 | |||
| 13 | ::: figure | ||
| 14 |  | ||
| 15 | ::: | ||
diff --git a/content/art/drawings/2021-cute-ava/index.md b/content/art/drawings/2021-cute-ava/index.md index dd350bb..962c0ce 100644 --- a/content/art/drawings/2021-cute-ava/index.md +++ b/content/art/drawings/2021-cute-ava/index.md | |||
| @@ -4,7 +4,8 @@ title: Cute Avatar | |||
| 4 | date: 2021-03-01 | 4 | date: 2021-03-01 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: ava.png | ||
| 10 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
diff --git a/content/art/drawings/2021-eeveelutions/index.md b/content/art/drawings/2021-eeveelutions/index.md index 87c0869..9cd4352 100644 --- a/content/art/drawings/2021-eeveelutions/index.md +++ b/content/art/drawings/2021-eeveelutions/index.md | |||
| @@ -4,12 +4,16 @@ title: Eeveelutions | |||
| 4 | date: 2021-08-19 | 4 | date: 2021-08-19 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: eevee.png | ||
| 10 | description: Eevee | ||
| 11 | - url: flareon.png | ||
| 12 | description: Flareon | ||
| 13 | - url: flareon_wink.png | ||
| 14 | description: Flareon, winking | ||
| 15 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
| 12 | |||
| 13 | ::: figure | ||
| 14 |  | ||
| 15 | ::: | ||
| 16 | |||
| 17 | ::: figure | ||
| 18 |  | ||
| 19 | ::: | ||
diff --git a/content/art/drawings/2021-lycanroc-ava/index.md b/content/art/drawings/2021-lycanroc-ava/index.md index 3e0fe64..8b7fb1d 100644 --- a/content/art/drawings/2021-lycanroc-ava/index.md +++ b/content/art/drawings/2021-lycanroc-ava/index.md | |||
| @@ -4,9 +4,10 @@ title: Lycanroc Avatar | |||
| 4 | date: 2021-10-19 | 4 | date: 2021-10-19 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: ava.png | ||
| 10 | --- | 7 | --- |
| 11 | 8 | ||
| 12 | Avatar for [@feralbot@botsin.space](https://botsin.space/@feralbot), a bot that posts pictures of feral characters from [e926](https://e926.net/). | 9 | Avatar for [@feralbot@botsin.space](https://botsin.space/@feralbot), a bot that posts pictures of feral characters from [e926](https://e926.net/). |
| 10 | |||
| 11 | ::: figure | ||
| 12 |  | ||
| 13 | ::: | ||
diff --git a/content/art/drawings/2021-refsheet/index.md b/content/art/drawings/2021-refsheet/index.md index 8617a95..e9b4333 100644 --- a/content/art/drawings/2021-refsheet/index.md +++ b/content/art/drawings/2021-refsheet/index.md | |||
| @@ -4,12 +4,16 @@ title: Reference Sheet Views | |||
| 4 | date: 2021-10-06 | 4 | date: 2021-10-06 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: bottom.png | ||
| 10 | description: Bottom view | ||
| 11 | - url: bottom_cofe.png | ||
| 12 | description: Bottom view, holding a cup of coffee | ||
| 13 | - url: side.png | ||
| 14 | description: Side view | ||
| 15 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
| 12 | |||
| 13 | ::: figure | ||
| 14 |  | ||
| 15 | ::: | ||
| 16 | |||
| 17 | ::: figure | ||
| 18 |  | ||
| 19 | ::: | ||
diff --git a/content/art/drawings/2021-spooky-ava-1/index.md b/content/art/drawings/2021-spooky-ava-1/index.md index 500bd11..70f000d 100644 --- a/content/art/drawings/2021-spooky-ava-1/index.md +++ b/content/art/drawings/2021-spooky-ava-1/index.md | |||
| @@ -4,7 +4,8 @@ title: \"Spooky\" Avatar | |||
| 4 | date: 2021-10-07 | 4 | date: 2021-10-07 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: ava.png | ||
| 10 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
diff --git a/content/art/drawings/2021-spooky-ava-2/index.md b/content/art/drawings/2021-spooky-ava-2/index.md index 7fca6f0..672c4c0 100644 --- a/content/art/drawings/2021-spooky-ava-2/index.md +++ b/content/art/drawings/2021-spooky-ava-2/index.md | |||
| @@ -4,7 +4,8 @@ title: Spooky Avatar | |||
| 4 | date: 2021-10-14 | 4 | date: 2021-10-14 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: ava.png | ||
| 10 | --- | 7 | --- |
| 8 | |||
| 9 | ::: figure | ||
| 10 |  | ||
| 11 | ::: | ||
diff --git a/content/art/drawings/2022-autumn-fox/index.md b/content/art/drawings/2022-autumn-fox/index.md index 6816680..ebd51ab 100644 --- a/content/art/drawings/2022-autumn-fox/index.md +++ b/content/art/drawings/2022-autumn-fox/index.md | |||
| @@ -4,10 +4,11 @@ title: Autumn Fox | |||
| 4 | date: 2022-02-25 | 4 | date: 2022-02-25 |
| 5 | thumbnail: png | 5 | thumbnail: png |
| 6 | layout: exhibit | 6 | layout: exhibit |
| 7 | |||
| 8 | images: | ||
| 9 | - url: pic.png | ||
| 10 | --- | 7 | --- |
| 11 | 8 | ||
| 12 | First attempt at cel shading. | 9 | First attempt at cel shading. |
| 13 | It's actually incomplete, but I felt like I had hit a roadblock with the shading and wanted to try again with another drawing. | 10 | It's actually incomplete, but I felt like I had hit a roadblock with the shading and wanted to try again with another drawing. |
| 11 | |||
| 12 | ::: figure | ||
| 13 |  | ||
| 14 | ::: | ||
diff --git a/content/lightbox.js b/content/lightbox.js index e4a2c29..e672d63 100644 --- a/content/lightbox.js +++ b/content/lightbox.js | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | const lightboxFooterEl = lightboxEl.querySelector(".o-lightbox__footer"); | 9 | const lightboxFooterEl = lightboxEl.querySelector(".o-lightbox__footer"); |
| 10 | const figureEls = Array.from(mainEl.querySelectorAll(".js-lightbox__image")); | 10 | const figureEls = Array.from(mainEl.querySelectorAll(".js-lightbox__image")); |
| 11 | 11 | ||
| 12 | const closeable = lightboxContainerEl.classList.contains("js-lightbox--closeable"); | 12 | const standalone = lightboxContainerEl.classList.contains("js-lightbox--standalone"); |
| 13 | let currentIndex = 0; | 13 | let currentIndex = 0; |
| 14 | let visible = !lightboxContainerEl.classList.contains("u-d-none"); | 14 | let visible = !lightboxContainerEl.classList.contains("u-d-none"); |
| 15 | let mouseDown = false; | 15 | let mouseDown = false; |
| @@ -20,7 +20,7 @@ | |||
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | const hide = () => { | 22 | const hide = () => { |
| 23 | if (closeable) { | 23 | if (!standalone) { |
| 24 | visible = false; | 24 | visible = false; |
| 25 | lightboxContainerEl.classList.add("u-d-none"); | 25 | lightboxContainerEl.classList.add("u-d-none"); |
| 26 | } | 26 | } |
| @@ -56,41 +56,27 @@ | |||
| 56 | setIndex(i); | 56 | setIndex(i); |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | let anchorEl; | 59 | const imgEl = figureEl.querySelector("img"); |
| 60 | let imgEl; | 60 | const captionEl = figureEl.querySelector("figcaption"); |
| 61 | |||
| 62 | if (figureEl.firstElementChild.tagName === "A") { | ||
| 63 | anchorEl = figureEl.firstElementChild; | ||
| 64 | imgEl = anchorEl.firstElementChild; | ||
| 65 | } else { | ||
| 66 | imgEl = figureEl.firstElementChild; | ||
| 67 | anchorEl = document.createElement("a"); | ||
| 68 | anchorEl.href = imgEl.src; | ||
| 69 | 61 | ||
| 70 | figureEl.insertBefore(anchorEl, imgEl); | 62 | const src = imgEl.src; |
| 71 | figureEl.removeChild(imgEl); | 63 | const description = captionEl?.innerHTML ?? ""; |
| 72 | anchorEl.appendChild(imgEl); | ||
| 73 | } | ||
| 74 | 64 | ||
| 75 | anchorEl.addEventListener("click", go); | ||
| 76 | const thumbnailButtonEl = document.createElement("button"); | 65 | const thumbnailButtonEl = document.createElement("button"); |
| 77 | const thumbnailImgEl = document.createElement("img"); | 66 | const thumbnailImgEl = document.createElement("img"); |
| 78 | 67 | ||
| 79 | thumbnailImgEl.classList.add("o-lightbox__thumbnail-img"); | 68 | thumbnailImgEl.classList.add("o-lightbox__thumbnail-img"); |
| 80 | thumbnailImgEl.src = anchorEl.href; | 69 | thumbnailImgEl.src = src; |
| 81 | 70 | ||
| 82 | thumbnailButtonEl.classList.add("o-lightbox__thumbnail"); | 71 | thumbnailButtonEl.classList.add("o-lightbox__thumbnail"); |
| 83 | thumbnailButtonEl.appendChild(thumbnailImgEl); | 72 | thumbnailButtonEl.appendChild(thumbnailImgEl); |
| 84 | thumbnailButtonEl.addEventListener("click", go); | 73 | thumbnailButtonEl.addEventListener("click", go); |
| 85 | 74 | ||
| 86 | if (i === currentIndex) { | ||
| 87 | thumbnailButtonEl.classList.add("is-selected"); | ||
| 88 | } | ||
| 89 | |||
| 90 | lightboxFooterEl.appendChild(thumbnailButtonEl); | 75 | lightboxFooterEl.appendChild(thumbnailButtonEl); |
| 91 | 76 | ||
| 92 | const captionEl = figureEl.querySelector("figcaption"); | 77 | if (!standalone) { |
| 93 | const description = captionEl?.innerHTML ?? ""; | 78 | figureEl.firstElementChild.addEventListener("click", go); |
| 79 | } | ||
| 94 | 80 | ||
| 95 | return { | 81 | return { |
| 96 | thumbnailEl: thumbnailButtonEl, | 82 | thumbnailEl: thumbnailButtonEl, |
| @@ -106,7 +92,7 @@ | |||
| 106 | lightboxFooterEl.remove(); | 92 | lightboxFooterEl.remove(); |
| 107 | } | 93 | } |
| 108 | 94 | ||
| 109 | if (closeable) { | 95 | if (!standalone) { |
| 110 | document.addEventListener('mousedown', (e) => { | 96 | document.addEventListener('mousedown', (e) => { |
| 111 | if (visible) { | 97 | if (visible) { |
| 112 | mouseDown = !lightboxEl.contains(e.target) || lightboxEl === e.target; | 98 | mouseDown = !lightboxEl.contains(e.target) || lightboxEl === e.target; |
