summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/lightbox.js41
-rw-r--r--content/projects/doodles/2021-lazy-firefox/index.md4
-rw-r--r--content/projects/drawings/2021-cute-ava/index.md2
-rw-r--r--content/projects/drawings/2021-eeveelutions/index.md6
-rw-r--r--content/projects/drawings/2021-lycanroc-ava/index.md2
-rw-r--r--content/projects/drawings/2021-refsheet/index.md8
-rw-r--r--content/projects/drawings/2021-spooky-ava-1/index.md2
-rw-r--r--content/projects/drawings/2021-spooky-ava-2/index.md2
-rw-r--r--content/projects/drawings/2022-ava-shading/index.md2
-rw-r--r--content/projects/emojis/blobfox/index.md2
-rw-r--r--content/projects/emojis/bunhd/index.md2
-rw-r--r--content/projects/emojis/vlpn/index.md2
-rw-r--r--content/script.js28
-rw-r--r--content/snow.js30
-rw-r--r--content/symbols.svg12
15 files changed, 116 insertions, 29 deletions
diff --git a/content/lightbox.js b/content/lightbox.js
new file mode 100644
index 0000000..e57d37c
--- /dev/null
+++ b/content/lightbox.js
@@ -0,0 +1,41 @@
1(() => {
2 let currentIndex = 0;
3 const mainEl = document.querySelector("main");
4 const lightboxEl = document.querySelector(".c-lightbox");
5 const lightboxBgEl = document.querySelector(".c-lightbox__bg");
6 const lightboxCloseEl = document.querySelector(".c-lightbox__close");
7 const lightboxPrevEl = document.querySelector(".c-lightbox__prev");
8 const lightboxNextEl = document.querySelector(".c-lightbox__next");
9 const lightboxImgEl = document.querySelector(".c-lightbox__img");
10 const figureEls = Array.from(mainEl.querySelectorAll("figure")).map(el => el.querySelector("a"));
11
12 const show = () => {
13 lightboxEl.classList.add("is-shown");
14 }
15
16 const hide = () => {
17 lightboxEl.classList.remove("is-shown");
18 }
19
20 const setIndex = (i) => {
21 currentIndex = i;
22 lightboxImgEl.src = figureEls[i].href;
23 };
24
25 lightboxBgEl.addEventListener("click", hide);
26 lightboxCloseEl.addEventListener("click", hide);
27 lightboxPrevEl.addEventListener("click", () => {
28 setIndex(currentIndex === 0 ? figureEls.length - 1 : currentIndex - 1);
29 });
30 lightboxNextEl.addEventListener("click", () => {
31 setIndex(currentIndex === figureEls.length - 1 ? 0 : currentIndex + 1);
32 });
33
34 figureEls.forEach((figureEl, i) => {
35 figureEl.addEventListener("click", e => {
36 e.preventDefault();
37 show();
38 setIndex(i);
39 })
40 });
41})();
diff --git a/content/projects/doodles/2021-lazy-firefox/index.md b/content/projects/doodles/2021-lazy-firefox/index.md
index f97a139..876065b 100644
--- a/content/projects/doodles/2021-lazy-firefox/index.md
+++ b/content/projects/doodles/2021-lazy-firefox/index.md
@@ -4,6 +4,10 @@ date: 2021-10-16
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](firefox_lazy.png) 8![](firefox_lazy.png)
9:::
8 10
11::: figure
9![](firefox_lazy_transparent.png) 12![](firefox_lazy_transparent.png)
13:::
diff --git a/content/projects/drawings/2021-cute-ava/index.md b/content/projects/drawings/2021-cute-ava/index.md
index 43171a9..d61fef8 100644
--- a/content/projects/drawings/2021-cute-ava/index.md
+++ b/content/projects/drawings/2021-cute-ava/index.md
@@ -4,4 +4,6 @@ date: 2021-03-01
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](ava.png) 8![](ava.png)
9:::
diff --git a/content/projects/drawings/2021-eeveelutions/index.md b/content/projects/drawings/2021-eeveelutions/index.md
index b169ee0..eed478b 100644
--- a/content/projects/drawings/2021-eeveelutions/index.md
+++ b/content/projects/drawings/2021-eeveelutions/index.md
@@ -4,8 +4,14 @@ date: 2021-08-19
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](eevee.png) 8![](eevee.png)
9:::
8 10
11::: figure
9![](flareon.png) 12![](flareon.png)
13:::
10 14
15::: figure
11![](flareon_wink.png) 16![](flareon_wink.png)
17:::
diff --git a/content/projects/drawings/2021-lycanroc-ava/index.md b/content/projects/drawings/2021-lycanroc-ava/index.md
index 275df4d..45a5261 100644
--- a/content/projects/drawings/2021-lycanroc-ava/index.md
+++ b/content/projects/drawings/2021-lycanroc-ava/index.md
@@ -4,4 +4,6 @@ date: 2021-10-19
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](ava.png) 8![](ava.png)
9:::
diff --git a/content/projects/drawings/2021-refsheet/index.md b/content/projects/drawings/2021-refsheet/index.md
index 696abe5..2680f2c 100644
--- a/content/projects/drawings/2021-refsheet/index.md
+++ b/content/projects/drawings/2021-refsheet/index.md
@@ -4,8 +4,14 @@ date: 2021-10-06
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: gallery 7::: figure
8![](bottom.png) 8![](bottom.png)
9:::
10
11::: figure
9![](bottom_cofe.png) 12![](bottom_cofe.png)
13:::
14
15::: figure
10![](side.png) 16![](side.png)
11::: 17:::
diff --git a/content/projects/drawings/2021-spooky-ava-1/index.md b/content/projects/drawings/2021-spooky-ava-1/index.md
index 5099dcc..da5c88e 100644
--- a/content/projects/drawings/2021-spooky-ava-1/index.md
+++ b/content/projects/drawings/2021-spooky-ava-1/index.md
@@ -4,4 +4,6 @@ date: 2021-10-07
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](ava.png) 8![](ava.png)
9:::
diff --git a/content/projects/drawings/2021-spooky-ava-2/index.md b/content/projects/drawings/2021-spooky-ava-2/index.md
index 84064db..23c9e46 100644
--- a/content/projects/drawings/2021-spooky-ava-2/index.md
+++ b/content/projects/drawings/2021-spooky-ava-2/index.md
@@ -4,4 +4,6 @@ date: 2021-10-14
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](ava.png) 8![](ava.png)
9:::
diff --git a/content/projects/drawings/2022-ava-shading/index.md b/content/projects/drawings/2022-ava-shading/index.md
index 7ae09f9..e3c4a10 100644
--- a/content/projects/drawings/2022-ava-shading/index.md
+++ b/content/projects/drawings/2022-ava-shading/index.md
@@ -5,4 +5,6 @@ thumbnail: png
5unlisted: true 5unlisted: true
6--- 6---
7 7
8::: figure
8![](pic.png) 9![](pic.png)
10:::
diff --git a/content/projects/emojis/blobfox/index.md b/content/projects/emojis/blobfox/index.md
index 22c4a93..a79e0de 100644
--- a/content/projects/emojis/blobfox/index.md
+++ b/content/projects/emojis/blobfox/index.md
@@ -4,7 +4,9 @@ date: 2020-09-04
4thumbnail: jpg 4thumbnail: jpg
5--- 5---
6 6
7::: figure
7![](screenshot.png) 8![](screenshot.png)
9:::
8 10
9**Latest release:** v1.6 (%last_update.yyyy_mm_dd%) 11**Latest release:** v1.6 (%last_update.yyyy_mm_dd%)
10**Download:** [regular version](blobfox.zip), [flipped version](blobfox_flip.zip) 12**Download:** [regular version](blobfox.zip), [flipped version](blobfox_flip.zip)
diff --git a/content/projects/emojis/bunhd/index.md b/content/projects/emojis/bunhd/index.md
index 4181b75..eb3b648 100644
--- a/content/projects/emojis/bunhd/index.md
+++ b/content/projects/emojis/bunhd/index.md
@@ -4,7 +4,9 @@ date: 2019-09-30
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](screenshot.png) 8![](screenshot.png)
9:::
8 10
9**Latest release:** v1.2.1 (%last_update.yyyy_mm_dd%) 11**Latest release:** v1.2.1 (%last_update.yyyy_mm_dd%)
10**Download:** [regular version](bunhd.zip), [flipped version](bunhd_flip.zip) 12**Download:** [regular version](bunhd.zip), [flipped version](bunhd_flip.zip)
diff --git a/content/projects/emojis/vlpn/index.md b/content/projects/emojis/vlpn/index.md
index 9cec213..dcd6c8b 100644
--- a/content/projects/emojis/vlpn/index.md
+++ b/content/projects/emojis/vlpn/index.md
@@ -4,7 +4,9 @@ date: 2021-07-23
4thumbnail: png 4thumbnail: png
5--- 5---
6 6
7::: figure
7![](preview.png) 8![](preview.png)
9:::
8 10
9**Latest release:** v1.1 (%last_update.yyyy_mm_dd%) 11**Latest release:** v1.1 (%last_update.yyyy_mm_dd%)
10**[Download](vlpn.zip)** 12**[Download](vlpn.zip)**
diff --git a/content/script.js b/content/script.js
deleted file mode 100644
index fd275b6..0000000
--- a/content/script.js
+++ /dev/null
@@ -1,28 +0,0 @@
1function createSnowFlake() {
2 setTimeout(() => createSnowFlake(), 50 / Math.log10(window.innerWidth / 1000 + 1));
3
4 if (document.hidden) {
5 return;
6 }
7
8 const snowFlake = document.createElementNS("http://www.w3.org/2000/svg", "svg");
9 const snowFlakeInner = document.createElementNS("http://www.w3.org/2000/svg", "use");
10 const aniDuration = (Math.random() * 3 + 2) * 1000;
11
12 snowFlakeInner.setAttribute("href", "/symbols.svg#icon-asterisk");
13
14 snowFlake.classList.add("o-icon", "o-icon--snow");
15 snowFlake.setAttribute("aria-hidden", "true");
16
17 snowFlake.style.fontSize = Math.random() * 0.5 + 0.7 + 'em';
18 snowFlake.style.left = Math.random() * 100 + '%';
19 snowFlake.style.animationDuration = aniDuration + 'ms';
20 snowFlake.style.opacity = Math.random();
21
22 setTimeout(() => snowFlake.remove(), aniDuration);
23
24 snowFlake.appendChild(snowFlakeInner);
25 document.body.appendChild(snowFlake);
26}
27
28createSnowFlake();
diff --git a/content/snow.js b/content/snow.js
new file mode 100644
index 0000000..5913d1e
--- /dev/null
+++ b/content/snow.js
@@ -0,0 +1,30 @@
1(() => {
2 function createSnowFlake() {
3 setTimeout(() => createSnowFlake(), 50 / Math.log10(window.innerWidth / 1000 + 1));
4
5 if (document.hidden) {
6 return;
7 }
8
9 const snowFlake = document.createElementNS("http://www.w3.org/2000/svg", "svg");
10 const snowFlakeInner = document.createElementNS("http://www.w3.org/2000/svg", "use");
11 const aniDuration = (Math.random() * 3 + 2) * 1000;
12
13 snowFlakeInner.setAttribute("href", "/symbols.svg#icon-asterisk");
14
15 snowFlake.classList.add("o-icon", "o-icon--snow");
16 snowFlake.setAttribute("aria-hidden", "true");
17
18 snowFlake.style.fontSize = Math.random() * 0.5 + 0.7 + 'em';
19 snowFlake.style.left = Math.random() * 100 + '%';
20 snowFlake.style.animationDuration = aniDuration + 'ms';
21 snowFlake.style.opacity = Math.random();
22
23 setTimeout(() => snowFlake.remove(), aniDuration);
24
25 snowFlake.appendChild(snowFlakeInner);
26 document.body.appendChild(snowFlake);
27 }
28
29 createSnowFlake();
30})();
diff --git a/content/symbols.svg b/content/symbols.svg
index 97992fc..51bc5af 100644
--- a/content/symbols.svg
+++ b/content/symbols.svg
@@ -85,5 +85,17 @@
85 d="m7.75 12.85-0.45662 0.45281c-1.2692 1.2692-3.327 1.2692-4.5962 0s-1.2692-3.327 0-4.5962l2-2c1.2692-1.2692 3.327-1.2692 4.5962 0" 85 d="m7.75 12.85-0.45662 0.45281c-1.2692 1.2692-3.327 1.2692-4.5962 0s-1.2692-3.327 0-4.5962l2-2c1.2692-1.2692 3.327-1.2692 4.5962 0"
86 fill="none" stroke="currentColor" /> 86 fill="none" stroke="currentColor" />
87 </symbol> 87 </symbol>
88
89 <symbol id="icon-x" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid">
90 <path d="m4 4 8 8m-8 0 8-8" fill="none" stroke="currentColor" />
91 </symbol>
92
93 <symbol id="icon-chevron-left" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid">
94 <path d="M 10.25,12.25 6,8 10.25,3.75" fill="none" stroke="currentColor" />
95 </symbol>
96
97 <symbol id="icon-chevron-right" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid">
98 <path d="m5.75 12.25 4.25-4.25-4.25-4.25" fill="none" stroke="currentColor" />
99 </symbol>
88 </defs> 100 </defs>
89</svg> 101</svg>