Skip to content

Commit 16f9e95

Browse files
committed
update slide bg example presentation to include iframes and videos hakimel#1029
1 parent fa88707 commit 16f9e95

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

js/reveal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@
26142614
// Iframes
26152615
else if ( backgroundIframe ) {
26162616
var iframe = document.createElement( 'iframe' );
2617-
iframe.setAttribute('src', backgroundIframe);
2617+
iframe.setAttribute( 'src', backgroundIframe );
26182618
iframe.style.width = '100%';
26192619
iframe.style.height = '100%';
26202620
iframe.style.maxHeight = '100%';

test/examples/slide-backgrounds.html

+12-4
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,20 @@ <h2>Background applied to slide inside of stack</h2>
6464
</section>
6565
</section>
6666

67-
<section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)">
67+
<section data-background-transition="slide" data-background="assets/image1.png">
6868
<h2>Background image</h2>
6969
</section>
7070

7171
<section>
72-
<section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)">
72+
<section data-background-transition="slide" data-background="assets/image1.png">
7373
<h2>Background image</h2>
7474
</section>
75-
<section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)">
75+
<section data-background-transition="slide" data-background="assets/image1.png">
7676
<h2>Background image</h2>
7777
</section>
7878
</section>
7979

80-
<section data-background="assets/image2.png" data-background-size="100px" data-background-repeat="repeat" data-background-color="#111" style="background: rgba(0,0,0,0.9)">
80+
<section data-background="assets/image2.png" data-background-size="100px" data-background-repeat="repeat" data-background-color="#111">
8181
<h2>Background image</h2>
8282
<pre>data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"</pre>
8383
</section>
@@ -89,6 +89,14 @@ <h2>Same background twice (1/2)</h2>
8989
<h2>Same background twice (2/2)</h2>
9090
</section>
9191

92+
<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm">
93+
<h2>Video background</h2>
94+
</section>
95+
96+
<section data-background-iframe="https://slides.com">
97+
<h2>Iframe background</h2>
98+
</section>
99+
92100
<section>
93101
<section data-background="#417203">
94102
<h2>Same background twice vertical (1/2)</h2>

0 commit comments

Comments
 (0)