Skip to content

Commit 125a599

Browse files
committed
crosslink: don't add paragraphs if they have no content
1 parent ae3ecac commit 125a599

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

templates/components/styles/crosslink.html.twig

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
<h3 class="card__heading">
55
<a href="{{ crosslink['url'] }}" class="card__link">{{ crosslink['title'] }}</a>
66
</h3>
7-
<p>
8-
{% if crosslink['text'] is defined %}{{ crosslink['text']|raw }}{% endif %}
9-
</p>
10-
<p class="txt-pluto">
11-
{% if crosslink['category'] is defined %}{{ crosslink['category']|crosslink_type|trans({}, 'w3c_website_templates_bundle') }}{% endif %}
12-
</p>
7+
{% if crosslink['text'] is defined %}
8+
<p>
9+
{{ crosslink['text']|raw }}
10+
</p>
11+
{% endif %}
12+
{% if crosslink['category'] is defined %}
13+
<p class="txt-pluto">
14+
{{ crosslink['category']|crosslink_type|trans({}, 'w3c_website_templates_bundle') }}
15+
</p>
16+
{% endif %}
1317
</div>
1418
{% if crosslink['img'] is defined and crosslink['img'] %}
1519
<div class="l-frame l-frame--16-9 card__image">
@@ -28,4 +32,4 @@
2832
</div>
2933
{% endif %}
3034
</div>
31-
</li>
35+
</li>

0 commit comments

Comments
 (0)