From 4921ad739a9175cfd0c71fd45681374667084c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 14 Nov 2018 15:03:42 -0500 Subject: [PATCH] Add additional title styles (hero-main, is-large) if editor chose --- agaric/templates/paragraph/paragraph--title.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/agaric/templates/paragraph/paragraph--title.html.twig b/agaric/templates/paragraph/paragraph--title.html.twig index f6fa82d..ab8a051 100644 --- a/agaric/templates/paragraph/paragraph--title.html.twig +++ b/agaric/templates/paragraph/paragraph--title.html.twig @@ -50,6 +50,13 @@ {% if paragraph.field_style_titlebar is empty %} {% set classes = classes|merge(['hero-project']) %} {% endif %} +{% if paragraph.field_style_classes is not empty %} + {% set styles=[] %} + {% for style in paragraph.field_style_classes %} + {% set styles = styles|merge([style.value]) %} + {% endfor %} + {% set classes = classes|merge(styles) %} +{% endif %} {% if paragraph.field_style_titlebar is not empty and paragraph.field_image is not empty %} {% set attributes = attributes.setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}