File tree Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Expand file tree Collapse file tree 4 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% comment %}
2
+ Include Vimeo videos inside your post like so:
3
+ {% include vimeo.html id="142316610" aspect="16x9" %}
4
+ Note, the aspect ratio is optional (defaults to 16x9).
5
+ {% endcomment %}
6
+
7
+ < div class ="embed-responsive aspect-ratio-{{ include.aspect | default: "16x9 " }}">
8
+ < iframe class ="embed-responsive-item " src ="https://player.vimeo.com/video/{{ include.id }} " width ="640 " height ="360 " frameborder ="0 " allow ="autoplay; fullscreen " allowfullscreen > </ iframe >
9
+ </ div >
Original file line number Diff line number Diff line change
1
+ {% comment %}
2
+ Include YouTube videos inside your post like so:
3
+ {% include youtube.html id="oHg5SJYRHA0" aspect="4x3" %}
4
+ Note, the aspect ratio is optional (defaults to 16x9).
5
+ {% endcomment %}
6
+
7
+ < div class ="embed-responsive aspect-ratio-{{ include.aspect | default: "16x9 " }}">
8
+ < iframe class ="embed-responsive-item " width ="560 " height ="315 " src ="https://www.youtube-nocookie.com/embed/{{ include.id }} " frameborder ="0 " allow ="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture " allowfullscreen > </ iframe >
9
+ </ div >
Original file line number Diff line number Diff line change
1
+ /// /////////////////
2
+ // Responsive Embeds
3
+ /// /////////////////
4
+
5
+ .embed-responsive {
6
+ position : relative ;
7
+ display : block ;
8
+ height : 0 ;
9
+ padding : 0 ;
10
+ overflow : hidden ;
11
+
12
+ .embed-responsive-item ,
13
+ iframe ,
14
+ embed ,
15
+ object ,
16
+ video {
17
+ position : absolute ;
18
+ top : 0 ;
19
+ left : 0 ;
20
+ bottom : 0 ;
21
+ height : 100% ;
22
+ width : 100% ;
23
+ border : 0 ;
24
+ }
25
+ }
26
+
27
+ // Aspect ratios
28
+ .aspect-ratio-1x1 {
29
+ padding-top : 100% ;
30
+ }
31
+
32
+ .aspect-ratio-16x9 {
33
+ padding-top : 56.25% ;
34
+ }
35
+
36
+ .aspect-ratio-4x3 {
37
+ padding-top : 75% ;
38
+ }
Original file line number Diff line number Diff line change 22
22
@import " utilities/spacing" ;
23
23
@import " utilities/images" ;
24
24
@import " utilities/position" ;
25
+ @import " utilities/embeds" ;
25
26
26
27
@import " component/button" ;
27
28
@import " component/navigation" ;
You can’t perform that action at this time.
0 commit comments