Skip to content

[FR] Ability to hide footer on specific slides including title-slide #1445

Description

@cderv

Bug description

This relates to discussion in #825 and comment in #1391 (comment)

When a custom footer is set to

format: 
  revealjs:
    footer: Custom footer

It is possible to hide it on a specific slide using the trick of inserting an empty slide footer

# Slide 2

content 

::: footer
:::

However, this does not work on first slide at first

---
format: 
  revealjs:
    footer: Custom footer
---

# Slide 1 

content

::: footer
:::

# Slide 2

content 

This is because the feature (or free riding feature) rely on the per side footer overwrite using a slidechanged event which does not happen when presentation is loaded first time

deck.on("slidechanged", function (ev) {
const prevSlideFooter = document.querySelector(
".reveal > .footer:not(.footer-default)"
);
if (prevSlideFooter) {
prevSlideFooter.remove();
}
const currentSlideFooter = ev.currentSlide.querySelector(".footer");
if (currentSlideFooter) {
defaultFooterDiv.style.display = "none";
const slideFooter = currentSlideFooter.cloneNode(true);
handleLinkClickEvents(deck, slideFooter);
deck.getRevealElement().appendChild(slideFooter);
} else {
defaultFooterDiv.style.display = "block";
}
});

This means that in the example above if you go to slide 2 then back to slide 1, it will hide the footer.

Hiding footer on title slide can be useful when you want to do a custom one like in #1391 (comment) example (https://github.com/giabaio/quarto-slides/blob/main/assets/title-slide.qmd)

Having a real mechanism to hide a footer (like adding .no-footer class on a slide maybe ?) would be a plus

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrevealjsIssues with the revealjs format

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions