From aac6e335af912624ce699a64f028caa24664d6f2 Mon Sep 17 00:00:00 2001 From: limepotato Date: Tue, 17 Sep 2024 21:29:15 -0600 Subject: [PATCH] hide the info a bit --- frontend/public/scripts/main.js | 38 ++++++++++++++++++- .../components/main-page/widgets/meow.astro | 22 +++++++---- .../components/main-page/widgets/ntfy.astro | 17 ++++++--- 3 files changed, 64 insertions(+), 13 deletions(-) diff --git a/frontend/public/scripts/main.js b/frontend/public/scripts/main.js index daa4439..0d35109 100644 --- a/frontend/public/scripts/main.js +++ b/frontend/public/scripts/main.js @@ -74,4 +74,40 @@ async function beepClick() { beepButton.disabled=true; beepButton.innerHTML = "sleeping..."; sendMeow(beepEndpoint); -} \ No newline at end of file +} + + +// Show/Hide Info Boxes +const posterInfoButton = document.getElementById("poster-info-button"); +const posterInfo = document.getElementById("poster-info"); +let isPosterInfoHidden = true + +const ntfyInfoButton = document.getElementById("ntfy-info-button"); +const ntfyInfo = document.getElementById("ntfy-info"); +let isNtfyInfoHidden = true + +function showPosterInfo() { + if (isPosterInfoHidden) { + posterInfo.style.display = "initial"; + posterInfoButton.innerHTML = "[hide more info]" + isPosterInfoHidden = false; + } + else { + posterInfo.style.display = "none"; + posterInfoButton.innerHTML = "[show more info]" + isPosterInfoHidden = true; + } +} + +function showNtfyInfo() { + if (isNtfyInfoHidden) { + ntfyInfo.style.display = "initial"; + ntfyInfoButton.innerHTML = "[hide more info]" + isNtfyInfoHidden = false; + } + else { + ntfyInfo.style.display = "none"; + ntfyInfoButton.innerHTML = "[show more info]" + isNtfyInfoHidden = true; + } +} diff --git a/frontend/src/components/main-page/widgets/meow.astro b/frontend/src/components/main-page/widgets/meow.astro index 260da98..370fade 100644 --- a/frontend/src/components/main-page/widgets/meow.astro +++ b/frontend/src/components/main-page/widgets/meow.astro @@ -1,22 +1,30 @@

- press the buttons bellow to make me meow/beep on the fediverse, - there is a global timeout of 33 minutes, and a separate timer for each button. if it says its sleeping, come back and try again later! -
you can POST to https://nelle.observer/api/meow or https://nelle.observer/api/beep - respectively, and GET at the same endpoints to check the status of the timer.
-
+
+

meow/beep

+

press the buttons bellow to make me meow/beep on the fediverse, + there is a global timeout of 33 minutes, and a separate timer for each button. if it says its sleeping, come back and try again later!

+ + + + +
+ [show more info]
\ No newline at end of file diff --git a/frontend/src/components/main-page/widgets/ntfy.astro b/frontend/src/components/main-page/widgets/ntfy.astro index 2081311..6c6ef81 100644 --- a/frontend/src/components/main-page/widgets/ntfy.astro +++ b/frontend/src/components/main-page/widgets/ntfy.astro @@ -1,9 +1,9 @@
+

ntfy box

send me a notification! type words and press send

- music recs, questions, jokes, confessions of your sins, etc, welcome, I respond to all or most as vagueposts on the fediverse. -
- +

music recommendations, questions, jokes, confessions of your sins, etc, welcome, I respond to all or most as vagueposts on the fediverse.

+ DESTROYED ON SIGHT: slurs, flirting, lewd or sexual comments/jokes without previous explicit permission. \ No newline at end of file + + +
+ +
+ [show more info] \ No newline at end of file