From 2cde3dbc64051c06ea1e012401ccace4c0bea8d3 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Thu, 19 Jun 2025 02:16:53 -0400 Subject: [PATCH] Updates --- about/index.html | 2 +- books/index.html | 2 +- index.html | 2 +- music/index.html | 2 +- now/index.html | 2 +- .../authority-consents-blind-spot/index.html | 2 +- posts/embracing-mysticism/index.html | 2 +- posts/finally-a-coherent-worldview/index.html | 2 +- posts/index.html | 2 +- posts/my-very-own-github-pages/index.html | 2 +- posts/needs-based-communication/index.html | 2 +- posts/site-design-updated/index.html | 2 +- .../index.html | 2 +- posts/thinking-machines/index.html | 2 +- posts/tools-of-the-trade/index.html | 2 +- recipes/amish-egg-noodles/index.html | 2 +- recipes/corn-casserole/index.html | 2 +- recipes/creamy-chicken-orzo/index.html | 2 +- recipes/index.html | 2 +- recipes/luther-salad/index.html | 2 +- recipes/pasta-rosatella/index.html | 2 +- recipes/perfect-homemade-brownies/index.html | 2 +- recipes/sloppy-joes/index.html | 2 +- recipes/spanish-style-rice/index.html | 2 +- scripts/effects.js | 172 +++++++++--------- search/index.html | 2 +- sitemap.xml | 2 +- unoffice-hours/index.html | 2 +- uses/index.html | 2 +- 29 files changed, 116 insertions(+), 112 deletions(-) diff --git a/about/index.html b/about/index.html index 1c3348c..056546a 100644 --- a/about/index.html +++ b/about/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/books/index.html b/books/index.html index ef309f0..f9b879f 100644 --- a/books/index.html +++ b/books/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/index.html b/index.html index 08142bc..20c02c9 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/music/index.html b/music/index.html index c24b22a..405ee42 100644 --- a/music/index.html +++ b/music/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/now/index.html b/now/index.html index 819f224..111000e 100644 --- a/now/index.html +++ b/now/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/authority-consents-blind-spot/index.html b/posts/authority-consents-blind-spot/index.html index a37ef81..e72745d 100644 --- a/posts/authority-consents-blind-spot/index.html +++ b/posts/authority-consents-blind-spot/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/embracing-mysticism/index.html b/posts/embracing-mysticism/index.html index 07c1749..97e3466 100644 --- a/posts/embracing-mysticism/index.html +++ b/posts/embracing-mysticism/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/finally-a-coherent-worldview/index.html b/posts/finally-a-coherent-worldview/index.html index dbc5d61..5f15610 100644 --- a/posts/finally-a-coherent-worldview/index.html +++ b/posts/finally-a-coherent-worldview/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/index.html b/posts/index.html index 94bcc0d..6988c4c 100644 --- a/posts/index.html +++ b/posts/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/my-very-own-github-pages/index.html b/posts/my-very-own-github-pages/index.html index 09e1e89..7cf9209 100644 --- a/posts/my-very-own-github-pages/index.html +++ b/posts/my-very-own-github-pages/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/needs-based-communication/index.html b/posts/needs-based-communication/index.html index d580c35..137b4bf 100644 --- a/posts/needs-based-communication/index.html +++ b/posts/needs-based-communication/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/site-design-updated/index.html b/posts/site-design-updated/index.html index 01c7916..ebcf0a9 100644 --- a/posts/site-design-updated/index.html +++ b/posts/site-design-updated/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/the-trivium-a-tool-for-learning-anything/index.html b/posts/the-trivium-a-tool-for-learning-anything/index.html index 6dfe6f3..c2e9e0f 100644 --- a/posts/the-trivium-a-tool-for-learning-anything/index.html +++ b/posts/the-trivium-a-tool-for-learning-anything/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/thinking-machines/index.html b/posts/thinking-machines/index.html index 6129ecb..17781d7 100644 --- a/posts/thinking-machines/index.html +++ b/posts/thinking-machines/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/posts/tools-of-the-trade/index.html b/posts/tools-of-the-trade/index.html index 3cf7bd3..87085e6 100644 --- a/posts/tools-of-the-trade/index.html +++ b/posts/tools-of-the-trade/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/amish-egg-noodles/index.html b/recipes/amish-egg-noodles/index.html index eb3284c..d7e209b 100644 --- a/recipes/amish-egg-noodles/index.html +++ b/recipes/amish-egg-noodles/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/corn-casserole/index.html b/recipes/corn-casserole/index.html index c1fbf42..d96cf31 100644 --- a/recipes/corn-casserole/index.html +++ b/recipes/corn-casserole/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/creamy-chicken-orzo/index.html b/recipes/creamy-chicken-orzo/index.html index f196f39..6dbd8f3 100644 --- a/recipes/creamy-chicken-orzo/index.html +++ b/recipes/creamy-chicken-orzo/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/index.html b/recipes/index.html index 856c4e2..68c711c 100644 --- a/recipes/index.html +++ b/recipes/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/luther-salad/index.html b/recipes/luther-salad/index.html index b440949..d008498 100644 --- a/recipes/luther-salad/index.html +++ b/recipes/luther-salad/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/pasta-rosatella/index.html b/recipes/pasta-rosatella/index.html index 65859a9..228a04f 100644 --- a/recipes/pasta-rosatella/index.html +++ b/recipes/pasta-rosatella/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/perfect-homemade-brownies/index.html b/recipes/perfect-homemade-brownies/index.html index dbdc30a..9cc3ba0 100644 --- a/recipes/perfect-homemade-brownies/index.html +++ b/recipes/perfect-homemade-brownies/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/sloppy-joes/index.html b/recipes/sloppy-joes/index.html index a47352b..904b698 100644 --- a/recipes/sloppy-joes/index.html +++ b/recipes/sloppy-joes/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/recipes/spanish-style-rice/index.html b/recipes/spanish-style-rice/index.html index 3253bc6..1ea1277 100644 --- a/recipes/spanish-style-rice/index.html +++ b/recipes/spanish-style-rice/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/scripts/effects.js b/scripts/effects.js index aa1167c..a63a6fa 100644 --- a/scripts/effects.js +++ b/scripts/effects.js @@ -5,91 +5,95 @@ const defaultPrefs = { language: "english", theme: "auto", }; -if (umami != null) { - umami.identify({ deviceTheme: darkModeMediaQuery ? "dark" : "light" }); -} -Object.entries(defaultPrefs).forEach(([key, defaultPref]) => { - const currentPref = localStorage.getItem(key) ?? defaultPref; - applyPreference(key, currentPref, false); - document.querySelectorAll(`input[name=${key}]`).forEach((input) => { - input.addEventListener("change", (e) => { - applyPreference(key, e.currentTarget.value, true); - }); +document.addEventListener('load', () => { + document.querySelector('script[data-website-id]').addEventListener('load', () => { + try { + umami.identify({ deviceTheme: darkModeMediaQuery ? "dark" : "light" }); + } catch {} }); -}); -function applyPreference(key, value, shouldSave) { - if (umami !== null) { - umami.identify({ - [`pref-${key}`]: value, - }); - if (shouldSave) { - umami.track(`Set ${key} to ${value}`); - } - } - document.body.setAttribute(`data-${key}`, value); - document.querySelectorAll(`input[name=${key}]`).forEach((input) => { - if (input.value === value) { - input.checked = true; - } - }); - if (shouldSave) { - localStorage.setItem(key, value); - } -} - -/** @param {Event} evt */ -function addEffect({ target }) { - const effectsLayer = document.querySelector("#effects"); - if ( - target == null || - !target["matches"] || - !target.matches("a[href],.nav-toggle-button,button,input[type='radio']") - ) { - return; - } - const rects = Array.from(target.getClientRects()); - Array.from(target.children).forEach((child) => { - rects.push(...Array.from(child.getClientRects())); - }); - rects.forEach((rect) => { - const { top, left, width, height } = rect; - const newEffect = document.createElement("div"); - newEffect.__effectParent = target; - newEffect.classList.add("effect-instance"); - const padding = "10rem"; - newEffect.style.top = `calc(${top + window.scrollY}px - ${padding})`; - newEffect.style.left = `calc(${left + window.scrollX}px - ${padding})`; - newEffect.style.width = `calc(${width}px + 2 * ${padding})`; - newEffect.style.height = `calc(${height}px + 2 * ${padding})`; - effectsLayer.appendChild(newEffect); - }); -} -document.addEventListener("mouseenter", addEffect, true); -document.addEventListener("focus", addEffect, true); - -/** @param {Event} evt */ -function removeEffect({ target }) { - const effectsLayer = document.querySelector("#effects"); - const effects = Array.from(effectsLayer.children).filter( - (e) => e.__effectParent === target, - ); - effects.forEach((e) => { - e.getAnimations().forEach((anim) => { - if (anim.currentTime < 100) { - anim.pause(); - effectsLayer.removeChild(e); - return; - } - anim.pause(); - anim.updatePlaybackRate(-0.25); - anim.play(); - anim.addEventListener("finish", () => { - if (effectsLayer.contains(e)) { - effectsLayer.removeChild(e); - } + Object.entries(defaultPrefs).forEach(([key, defaultPref]) => { + const currentPref = localStorage.getItem(key) ?? defaultPref; + applyPreference(key, currentPref, false); + document.querySelectorAll(`input[name=${key}]`).forEach((input) => { + input.addEventListener("change", (e) => { + applyPreference(key, e.currentTarget.value, true); }); }); }); -} -document.addEventListener("mouseleave", removeEffect, true); -document.addEventListener("blur", removeEffect, true); + function applyPreference(key, value, shouldSave) { + if (umami !== null) { + umami.identify({ + [`pref-${key}`]: value, + }); + if (shouldSave) { + umami.track(`Set ${key} to ${value}`); + } + } + document.body.setAttribute(`data-${key}`, value); + document.querySelectorAll(`input[name=${key}]`).forEach((input) => { + if (input.value === value) { + input.checked = true; + } + }); + if (shouldSave) { + localStorage.setItem(key, value); + } + } + + /** @param {Event} evt */ + function addEffect({ target }) { + const effectsLayer = document.querySelector("#effects"); + if ( + target == null || + !target["matches"] || + !target.matches("a[href],.nav-toggle-button,button,input[type='radio']") + ) { + return; + } + const rects = Array.from(target.getClientRects()); + Array.from(target.children).forEach((child) => { + rects.push(...Array.from(child.getClientRects())); + }); + rects.forEach((rect) => { + const { top, left, width, height } = rect; + const newEffect = document.createElement("div"); + newEffect.__effectParent = target; + newEffect.classList.add("effect-instance"); + const padding = "10rem"; + newEffect.style.top = `calc(${top + window.scrollY}px - ${padding})`; + newEffect.style.left = `calc(${left + window.scrollX}px - ${padding})`; + newEffect.style.width = `calc(${width}px + 2 * ${padding})`; + newEffect.style.height = `calc(${height}px + 2 * ${padding})`; + effectsLayer.appendChild(newEffect); + }); + } + document.addEventListener("mouseenter", addEffect, true); + document.addEventListener("focus", addEffect, true); + + /** @param {Event} evt */ + function removeEffect({ target }) { + const effectsLayer = document.querySelector("#effects"); + const effects = Array.from(effectsLayer.children).filter( + (e) => e.__effectParent === target, + ); + effects.forEach((e) => { + e.getAnimations().forEach((anim) => { + if (anim.currentTime < 100) { + anim.pause(); + effectsLayer.removeChild(e); + return; + } + anim.pause(); + anim.updatePlaybackRate(-0.25); + anim.play(); + anim.addEventListener("finish", () => { + if (effectsLayer.contains(e)) { + effectsLayer.removeChild(e); + } + }); + }); + }); + } + document.addEventListener("mouseleave", removeEffect, true); + document.addEventListener("blur", removeEffect, true); +}); diff --git a/search/index.html b/search/index.html index cf200d5..090c966 100644 --- a/search/index.html +++ b/search/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/sitemap.xml b/sitemap.xml index 01339fe..724b85b 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -228,7 +228,7 @@ /feed.xml - 2025-06-19T06:07:14.814Z + 2025-06-19T06:16:50.935Z diff --git a/unoffice-hours/index.html b/unoffice-hours/index.html index d83219b..a75911f 100644 --- a/unoffice-hours/index.html +++ b/unoffice-hours/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - + diff --git a/uses/index.html b/uses/index.html index 63d85eb..13b13fc 100644 --- a/uses/index.html +++ b/uses/index.html @@ -13,7 +13,7 @@ src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d" > - +