From 9023df0772a80315e6e2418160de8cf5111b91a5 Mon Sep 17 00:00:00 2001 From: nate smith Date: Sat, 17 Aug 2024 15:03:26 -0500 Subject: [PATCH] bunch of cosmetic stuff --- templates/index.tmpl | 31 ++++++++++++++++++------------- web/assets/main.js | 11 ++++++++++- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/templates/index.tmpl b/templates/index.tmpl index 1b64851..f798be1 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -25,7 +25,7 @@ body { } #about { - background-color: grey; + background-color: white; display: none; color: black; } @@ -130,11 +130,17 @@ a {
-

Trunkless

-

- - -

+
+
+

Trunkless

+
+
+ + + + +
+

HELLO. THIS IS A SOFT WARE FOR MAKING CUT-UP POETRY. THERE ARE A VARIETY OF CORPORA TO CHOOSE FROM: @@ -151,7 +157,6 @@ a {

-
- -
+
+
+
+ + + as text as image include sources -
-
-
-
diff --git a/web/assets/main.js b/web/assets/main.js index bdd5443..89797bd 100644 --- a/web/assets/main.js +++ b/web/assets/main.js @@ -309,30 +309,39 @@ class ThemeToggler extends HTMLAnchorElement { constructor() { super(); this.addEventListener("click", this.click); - this.theme = "dark"; + this.theme = "light"; this.innerText = "◑"; this.setAttribute("aria-hidden", "true"); this.style.cursor = "pointer"; } click() { + // TODO this should all be done via class toggling my dude if (this.theme == "light") { this.theme = "dark"; $("body").style.backgroundColor = "black"; $("body").style.backgroundImage = 'url("/bg_dark.gif")'; $("body").style.color = "white"; $(".main").style.backgroundColor = "black"; + $("#about").style.backgroundColor = "black"; + $("#about").style.color = "white"; $("h1").style.backgroundColor = "black"; $(".controls form").style.backgroundColor = "black"; + $(".corner").style.backgroundColor = "black"; + $(".corner .bordered").style.border = "1px solid white"; $$("a").forEach((e) => { e.style.color = "white" }); } else { this.theme = "light"; $("body").style.backgroundColor = "white"; $("body").style.backgroundImage = 'url("/bg_light.gif")'; $("body").style.color = "black"; + $("#about").style.backgroundColor = "white"; + $("#about").style.color = "black"; $(".main").style.backgroundColor = "white"; $(".controls form").style.backgroundColor = "white"; $("h1").style.backgroundColor = "white"; + $(".corner").style.backgroundColor = "white"; + $(".corner .bordered").style.border = "1px solid black"; $$("a").forEach((e) => { e.style.color = "black" }); } }