Skip to content

Commit

Permalink
update markup for media group component to accommodate different imag…
Browse files Browse the repository at this point in the history
…e sizes
  • Loading branch information
poojagunturu96 committed Nov 15, 2024
1 parent 04af85a commit 6fac1f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/data/image_styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ image_styles:
- 400x225
- 640x360

media_group:
title: Media Group component
ratio: 'any'
srcset:
- 400x225

event_teaser:
title: Event teaser
ratio: 'any'
Expand Down
4 changes: 2 additions & 2 deletions src/templates/paragraphs/media-group.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

<div class="row">
{% for item in media_content_items %}
<div class="col-md-6 mb-7">
<div class="col-md-6 mb-7 d-flex{{loop.index % 2 == 0 ? '' : ' justify-content-md-end'}} align-items-start">
{% if item == 'video' %}
{% include 'partials/video.twig' %}
{% elseif item == 'audio' %}
{% include 'paragraphs/audio.twig' %}
{% elseif item == 'image' %}
{% include 'partials/image-with-caption.twig' with {
name: 'schedule'
name: 'media_group'
} %}
{% endif %}
</div>
Expand Down

0 comments on commit 6fac1f1

Please sign in to comment.