From ccd624460d0333d5b02e22dc07b9f80ecd861e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 24 Oct 2018 05:25:30 -0400 Subject: [PATCH] Set 'is-color' variants based on in-content selection --- agaric/templates/paragraph/paragraph--title.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agaric/templates/paragraph/paragraph--title.html.twig b/agaric/templates/paragraph/paragraph--title.html.twig index 0cf74c6..955f75b 100644 --- a/agaric/templates/paragraph/paragraph--title.html.twig +++ b/agaric/templates/paragraph/paragraph--title.html.twig @@ -42,13 +42,15 @@ set classes = [ 'hero', 'hero-project', - 'is-cinnamon', 'paragraph', 'paragraph--type--' ~ paragraph.bundle|clean_class, view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, not paragraph.isPublished() ? 'paragraph--unpublished' ] %} +{% if content.field_style_color %} + {% set classes = classes|merge(['is-'~content.field_style_color|render|trim]) %} +{% endif %} {% block paragraph %} {% block content %}