From 64715a1132aab0bb8e2964db110da7c3b1336078 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 27 Sep 2022 21:53:51 +0300 Subject: [presentation] Fixed slides being misaligned when scrolling before starting slideshow --- generate-hooks/make-presentation.sh | 2 +- src/scripts/presentation.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/generate-hooks/make-presentation.sh b/generate-hooks/make-presentation.sh index b832346..e219453 100755 --- a/generate-hooks/make-presentation.sh +++ b/generate-hooks/make-presentation.sh @@ -37,7 +37,7 @@ presentation=' Present Print - ' + ' presentation=$(echo $presentation | sed 's/\//\\\//g') # Loop through all HTML files in given directory diff --git a/src/scripts/presentation.js b/src/scripts/presentation.js index b611355..88b4e11 100644 --- a/src/scripts/presentation.js +++ b/src/scripts/presentation.js @@ -52,4 +52,5 @@ presentBtn.onclick = function() { // Show the first slide slides[slideIndex].classList.toggle('absolute-slide'); slideIndex = 0; + window.scrollTo(0, 0); // Alignment of presentation to screen } -- cgit v1.3.1-26-gb76a