-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BlockVideoOembed): add multiple size options
* feat(BlockVideoOembed): add size options * feat(BlockVideoOembed): add smaller play button on small size * feat(BlockVideoOembed): update readme * refactor(BlockVideoOembed): translatable labels, remove width from wrapper, add png to mime types
- Loading branch information
1 parent
4e84112
commit a26a933
Showing
7 changed files
with
76 additions
and
8 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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
@import 'videoLoader'; | ||
|
||
.video { | ||
margin: 0 auto; | ||
position: relative; | ||
|
||
&-player { | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Block Video oEmbed | ||
|
||
Instead of embedding a video player directly, this component shows a poster image with an overlaying play button at first only. When clicked, the iframe based embed player is loaded autoplays the video, if the browser supports autoplay. | ||
Instead of embedding a video player directly, this component shows a poster image with an overlaying play button at first only. When clicked, the iframe based embed player is loaded autoplays the video, if the browser supports autoplay. Multiple size options available. |
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 |
---|---|---|
@@ -1,3 +1,27 @@ | ||
[is='flynt-block-video-oembed'] { | ||
@import 'Partials/video'; | ||
|
||
&.flyntComponent--sizeSmall { | ||
.video { | ||
max-width: 375px; | ||
} | ||
} | ||
|
||
&.flyntComponent--sizeMedium { | ||
.video { | ||
max-width: $content-max-width; | ||
} | ||
} | ||
|
||
&.flyntComponent--sizeLarge { | ||
.video { | ||
max-width: 800px; | ||
} | ||
} | ||
|
||
&.flyntComponent--sizeFull { | ||
.figure-caption { | ||
margin-left: 0.625rem; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="flyntComponent componentSpacing {{ options.theme }}" is="flynt-block-video-oembed"> | ||
<div class="container centerMaxWidthContainer"> | ||
<div class="flyntComponent flyntComponent--{{ options.size }} componentSpacing {{ options.theme }}" is="flynt-block-video-oembed"> | ||
<div class="container{% if options.size != 'sizeFull' %} centerMaxWidthContainer{% endif %}"> | ||
{% include 'Partials/_video.twig' ignore missing with {video: video, image: posterImage} only %} | ||
</div> | ||
</div> |