From 6cfce18819bdab90775e20896b2ed746a98613dd Mon Sep 17 00:00:00 2001 From: Mahesh Asolkar Date: Sun, 30 Mar 2025 15:56:32 -0700 Subject: [PATCH] Hide when workout done --- Workout.js | 6 ++++++ style.css | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Workout.js b/Workout.js index 7b16798..c7fb512 100644 --- a/Workout.js +++ b/Workout.js @@ -256,6 +256,12 @@ update_active_item() { buttons.forEach(function(bttn, bidx) { bttn.disabled = true; }); + const wo_done = this.text_element("div", ""); + wo_done.setAttribute("id", "workout-done"); + const wo_done_txt = this.text_element("div", "Workout done!"); + wo_done_txt.classList.add("workout-done-txt"); + wo_done.appendChild(wo_done_txt); + this.container.appendChild(wo_done); } } diff --git a/style.css b/style.css index 4dedb90..9ce2761 100644 --- a/style.css +++ b/style.css @@ -156,6 +156,30 @@ html { color: grey; } +/* Workout done sheet that covers everything */ +#workout-done { + position: fixed; + top: 0%; + left: 0%; + height: 100%; + width: 100%; + background-color: rgba(200,200,200,0.5); + z-index: 2000; + backdrop-filter: blur(0.5em); +} + +#workout-done .workout-done-txt { + position: absolute; + top: 45%; + width: 100%; + text-align: center; + font-family: "Boldonse", system-ui; + font-weight: 400; + font-size: xx-large; + color: white; + text-shadow: var(--indicator-done-grade) 0.5em 0.5em 1em; +} + /* Floating Action Buttons */ #fab-wrapper { position: fixed;