From ba8d9ec176efc757083be8b6902fd403b5549b6b Mon Sep 17 00:00:00 2001 From: Kerry Murphy Date: Tue, 20 Feb 2018 17:32:16 -0600 Subject: [PATCH 1/2] hides title on cards if no icon or title --- templates/paragraph--bp-card.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/paragraph--bp-card.html.twig b/templates/paragraph--bp-card.html.twig index f5beccd..45745a7 100644 --- a/templates/paragraph--bp-card.html.twig +++ b/templates/paragraph--bp-card.html.twig @@ -440,6 +440,7 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
+ {% if layout_icon_classes or content.bp_card_title|render|trim is not empty %}
{% if layout_icon_classes %} @@ -449,6 +450,7 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, {{ content.bp_card_title }}
+ {% endif %}
{{ content|without('bp_width', 'bp_background', 'bp_accent_color', 'bp_icon', 'bp_card_title') }}
From a298d5c3bd2376d631cd2596e3df03abd3414274 Mon Sep 17 00:00:00 2001 From: Jim Birch <5177009+thejimbirch@users.noreply.github.com> Date: Tue, 20 Feb 2018 18:51:43 -0600 Subject: [PATCH 2/2] Fixes spacing. --- templates/paragraph--bp-card.html.twig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/paragraph--bp-card.html.twig b/templates/paragraph--bp-card.html.twig index 45745a7..65078de 100644 --- a/templates/paragraph--bp-card.html.twig +++ b/templates/paragraph--bp-card.html.twig @@ -441,15 +441,15 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
{% if layout_icon_classes or content.bp_card_title|render|trim is not empty %} -
- {% if layout_icon_classes %} - - {% endif %} - {{ title_suffix }} -
- {{ content.bp_card_title }} +
+ {% if layout_icon_classes %} + + {% endif %} + {{ title_suffix }} +
+ {{ content.bp_card_title }} +
-
{% endif %}
{{ content|without('bp_width', 'bp_background', 'bp_accent_color', 'bp_icon', 'bp_card_title') }}