diff --git a/agaric/templates/paragraph/paragraph.html.twig b/agaric/templates/paragraph/paragraph.html.twig index 8dda269..1ea4f0c 100644 --- a/agaric/templates/paragraph/paragraph.html.twig +++ b/agaric/templates/paragraph/paragraph.html.twig @@ -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. #} + + + + {% 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') %} +
+{% endif %} {% block paragraph %} + {% if paragraph.field_style_classes is not empty %} +
+ {% endif %} {% block content %} {{ content }} {% endblock %} + {% if paragraph.field_style_classes is not empty %} +
+ {% endif %} {% endblock paragraph %} +{% if paragraph.field_style_classes is not empty %} +
+ {# Re-open flow, container, and section after we bled to the edges. #} +
+
+
+{% endif %}