Skip to content

Commit bdf7ca3

Browse files
committed
allow using notes without a title
1 parent bc411d5 commit bdf7ca3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/components/styles/notes.html.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
{% if (notes|length > 0) %}
33
<div class="l-box note note--{{ type }}" role="{{ type == 'error' ? 'alert' : 'status' }}" aria-labelledby="{{ type }}-summary-title" tabindex="-1"
44
data-component="{{ type }}-summary" data-anchor="no">
5-
<h2 id="{{ type }}-summary-title" class="txt-saturn">{{ title }}</h2>
5+
{% if title != '' %}
6+
<h2 id="{{ type }}-summary-title" class="txt-saturn">{{ title }}</h2>
7+
{% endif %}
68
<ul class="clean-list" role="list">
79
{% for note in notes %}
810
<li>
@@ -33,7 +35,7 @@
3335
{% endmacro %}
3436

3537
{% macro warnings(messages, title = null) %}
36-
{% if title == null %}
38+
{% if title is same as null %}
3739
{% set title = 'notes.warnings.default_title'|trans({}, 'w3c_website_templates_bundle') %}
3840
{% endif %}
3941
{{ _self.notes('warning', title, messages) }}

0 commit comments

Comments
 (0)