Use break-out-of-flow boolean to decide if we have section wrappers
And drop all the closing out of / reopening flow craziness.
This commit is contained in:
parent
7b98a21d81
commit
1678d1fac1
1 changed files with 4 additions and 10 deletions
|
@ -45,16 +45,14 @@
|
||||||
]
|
]
|
||||||
%}
|
%}
|
||||||
{% if paragraph.field_style_classes is not empty %}
|
{% if paragraph.field_style_classes is not empty %}
|
||||||
{# Close out flow, container, and section so we can bleed to the edges. #}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% set styles=[] %}
|
{% set styles=[] %}
|
||||||
{% for style in paragraph.field_style_classes %}
|
{% for style in paragraph.field_style_classes %}
|
||||||
{% set styles = styles|merge([style.value]) %}
|
{% set styles = styles|merge([style.value]) %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% set section_classes = [ 'hero', 'section-restitch' ] %}
|
{% set section_classes = [ 'hero' ] %}
|
||||||
{% set section_classes = section_classes|merge(styles) %}
|
{% set section_classes = section_classes|merge(styles) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if paragraph.field_style_escape_flow is not empty and paragraph.field_style_escape_flow.value == true %}
|
||||||
{% set section_attributes = create_attribute().addClass(section_classes).setAttribute('data-headerbg', 'light') %}
|
{% set section_attributes = create_attribute().addClass(section_classes).setAttribute('data-headerbg', 'light') %}
|
||||||
<section {{ section_attributes }}>
|
<section {{ section_attributes }}>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -71,10 +69,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock paragraph %}
|
{% endblock paragraph %}
|
||||||
{% if paragraph.field_style_classes is not empty %}
|
{% if paragraph.field_style_escape_flow is not empty and paragraph.field_style_escape_flow.value == true %}
|
||||||
</section>
|
</section>
|
||||||
{# Re-open flow, container, and section after we bled to the edges. #}
|
|
||||||
<section class="section" data-headerbg="light">
|
|
||||||
<div class="container">
|
|
||||||
<div class="flow content">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue