36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
<!--
|
|
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> |