Skip to content

Commit

Permalink
update styles for media group component
Browse files Browse the repository at this point in the history
  • Loading branch information
poojagunturu96 committed Nov 20, 2024
1 parent 7e1dfff commit f6ccf6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/templates/paragraphs/media-group.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@

<div class="row">
{% for item in media_content_items %}
<div class="col-md-6 mb-7 d-flex{{loop.index % 2 == 0 ? '' : ' justify-content-md-end'}} align-items-start">
<div class="col-md-6 mb-7 {{loop.index % 2 == 0 ? 'pl-lg-4' : 'pr-lg-4'}}">
{% 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: 'media_group'
name: 'media_group',
class: loop.index % 2 == 1 ? 'float-md-right' : ''
} %}
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/image-with-caption.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<figure class="media media--image media--contain-caption">
<figure class="media media--image media--contain-caption {{class}}">
<!-- {{name}} -->
{% include 'partials/img.twig' with {
name: name
Expand Down

0 comments on commit f6ccf6d

Please sign in to comment.