Skip to content

Commit 96fed6f

Browse files
committed
added video embedding
1 parent c0bcc09 commit 96fed6f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/components/topic.ls

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ module.exports = React.create-class({
1717
header null,
1818
h1 class-name: \title, title
1919
p class-name: \description, description
20-
# if video
21-
# Video url: video.url
20+
if video
21+
Video url: video.url
2222
if slides
2323
Slides url: slides
2424
footer null,

src/components/video-embed.ls

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
{ iframe } = DOM
1+
{ iframe, div } = DOM
22
module.exports = React.create-class({
33
render: ->
4-
iframe class-name: 'video-frame', src: @props.url, frame-border: 0, allow-full-screen: true
4+
div class-name: 'video-frame', 'data-aspect-ratio': '16:9',
5+
iframe class-name: 'video-frame', src: @props.url, frame-border: 0, allow-full-screen: true
56
})

src/sass/components/_topic.sass

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
margin-top: 1em
1313
width: 700px
1414
max-width: 100%
15+
16+
.video-frame
17+
margin-top: 1em
18+
width: 700px
19+
max-width: 100%
1520

1621
iframe
1722
overflow: hidden

0 commit comments

Comments
 (0)