Fix slide numbers not showing up after reload
Change-Id: Ib561ed4a26a5815f36c3ae57607d4ae3d238d14f
diff --git a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
index ff05143..297df7f 100644
--- a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
+++ b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
@@ -677,20 +677,21 @@
document.querySelector("#ids-footer").style.display = "none";
}
- Reveal.on('ready', event => {
- if (event.indexh === 0) {
- makeFooterInvisible();
- }
- });
- Reveal.addEventListener('slidechanged', (event) => {
+ function makeFooterAndSlideNumberInvisibleOnTitlePage(event) {
if (event.indexh === 0) {
Reveal.configure({ slideNumber: null });
makeFooterInvisible();
- }
- if (event.indexh > 0) {
+ } else {
Reveal.configure({ slideNumber: 'c' });
makeFooterVisible();
}
+ }
+
+ Reveal.on('ready', event => {
+ makeFooterAndSlideNumberInvisibleOnTitlePage(event);
+ });
+ Reveal.addEventListener('slidechanged', (event) => {
+ makeFooterAndSlideNumberInvisibleOnTitlePage(event);
});
</script>
$endif$