Move title slide
This commit is contained in:
25
assets/revealjs/clone_title_slide.html
Normal file
25
assets/revealjs/clone_title_slide.html
Normal 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>
|
||||
Reference in New Issue
Block a user