Skip to content

Commit 31fa8aa

Browse files
committed
add a video-container wrapper div around the iframe
1 parent 20ed94c commit 31fa8aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/deck/slide.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def <<(s)
9999
if s.strip =~ /^\s*<?!VIDEO +([^\s>]*)>?$/
100100
youtube_id = $1
101101
# see https://developers.google.com/youtube/player_parameters
102-
s = %Q(<iframe class="video youtube" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/%3Cspan%20class="pl-s1">#{youtube_id}" frameborder="0"></iframe>\n)
102+
s = %Q(<div class="video-container"><iframe class="video youtube" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/%3Cspan%20class="pl-s1">#{youtube_id}" frameborder="0" allowfullscreen></iframe></div>\n)
103103
end
104104
@markdown_text << s
105105
@markdown_text << "\n"

spec/slide_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def slide_from markdown_text
376376
<section class="slide markdown-body" id="foo">
377377
<h2 class="slide-title">foo</h2>
378378
379-
<iframe class="video youtube" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/xyzzy" frameborder="0"></iframe>
379+
<div class="video-container">
380+
<iframe class="video youtube" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/xyzzy" frameborder="0" allowfullscreen></iframe>
381+
</div>
380382
381383
<ul>
382384
<li>bar</li>

0 commit comments

Comments
 (0)