Add example of using a background image

This commit is contained in:
dzello 2018-09-14 19:45:35 +02:00
parent 3cf15427c3
commit aaab2bc49b
3 changed files with 28 additions and 2 deletions

View file

@ -44,7 +44,7 @@ Add the shortcode above the slide's content, below the `---`.
---
{{< slide background="#FF4081" >}}
{{< slide background-color="#FF4081" >}}
## Custom slide 2
@ -53,7 +53,7 @@ Add the shortcode above the slide's content, below the `---`.
```markdown
---
{{</* slide background="#FF4081" */>}}
{{</* slide background-color="#FF4081" */>}}
## Custom slide 2
@ -62,6 +62,24 @@ Add the shortcode above the slide's content, below the `---`.
---
{{< slide background-image="/images/alex-litvin-790876-unsplash.jpg" >}}
## Custom slide 3
<small>This slide has a background image.</small>
```markdown
---
{{</* slide background-image="/images/alex-litvin-790876-unsplash.jpg" */>}}
---
```
<small>(credit <a href="https://unsplash.com/@alexlitvin">Alex Litvin</a>)</small>
---
{{< slide id="custom-slide" >}}
💡 Tip: Setting a slide's `id` attribute makes it easy to link to from other parts of the presentation.

View file

@ -28,4 +28,12 @@
.reveal section.side-by-side h1:nth-of-type(2) {
right: 25%;
}
.reveal section[data-background-image] a,
.reveal section[data-background-image] p,
.reveal section[data-background-image] h2 {
color: white;
}
.reveal section[data-background-image] a {
text-decoration: underline;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB