Skip to content

Commit

Permalink
updates side by side template (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: “Kerry <“[email protected]”>
  • Loading branch information
kmurphychi247 and “Kerry authored Feb 22, 2024
1 parent e58b185 commit e297b56
Showing 1 changed file with 34 additions and 26 deletions.
60 changes: 34 additions & 26 deletions templates/overrides/paragaphs/paragraph--sa-side-by-side.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,57 +48,65 @@
%}
{% set sa_reverse_order = 0 %}
{% if content.sa_reverse_order['#items'].value == 1 %}
{% set sa_reverse_order = true %}
{% set sa_reverse_order = true %}
{% endif %}

{% set textleft = '' %}
{% if sa_reverse_order %}
{% set textleft = ' flex-row-reverse' %}
{% set textleft = 'flex-row-reverse' %}
{% endif %}

{% set container_class_string = '' %}
{% if paragraph.sa_width.value is not empty %}
{% set container_class_string = ' ' ~ paragraph.sa_width.value %}
{% set container_class_string = paragraph.sa_width.value %}
{% endif %}

{% set col_class_string = '' %}
{% if paragraph.sa_col.value is not empty %}
{% set col_class_string = ' ' ~ paragraph.sa_col.value %}
{% set col_class_string = paragraph.sa_col.value %}
{% endif %}

{% set margin_class_string = '' %}
{% if paragraph.sa_margin.value is not empty %}
{% set margin_class_string = ' ' ~ paragraph.sa_margin.value %}
{% set margin_class_string = paragraph.sa_margin.value %}
{% endif %}

{% set padding_class_string = '' %}
{% if paragraph.sa_padding.value is not empty %}
{% set padding_class_string = ' ' ~ paragraph.sa_padding.value %}
{% set padding_class_string = paragraph.sa_padding.value %}
{% endif %}

{% set bg_class_string = '' %}
{% if paragraph.sa_background.value is not empty %}
{% set bg_class_string = ' ' ~ paragraph.sa_background.value %}
{% set bg_class_string = paragraph.sa_background.value %}
{% endif %}

{% block paragraph %}
<div{{attributes.addClass(classes)}}>
<div class="{{ container_class_string }}{{ bg_class_string }}{{ margin_class_string }}{{ padding_class_string }}">
<div class="row justify-content-center{{ textleft }}">
<div class="align-self-center col-md-6">
{% if content.sa_media is not empty %}
{{ content.sa_media }}
{% endif %}
</div>
<div class="align-self-center col-md-6">
{% if content.sa_header is not empty %}
{{ content.sa_header }}
{% endif %}
{% if content.sa_description is not empty %}
{{ content.sa_description }}
{% endif %}
</div>
</div>
</div>
</div>
<div{{attributes.addClass(classes)}}>
<div class="{{ container_class_string }} {{ bg_class_string }} {{ margin_class_string }} {{ padding_class_string }}">
<div class="row justify-content-center {{ textleft }}">
{% if col_class_string is not empty %}
<div class="{{ col_class_string }}">
<div class="row">
{% endif %}
<div class="align-self-center col-md-6">
{% if content.sa_media is not empty %}
{{ content.sa_media }}
{% endif %}
</div>
<div class="align-self-center col-md-6">
{% if content.sa_header is not empty %}
{{ content.sa_header }}
{% endif %}
{% if content.sa_description is not empty %}
{{ content.sa_description }}
{% endif %}
</div>
{% if col_class_string is not empty %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock paragraph %}

0 comments on commit e297b56

Please sign in to comment.