Move title slide

This commit is contained in:
2025-06-23 20:17:28 +02:00
parent 732ed1a39a
commit 1941b43d1c
5 changed files with 499 additions and 420 deletions

View File

@@ -0,0 +1,25 @@
<!--
Below is the original version of: https://stackoverflow.com/questions/76261113/repeat-title-slide-at-end-of-reveal-js-presentation-and-add-additionnal-slides-a
Which *clones* the title slide to the placeholder slide.
You can add the placeholder slide like this:
## {.placeholder-for-titleSlide visibility="uncounted"}
-->
<script>
function move_titleSlide() {
var titleSlide = document.querySelector('section#title-slide');
var titleSlideClone = titleSlide.cloneNode(true);
titleSlideClone.id = 'title-slide-cloned';
var placeholder = document.querySelector('section.placeholder-for-titleSlide');
var visibility = placeholder.getAttribute('data-visibility');
if (visibility !== null) {
titleSlideClone.setAttribute('data-visibility', visibility);
}
placeholder.replaceWith(titleSlideClone);
Reveal.sync();
}
window.document.addEventListener("DOMContentLoaded", function (event) {
move_titleSlide();
});
</script>

View File

@@ -8,4 +8,28 @@
<a href="https://www.hemf.wiwi.uni-due.de/en/">
<img src="assets/hecf_signet.svg" alt="HECF Logo" style="height: 4vh; width: auto;">
</a>
</div>
</div>
<script>
function move_titleSlide() {
var titleSlide = document.querySelector('section#title-slide');
var placeholder = document.querySelector('section.placeholder-for-titleSlide');
if (titleSlide && placeholder) {
// Transfer visibility attribute from placeholder to title slide
var visibility = placeholder.getAttribute('data-visibility');
if (visibility !== null) {
titleSlide.setAttribute('data-visibility', visibility);
}
// Move the title slide to replace the placeholder
placeholder.parentNode.replaceChild(titleSlide, placeholder);
Reveal.sync();
}
}
window.document.addEventListener("DOMContentLoaded", function (event) {
move_titleSlide();
});
</script>

View File

@@ -0,0 +1,36 @@
<!--
Below is an adjusted version of: https://stackoverflow.com/questions/76261113/repeat-title-slide-at-end-of-reveal-js-presentation-and-add-additionnal-slides-a
Which *moves* the title slide to the placeholder slide.
You can add the placeholder slide like this:
## {.placeholder-for-titleSlide visibility="uncounted"}
-->
<script>
function move_titleSlide() {
var titleSlide = document.querySelector('section#title-slide');
var placeholder = document.querySelector('section.placeholder-for-titleSlide');
if (titleSlide && placeholder) {
// Transfer visibility attribute from placeholder to title slide
var visibility = placeholder.getAttribute('data-visibility');
if (visibility !== null) {
titleSlide.setAttribute('data-visibility', visibility);
}
// Move the title slide to replace the placeholder
placeholder.parentNode.replaceChild(titleSlide, placeholder);
Reveal.sync();
}
}
window.document.addEventListener("DOMContentLoaded", function (event) {
move_titleSlide();
});
</script>
<style>
#title-slide .subtitle {
margin-bottom: 2.5rem
}
</style>