Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a fixed footer on all slides?

Tags:

reveal.js

I have a presentation set up with reveal.js which is meant to be used unattended. So, I want to be able to show a little footer (or another link somewhere) on all slides that points to an 'Information Slide' with data about the author, how to use the slides etc.

(This is to aid people who don't really know how to use reveal.js as well as to show authorship information in detail.)

I have not been able to find anything in the documentation and there does not seem to be a callback which I can utilize.

like image 724
recluze Avatar asked Aug 25 '14 05:08

recluze


People also ask

How do I apply the same Footer to all slides?

In the Header and Footer box, on the Slide tab, select the Footer check box, and then type the footer text that you want. Click Apply to All.

How do I create a fixed Footer in PowerPoint?

Click INSERT > Header & Footer. On the Slide tab, check Footer. In the box below Footer, type the text that you want, such as the presentation title. Check Date and time to add that to your slides.

How do you add a footnote to all slides in PowerPoint?

Place the cursor where you want to add a footnote, and type a number or symbol, like "1". Select Insert > Header & Footer. On the Slide tab, select Footer, and in the Footer box, type the number or symbol you added in step 1, and then type the text that you want to appear in the footnote at the bottom of your slide.


1 Answers

This works for me (aligns to left edge as I use built-in controls on right).

Add this to your css:

.reveal .footer {
  position: absolute;
  bottom: 1em;
  left: 1em;
  font-size: 0.5em;
}

And in your html:

<div class='reveal'>
  <div class='footer'>
    Use left and right arrows to navigate
  </div>
...

If you want the footer to disappear as soon as user navigates (i.e. it should only be shown on first slide loaded because it is just a reminder), then add this to the end of your html:

<script>
  // displayed upon load, hides when slide changes
  Reveal.addEventListener('slidechanged', function(event) {
    document.querySelector('.reveal .footer').style.display = 'none';
  });
</script>

In order to get a fixed content in the PDF export (on all slides) you could find this answer useful.

like image 64
mikecarlton Avatar answered Sep 17 '22 19:09

mikecarlton