forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add page hero video for vimeo/youtube using embedresponsively.com code (
- Loading branch information
Showing
10 changed files
with
146 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "Layout: Header Video" | ||
header: | ||
video: | ||
id: XsxDH4HcOWA | ||
provider: youtube | ||
categories: | ||
- Layout | ||
- Uncategorized | ||
tags: | ||
- video | ||
- layout | ||
--- | ||
|
||
This post should display a **header with a reponsive video**, if the theme supports it. | ||
|
||
## Settings | ||
|
||
|--- | ||
| Parameter | Required | Description | | ||
|-|- | ||
| `id` | **Required** | ID of the video | ||
| `provider` | **Required** | Hosting provider of the video, either 'youtube' or 'vimeo' | ||
|--- | ||
|
||
## YouTube | ||
|
||
Here is a YouTube example for the video at url `https://www.youtube.com/watch?v=XsxDH4HcOWA` (long version) or `https://youtu.be/XsxDH4HcOWA` (short version): | ||
|
||
```yaml | ||
header: | ||
video: | ||
id: XsxDH4HcOWA | ||
provider: youtube | ||
``` | ||
{% include responsive_video id="XsxDH4HcOWA" provider="youtube" %} | ||
## Vimeo | ||
Here is a Vimeo example for the video at url `https://vimeo.com/97649261`: | ||
|
||
```yaml | ||
header: | ||
video: | ||
id: 97649261 | ||
provider: vimeo | ||
``` | ||
|
||
{% include responsive_video id="97649261" provider="vimeo" %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters