Revealjs title slide: best practice for adaptions from xaringan-template? #2194
-
A question I am looking for input: I customized the title-page etc for xaringan slides based on two requirements:
below is a screenshot and the css I was using for getting this layout (imitating the original layout): I mimicked the partly coloured background with setting a background-color und a white border in a custom css like this:
I tried to 'translate' this to quarto/revealjs, but I failed so far in the adpation of this "background" trick. What I tried so far:
I realized that there are several 'levels' within reveal-slides, e.g.
I also tried to modify I'm satisfied with the Any inputs welcome - here is a repo with two minimal reprexes for both quarto and xaringan : https://github.com/cathblatter/slides-demo - thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 18 replies
-
With revealjs, you can create custom title slide by deactivating the default one instead of tweaking it. This is done by not providing a This way your first slide will be used as title slide and you can add a specific content to it to have it work like you want. Regarding background, reveal.js uses a specific organization for background, and the customisation using CSS is harder. I would use the slide background attributes to tweak that (https://quarto.org/docs/presentations/revealjs/#slide-backgrounds). Custom format developed as Extension (https://quarto.org/docs/extensions/formats.html) is something more advanced but closer to a custom R Markdown output format based on xaringan. You can include Lua filter in it (https://quarto.org/docs/extensions/lua.html) that would allow to tweak / set some defaults based on your format. (for example changing the background attributes for the title slide without a user having to set it). Hope it helps, and I am sure @mcanouil has some additional advices to give 😉 right ? |
Beta Was this translation helpful? Give feedback.
-
From File
|
Beta Was this translation helpful? Give feedback.
-
@cathblatter The following block should work as intended without having to add an extra section $if(title)$
<section id="$idprefix$title-slide"$for(title-slide-attributes/pairs)$ $it.key$="$it.value$"$endfor$>
+ <div class="banner">
<h1 class="title">$title$</h1>
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$for(author)$
<p class="author">$author$</p>
$endfor$
$for(institute)$
<p class="institute">$institute$</p>
$endfor$
$if(date)$
<p class="date">$date$</p>
$endif$
+ </div>
</section>
$endif$ And maybe the PS: I can't test it now, but definitely will. |
Beta Was this translation helpful? Give feedback.
-
Here another related hack: Screen.Recording.2022-09-05.at.23.02.56.movSee
|
Beta Was this translation helpful? Give feedback.
From
quarto-dev/quarto-cli/src/resources/formats/revealjs/pandoc/template.revealjs
, I added a div with a "banner" css class:File
template.revealjs