Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit64715a1132aab0bb8e2964db110da7c3b1336078 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-09-27 21:53:51 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-09-27 21:53:51 +0300
Files62558b5d1833925a3de092d65c2f193068473b5c
syndamia.com-64715a1132aab0bb8e2964db110da7c3b1336078.tar
syndamia.com-64715a1132aab0bb8e2964db110da7c3b1336078.tar.gz
syndamia.com-64715a1132aab0bb8e2964db110da7c3b1336078.zip
Parentcc63804c6cfc3393aa349e355e79a58e7a175b46 (diff)
[presentation] Fixed slides being misaligned when scrolling before starting slideshow
2 files changed, 2 insertions, 1 deletions
-rwxr-xr-xgenerate-hooks/make-presentation.sh2
-rw-r--r--src/scripts/presentation.js1
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='
<img id="presentBtn" class="unzoomable btn setting-btn icon" src="/img/presentation-tabler.svg" alt="Present">
<img id="printBtn" class="unzoomable btn setting-btn icon" src="/img/printer-tabler.svg" alt="Print">
</nav>
- <script type="text/javascript" src="/scripts/presentation.js" integrity="sha512-OXI4gdj1EbEP/ocoUONB7xDL8f8XWtAnVsrDIYO9KJQ+mG6N/zJP7LX834s5Q0Oyw3pEA/7XqD9ELTrBnlMeVg==" crossorigin="anonymous"></script>'
+ <script type="text/javascript" src="/scripts/presentation.js" integrity="sha512-79MwfB0EQJMdVjVnd3PA0Cn9fo4JaMUmNuyZNEGSbaMEGcqdE8sWWAbMLheaoptDyb/KuYgNw0pKwvR5Dw+lJw==" crossorigin="anonymous"></script>'
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
}