Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's Manual text for reveal.js background images #4309

Closed
Jmuccigr opened this issue Jan 25, 2018 · 2 comments
Closed

User's Manual text for reveal.js background images #4309

Jmuccigr opened this issue Jan 25, 2018 · 2 comments

Comments

@Jmuccigr
Copy link
Contributor

Following up on #3979

How does this look for instructions:


Background images can be added to self-contained reveal.js slideshows.

  • For the same image on every slide, use the reveal.js configuration option parallaxBackgroundImage either in the YAML metadata block or as a command-line variable. You can also set the parallaxBackgroundHorizontal and parallaxBackgroundVertical variables the same way and must also set parallaxBackgroundSize to have your values take effect. If you include a size, but do not set the horizontal or vertical values, reveal.js will apply its own.

  • To set the image for a particular slide, add the following attribute to the first slide-level header on the slide (which may even be empty): {data-background-image="/path/to/image"}. This will override any parallaxBackgroundImage for this slide.

Note that in reveal.js's overview mode, the background image will show up only on the first slide, while a data-background-image will show up each time it is used.

For example:

---
title: My Slideshow
parallaxBackgroundImage: /path/to/my/background_image.png
---

## Slide One

Here's my first slide. It has background_image.png as its background.

## Slide Two {data-background-image="/path/to/special_image.jpg"}

My second slide has a special image for its background.

## Slide Three

Back to my first background image!

## {data-background-image="/path/to/special_image.jpg"}

Slide Four has a special image for its background, even though the header has no content.
@Jmuccigr
Copy link
Contributor Author

Jmuccigr commented Feb 6, 2018

I've now created a PR for this with a few more details added. #4325

@Jmuccigr
Copy link
Contributor Author

@jgm, thoughts...or just low on the priority list? :-)

habi added a commit to habi/Lecture.Microtomography that referenced this issue Jan 8, 2019
- Background images for level 1 slides based on jgm/pandoc#4309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant