diff --git a/_includes/page__hero_video.html b/_includes/page__hero_video.html new file mode 100644 index 000000000000..ebb11a5b54dc --- /dev/null +++ b/_includes/page__hero_video.html @@ -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 %} diff --git a/_includes/responsive_video b/_includes/responsive_video new file mode 100644 index 000000000000..f7361079f7dc --- /dev/null +++ b/_includes/responsive_video @@ -0,0 +1,11 @@ +{% capture video_id %}{{ include.id }}{% endcapture %} +{% capture video_provider %}{{ include.provider }}{% endcapture %} + + +
+{% if video_provider == "vimeo" %} + +{% elsif video_provider == "youtube" %} + +{% endif %} +
diff --git a/_layouts/single.html b/_layouts/single.html index 9035528590b6..599135026fb9 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -4,6 +4,8 @@ {% if page.header.overlay_color or page.header.overlay_image or page.header.image %} {% include page__hero.html %} +{% elsif page.header.video.id and page.header.video.provider %} + {% include page__hero_video.html %} {% endif %} {% if page.url != "/" and site.breadcrumbs %} @@ -71,4 +73,4 @@