fix(talks): aspect ratio on embedded videos

This commit is contained in:
Oliver Davies 2021-12-14 20:32:47 +00:00
parent 56a035ea4f
commit c898f4da4f

View file

@ -36,17 +36,14 @@
* @see template_preprocess_field()
*/
#}
{%
set title_classes = [
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
{% set title_classes = [ label_display == 'visually_hidden' ? 'visually-hidden' ] %}
{% set item_classes = ['aspect-w-16 aspect-h-9'] %}
{% if label_hidden %}
{% if multiple %}
<div{{ attributes }}>
{% for item in items %}
<div{{ item.attributes.addClass('video-full') }}>{{ item.content }}</div>
<div{{ item.attributes.addClass(item_classes) }}>{{ item.content }}</div>
{% endfor %}
</div>
{% else %}
@ -61,7 +58,7 @@
<div>
{% endif %}
{% for item in items %}
<div{{ item.attributes.addClass('video-full') }}>{{ item.content }}</div>
<div{{ item.attributes.addClass(item_classes) }}>{{ item.content }}</div>
{% endfor %}
{% if multiple %}
</div>