simplifying-training.html.twig in Simplifying 8
{%
set src = {
'uk': 'https://www.youtube.com/embed/jlOIdjX0KnQ',
'ru': 'https://www.youtube.com/embed/bvyZ8-vElD4',
'en': 'https://www.youtube.com/embed/xZ8pHbxwCGQ',
}
%}
<div class="video-wrapper" style="max-width: 1170px; margin: 0 auto; outline: 1px solid #ccc;">
<div class="video-container" style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;">
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;" src="{% if src[ data.langcode ] %}{{ src[ data.langcode ] }}{% else %}{{ src.en }}{% endif %}" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
File
templates/simplifying-training.html.twig
View source
- {%
- set src = {
- 'uk': 'https://www.youtube.com/embed/jlOIdjX0KnQ',
- 'ru': 'https://www.youtube.com/embed/bvyZ8-vElD4',
- 'en': 'https://www.youtube.com/embed/xZ8pHbxwCGQ',
- }
- %}
- <div class="video-wrapper" style="max-width: 1170px; margin: 0 auto; outline: 1px solid #ccc;">
- <div class="video-container" style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;">
- <iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;" src="{% if src[ data.langcode ] %}{{ src[ data.langcode ] }}{% else %}{{ src.en }}{% endif %}" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
- </div>
- </div>