parent
da1966a111
commit
ceea053465
2 changed files with 51 additions and 43 deletions
@ -1,43 +1,43 @@ |
||||
<div class="section section_border"> |
||||
<div class="section__center center center_sm"> |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
</div> |
||||
<div class="iframe__container"> |
||||
{% if 'youtube.com' in content.url or 'youtu.be' in content.url %} |
||||
<iframe src="https://www.youtube.com/embed/{{ content.video_index }}" frameborder="0" allow="autoplay; encrypted-media" |
||||
allowfullscreen></iframe> |
||||
{% elif 'vimeo.com' in content.url %} |
||||
<iframe src="https://player.vimeo.com/video/{{ content.video_index }}" frameborder="0" webkitallowfullscreen |
||||
mozallowfullscreen allowfullscreen> |
||||
</iframe> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<style> |
||||
@media only screen and (max-width: 639px) { |
||||
iframe { |
||||
width: 100%; |
||||
height: 240px; |
||||
} |
||||
|
||||
.iframe__container { |
||||
text-align: center; |
||||
width: 100%; |
||||
padding-bottom: 56.25%; |
||||
margin-bottom: -56.25%; |
||||
} |
||||
} |
||||
|
||||
@media only screen and (min-width: 640px) { |
||||
.iframe__container { |
||||
text-align: center; |
||||
} |
||||
iframe { |
||||
width: 640px; |
||||
height: 360px; |
||||
} |
||||
} |
||||
</style> |
||||
<div class="section section_border"> |
||||
<div class="section__center center center_sm"> |
||||
<div class="content-block title"> |
||||
{{ content.title }} |
||||
</div> |
||||
<div class="content-block__video iframe__container"> |
||||
{% if 'youtube.com' in content.url or 'youtu.be' in content.url %} |
||||
<iframe src="https://www.youtube.com/embed/{{ content.video_index }}" frameborder="0" allow="autoplay; encrypted-media" |
||||
allowfullscreen></iframe> |
||||
{% elif 'vimeo.com' in content.url %} |
||||
<iframe src="https://player.vimeo.com/video/{{ content.video_index }}" frameborder="0" webkitallowfullscreen |
||||
mozallowfullscreen allowfullscree> |
||||
</iframe> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<style> |
||||
@media only screen and (max-width: 639px) { |
||||
iframe { |
||||
width: 100%; |
||||
height: 240px; |
||||
} |
||||
|
||||
.iframe__container { |
||||
text-align: center; |
||||
width: 100%; |
||||
padding-bottom: 56.25%; |
||||
margin-bottom: -56.25%; |
||||
} |
||||
} |
||||
|
||||
@media only screen and (min-width: 640px) { |
||||
.iframe__container { |
||||
text-align: center; |
||||
} |
||||
iframe { |
||||
width: 640px; |
||||
height: 360px; |
||||
} |
||||
} |
||||
</style> |
||||
|
||||
Loading…
Reference in new issue