Add page hero video for vimeo/youtube using embedresponsively.com code (#788)
This commit is contained in:
4
_includes/page__hero_video.html
Normal file
4
_includes/page__hero_video.html
Normal file
@ -0,0 +1,4 @@
|
||||
{% capture video_id %}{{ page.header.video.id }}{% endcapture %}
|
||||
{% capture video_provider %}{{ page.header.video.provider }}{% endcapture %}
|
||||
|
||||
{% include responsive_video id=video_id provider=video_provider %}
|
11
_includes/responsive_video
Normal file
11
_includes/responsive_video
Normal file
@ -0,0 +1,11 @@
|
||||
{% capture video_id %}{{ include.id }}{% endcapture %}
|
||||
{% capture video_provider %}{{ include.provider }}{% endcapture %}
|
||||
|
||||
<!-- Courtesy of embedresponsively.com //-->
|
||||
<div class="responsive-video-container">
|
||||
{% if video_provider == "vimeo" %}
|
||||
<iframe src="http://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
||||
{% elsif video_provider == "youtube" %}
|
||||
<iframe src="https://www.youtube.com/embed/{{ video_id }}" frameborder="0" allowfullscreen></iframe>
|
||||
{% endif %}
|
||||
</div>
|
Reference in New Issue
Block a user