From ee6701dd37ed8fdb8828b3ae7525d6862e1b17f5 Mon Sep 17 00:00:00 2001 From: abutler911 Date: Mon, 9 Oct 2023 22:29:54 -0600 Subject: [PATCH] more style changes --- index.html | 6 ++++-- script.js | 11 ++++++----- styles.css | 28 +++++++++++++++++++--------- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 8cc086b..7c8b65d 100644 --- a/index.html +++ b/index.html @@ -21,9 +21,11 @@

EFT Tapping


-
- +
+ +
+
diff --git a/script.js b/script.js index 111c13d..0a85ed1 100644 --- a/script.js +++ b/script.js @@ -60,22 +60,23 @@ let countdown; let countdownValue = 5; const displayElement = document.getElementById("affirmation-display"); +const sectionNameElement = document.getElementById("section-name"); const timerElement = document.getElementById("timer"); const prevButton = document.getElementById("prev-button"); const nextButton = document.getElementById("next-button"); const pauseButton = document.getElementById("pause-button"); function updateDisplay() { - if ( - currentPhraseIndex < affirmationSections[currentSectionIndex].phrases.length - ) { - displayElement.textContent = - affirmationSections[currentSectionIndex].phrases[currentPhraseIndex]; + const currentSection = affirmationSections[currentSectionIndex]; + if (currentPhraseIndex < currentSection.phrases.length) { + displayElement.textContent = currentSection.phrases[currentPhraseIndex]; + sectionNameElement.textContent = currentSection.section; // Set the section name countdownValue = 7; displayElement.classList.remove("breathe"); } else { displayElement.textContent = "Place a hand on your heart and belly, and take three deep breaths."; + sectionNameElement.textContent = ""; // Clear the section name during the breathing part countdownValue = 15; displayElement.classList.add("breathe"); } diff --git a/styles.css b/styles.css index f317da3..760fc62 100644 --- a/styles.css +++ b/styles.css @@ -57,24 +57,34 @@ h3 { padding: 0px 20px; border-radius: 10px; } - -/* Affirmation display */ -#affirmation-display { - width: 80%; - min-height: 20vh; +#affirmation-container { display: flex; + flex-direction: column; align-items: center; - justify-content: center; - text-align: center; + width: 80%; + min-height: 20vh; background-color: #ffffff; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding: 20px; margin-top: 20px; +} +/* Affirmation display */ +#affirmation-display { + width: 100%; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + text-align: center; font-size: 2rem; - margin-bottom: 20px; } - +#section-name { + font-size: 0.8rem; + align-self: flex-start; + /* margin-bottom: 10px; */ + color: #555; +} /* Button container */ .button-container { display: flex;