Skip to content

Commit

Permalink
Hides title on cards if no icon or title
Browse files Browse the repository at this point in the history
Thanks @kmurphychi40 !
  • Loading branch information
thejimbirch authored Feb 21, 2018
2 parents d1fe782 + a298d5c commit 1232f61
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions templates/paragraph--bp-card.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,17 @@ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
<div{{ attributes.addClass(classes) }}>
<div class="paragraph__column">
<div class="card card-default panel panel-default">
<div class="card-header panel-heading">
{% if layout_icon_classes %}
<span class="{{ layout_icon_classes|join(' ') }}"></span>
{% endif %}
{{ title_suffix }}
<div class="card-title panel-title">
{{ content.bp_card_title }}
{% if layout_icon_classes or content.bp_card_title|render|trim is not empty %}
<div class="card-header panel-heading">
{% if layout_icon_classes %}
<span class="{{ layout_icon_classes|join(' ') }}"></span>
{% endif %}
{{ title_suffix }}
<div class="card-title panel-title">
{{ content.bp_card_title }}
</div>
</div>
</div>
{% endif %}
<div class="card-block panel-body">
{{ content|without('bp_width', 'bp_background', 'bp_accent_color', 'bp_icon', 'bp_card_title') }}
</div>
Expand Down

0 comments on commit 1232f61

Please sign in to comment.