Skip to content

Commit

Permalink
Update container and width machine names in templates (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorwillskanopi authored Apr 2, 2024
1 parent c4db6cf commit a111944
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions templates/overrides/paragaphs/paragraph--sa-columns.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
%}

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

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

{% set margin_class_string = '' %}
Expand Down Expand Up @@ -105,9 +105,9 @@
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
<div class="{{ container_class_string }}{{ bg_class_string }}{{ margin_class_string }}{{ padding_class_string }}">
{% if paragraph.sa_col.value is not empty %}
{% if paragraph.sa_width.value is not empty %}
<div class="row justify-content-center">
<div class="{{ col_class_string }}">
<div class="{{ width_class_string }}">
{% endif %}
{% block content %}
{{ content|without('sa_column_items') }}
Expand All @@ -119,7 +119,7 @@
{% endfor %}
</div>
{% endblock %}
{% if paragraph.sa_col.value is not empty %}
{% if paragraph.sa_width.value is not empty %}
</div>
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
{% endif %}

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

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

{% set margin_class_string = '' %}
Expand All @@ -84,8 +84,8 @@
<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 }}">
{% if width_class_string is not empty %}
<div class="{{ width_class_string }}">
<div class="row justify-content-center{{ textleft }}">
{% endif %}
<div class="align-self-center col-md-6">
Expand All @@ -101,7 +101,7 @@
{{ content.sa_description }}
{% endif %}
</div>
{% if col_class_string is not empty %}
{% if width_class_string is not empty %}
</div>
</div>
{% endif %}
Expand Down
16 changes: 8 additions & 8 deletions templates/overrides/paragaphs/paragraph.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
%}

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

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

{% set margin_class_string = '' %}
Expand All @@ -75,14 +75,14 @@
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
<div class="{{ container_class_string }}{{ bg_class_string }}{{ margin_class_string }}{{ padding_class_string }}">
{% if paragraph.sa_col.value is not empty %}
{% if paragraph.sa_width.value is not empty %}
<div class="row justify-content-center">
<div class="{{ col_class_string }}">
<div class="{{ width_class_string }}">
{% endif %}
{% block content %}
{{ content }}
{% endblock %}
{% if paragraph.sa_col.value is not empty %}
{% if paragraph.sa_width.value is not empty %}
</div>
</div>
{% endif %}
Expand Down

0 comments on commit a111944

Please sign in to comment.