1

I'd like to repeat my title slide at the end of my quarto reveal.js presentation.

I'm looking for a command like title-slide or something other. I'm also trying to add after this title-slide some additionnal slides {visibility="uncounted"} like this. These additionnal slides are as appendix.

Thanks

JBF
  • 35
  • 5
  • Does this answer your question? [Repeat title slide at end of reveal.js presentation](https://stackoverflow.com/questions/76215257/repeat-title-slide-at-end-of-reveal-js-presentation) – Julian May 16 '23 at 09:09
  • No, its a part of the answer. See last comments. But thanks for interest ! – JBF May 16 '23 at 09:11

1 Answers1

1

This is a follow-up answer to the question asked here.

So create a blank slide as a placeholder for the repeated title slide with class .placeholder-for-titleSlide and title-slide will be copied here. If you want to the repeated title slide to be uncounted use visibility="uncounted" on the placeholder slide.

---
title: "Title Slide"
subtitle: "Its a subtitle"
author: None
date: last-modified
format: 
  revealjs:
    include-in-header: append-title-slide.html
slide-number: true
---

## Quarto

Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.

## Bullets

When you click the **Render** button a document will be generated that includes:

-   Content authored with markdown
-   Output from executable code

## Code

When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this:

```{r}
1 + 1
```


## {.placeholder-for-titleSlide visibility="uncounted"}


## Additional Slide 01 {visibility="uncounted"}

Some additional stuff


## Additional Slide 02 {visibility="uncounted"}

Some more additional stuff

append-title-slide.html

<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>


<style>
  #title-slide-cloned {
    text-align: center
  }

  #title-slide-cloned .subtitle {
    margin-bottom: 2.5rem
  }
</style>
shafee
  • 15,566
  • 3
  • 19
  • 47
  • You can think `## {.placeholder-for-titleSlide}` analogous to `\begin{frame} \titlepage \end{frame}`. – shafee May 16 '23 at 09:44
  • It's perfect like this ! Here the repeated title slide is counted, for memo – JBF May 16 '23 at 09:45