Do unholy thing to allow paragraphs to bust out of the content flow
This commit is contained in:
parent
2132c66e84
commit
3ad06421d4
1 changed files with 28 additions and 1 deletions
|
@ -40,14 +40,41 @@
|
||||||
#}
|
#}
|
||||||
{%
|
{%
|
||||||
set classes = [
|
set classes = [
|
||||||
'flow_middle',
|
paragraph.field_style_classes is empty ? 'flow_middle' : "hero-body",
|
||||||
not paragraph.isPublished() ? 'paragraph--unpublished'
|
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 %}
|
{% block paragraph %}
|
||||||
<div{{ attributes.addClass(classes) }}>
|
<div{{ attributes.addClass(classes) }}>
|
||||||
|
{% if paragraph.field_style_classes is not empty %}
|
||||||
|
<div class="container content">
|
||||||
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% if paragraph.field_style_classes is not empty %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock paragraph %}
|
{% 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 %}
|
||||||
|
|
Loading…
Reference in a new issue