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