From 7e3f6667b9668f21c7c2b45d5c6e0a42b748c0fb Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 11 Jul 2023 12:46:08 +0300 Subject: (presentation) nodisplay is toggled dynamically, updated controller button styles and added labels where applicable --- src/scripts/presentation.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/presentation.js b/src/scripts/presentation.js index ba7dd66..1a9b42c 100644 --- a/src/scripts/presentation.js +++ b/src/scripts/presentation.js @@ -65,11 +65,15 @@ presentBtn.addEventListener('click', function() { document.body.classList.toggle('body-bg-color'); // Show the slide controller presentCont.classList.toggle('absolute-cont'); - prevSlideBtn.classList.toggle('nodisplay'); - slideIndexShow.classList.toggle('nodisplay'); - nextSlideBtn.classList.toggle('nodisplay'); - articleBtn.classList.toggle('nodisplay'); - printBtn.classList.toggle('nodisplay'); + for (var i = presentCont.children.length - 1; i >= 0; i--) { + if (i == 4) continue; // presentBtn + presentCont.children[i].classList.toggle('nodisplay'); + } + presentBtn.classList.toggle('setting-btn'); + if (presentBtn.innerHTML[0] === 'P') + presentBtn.innerHTML = presentBtn.innerHTML.substr(8); + else + presentBtn.innerHTML = 'Present ' + presentBtn.innerHTML; // Show the first slide slides[slideIndex].classList.toggle('absolute-slide'); // Alignment of presentation to screen -- cgit v1.3.1-26-gb76a