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 %}
|
||||
{# Close out flow, container, and section so we can bleed to the edges. #}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% set styles=[] %}
|
||||
{% for style in paragraph.field_style_classes %}
|
||||
{% set styles = styles|merge([style.value]) %}
|
||||
{% endfor %}
|
||||
{% set section_classes = [ 'hero', 'section-restitch' ] %}
|
||||
{% set section_classes = [ 'hero' ] %}
|
||||
{% 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') %}
|
||||
<section {{ section_attributes }}>
|
||||
{% endif %}
|
||||
|
@ -71,10 +69,6 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% 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>
|
||||
{# 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 %}
|
||||
|
|
Loading…
Reference in a new issue