From 991365d6179ed9e5be186310874533cb944c4731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?May=20M=C3=A1rquez?= Date: Wed, 31 May 2023 13:26:25 -0400 Subject: [PATCH 1/4] update param name in wp-engine files to avoid confusion --- project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.json b/project.json index 3727f21..c9c67fc 100644 --- a/project.json +++ b/project.json @@ -47,7 +47,7 @@ "max" : 300, "min" : 1, "order" : 103, - "text" : "Ephemeris Refresh Rate", + "text" : "Seconds Between Position Updates", "type" : "slider", "value" : 20 }, From ca84421447dcd3b4fb0b1ce15dbe11ded1f6e163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?May=20M=C3=A1rquez?= Date: Wed, 31 May 2023 13:46:39 -0400 Subject: [PATCH 2/4] fix issue where time numerals weren't being updated every minute if ephemeris refresh rate was too high --- clock.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clock.js b/clock.js index ace11be..f4be0e0 100644 --- a/clock.js +++ b/clock.js @@ -57,7 +57,7 @@ window.addEventListener( signs = ["L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"], radius, date, - seconds, + lastUpdateTime, illumFraction, offsetAscendant, isNight = false, @@ -338,19 +338,19 @@ window.addEventListener( // Only get a new ephemeris every cooldown period to save resources // When a new ephemeris is fetched, redraw all resources that depend on it if ( - Math.floor(seconds / EPHEMERIS_COOLDOWN) != + Math.floor(lastUpdateTime / EPHEMERIS_COOLDOWN) != Math.floor(date.getSeconds() / EPHEMERIS_COOLDOWN) ) { getSigns(); clearCanvas(signCanvas); - seconds = date.getSeconds(); + lastUpdateTime = date.getSeconds(); drawInnerFace(); drawInnerSigns(); drawMoonPhase(); drawSignHands(); } // Only redraw innerCanvas to highlight new numbers every minute - if (Math.floor(seconds) % 60 == 0) { + if (Math.floor(date.getSeconds()) % 60 == 0) { clearCanvas(innerCanvas); drawNumerals(); } From 077a1141c581d6f3a6ebc55ba6ab9ab5005772f4 Mon Sep 17 00:00:00 2001 From: Damian Thomas Date: Mon, 2 Dec 2024 17:59:52 -0500 Subject: [PATCH 3/4] added .gitignore; ignoring .vite cache folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f1f131 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vite \ No newline at end of file From c168cde0d0687a33b617b6e8676d5d88fda51cc5 Mon Sep 17 00:00:00 2001 From: Damian Thomas Date: Mon, 2 Dec 2024 18:53:22 -0500 Subject: [PATCH 4/4] added webring functionality --- fts.css | 80 ++++++++++++++++++++++ fts.js | 24 +++++++ index.html | 190 +++++++++++++++++++++++++++++------------------------ 3 files changed, 209 insertions(+), 85 deletions(-) create mode 100644 fts.css create mode 100644 fts.js diff --git a/fts.css b/fts.css new file mode 100644 index 0000000..8a00399 --- /dev/null +++ b/fts.css @@ -0,0 +1,80 @@ +body { + overflow: hidden; +} + +#webring { + position: absolute; + z-index: 10; + bottom: 0; + right: 0; + width: 100vw; + + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + transition: all 350ms, opacity 5s; +} + +#webring > * { + transition: all 350ms; +} + + +#webring > button { + transform-origin: 50% 50%; + background-color: transparent; + border: none; + padding: 16px 0; + +} + +#webring > button > img { + filter: invert(); + scale: 1.5; + rotate: 180deg; +} + +#webring > iframe { + border: 0; + position: fixed; + transform: translateY(100%); +} + +@keyframes bounce { + 0% {transform: translateY(0%);} + 75% {transform: translateY(10%);} + 100% {transform: translateY(0%);} +} + + +#webring.disabled { + pointer-events: none; + opacity: 0; +} + +#webring.nudge > button { + animation: bounce 1s ease-in-out infinite; +} + +#webring.enabled { + bottom: 2rem; +} + +#webring.enabled > button > img { + rotate: 0deg; +} + +#webring.enabled > button { + transform: translateY(-125%); +} + +#webring.enabled > iframe { + transform: translateY(0%); +} + +@media (min-width: 600px) { + #webring { + width: 30%; + } +} \ No newline at end of file diff --git a/fts.js b/fts.js new file mode 100644 index 0000000..fab6c9f --- /dev/null +++ b/fts.js @@ -0,0 +1,24 @@ +// states: disabled, nudge, enabled, idle +const webring = document.getElementById("webring"); +const button = webring.querySelector("button"); + +setTimeout(() => { + webring.className = "nudge"; +}, 1000); + +button.addEventListener("pointerdown", () => { + console.log("clicked") + switch (webring.className) { + case "disabled": + case "nudge": + case "idle": + webring.className = "enabled"; + break; + case "enabled": + webring.className = "idle"; + break; + default: + break; + } +}); + diff --git a/index.html b/index.html index 162a585..99b9d35 100644 --- a/index.html +++ b/index.html @@ -1,88 +1,108 @@ - - Astrology Clock - - - - - - - - - - - - -
- Right-click for options -
-
- -
- - - - - - - - - - - + + Astrology Clock + + + + + + + + + + + + + + + + + +
+ Right-click for options +
+
+ +
+
+ + +
+ + + + + + + + + + + + + \ No newline at end of file