Do unholy thing to allow paragraphs to bust out of the content flow

This commit is contained in:
benjamin melançon 2018-11-19 02:39:04 -05:00
parent 2132c66e84
commit 3ad06421d4

View file

@ -40,14 +40,41 @@
#}
{%
set classes = [
'flow_middle',
paragraph.field_style_classes is empty ? 'flow_middle' : "hero-body",
not paragraph.isPublished() ? 'paragraph--unpublished'
]
%}
{% 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 classes = classes|merge([ 'hero', 'section-restitch' ]) %}
{% set classes = classes|merge(styles) %}
{% set attributes = attributes.removeClass('section').addClass(classes).setAttribute('data-headerbg', 'light') %}
<section attributes>
{% endif %}
{% block paragraph %}
<div{{ attributes.addClass(classes) }}>
{% if paragraph.field_style_classes is not empty %}
<div class="container content">
{% endif %}
{% block content %}
{{ content }}
{% endblock %}
{% if paragraph.field_style_classes is not empty %}
</div>
{% endif %}
</div>
{% endblock paragraph %}
{% if paragraph.field_style_classes is not empty %}
</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 %}