From 1678d1fac14f643b377f68e6849120b72e4e13d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 19 Nov 2018 22:06:11 -0500 Subject: [PATCH] Use break-out-of-flow boolean to decide if we have section wrappers And drop all the closing out of / reopening flow craziness. --- agaric/templates/paragraph/paragraph.html.twig | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/agaric/templates/paragraph/paragraph.html.twig b/agaric/templates/paragraph/paragraph.html.twig index e969bfa..7713e3f 100644 --- a/agaric/templates/paragraph/paragraph.html.twig +++ b/agaric/templates/paragraph/paragraph.html.twig @@ -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. #} - - - {% 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') %}
{% endif %} @@ -71,10 +69,6 @@ {% endif %} {% 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 %}
- {# Re-open flow, container, and section after we bled to the edges. #} -
-
-
{% endif %}