@openeuropa/bcl-heading 1.10.8 → 1.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/heading.html.twig +13 -17
- package/package.json +3 -3
package/heading.html.twig
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- title (string) (default: '')
|
|
5
3
|
- title_tag (string) (default: 'h2')
|
|
@@ -7,34 +5,32 @@
|
|
|
7
5
|
- attributes (drupal attrs)
|
|
8
6
|
#}
|
|
9
7
|
|
|
10
|
-
{
|
|
8
|
+
{%- set _title = title|default('') %}
|
|
11
9
|
{% set _title_tag = title_tag|default('h2') %}
|
|
12
10
|
{% set _title_link = title_link|default({}) %}
|
|
13
11
|
|
|
14
|
-
{
|
|
15
|
-
{
|
|
16
|
-
{%
|
|
12
|
+
{%- if attributes is empty %}
|
|
13
|
+
{%- set attributes = create_attribute() %}
|
|
14
|
+
{% endif %}
|
|
17
15
|
|
|
18
|
-
{
|
|
19
|
-
{
|
|
16
|
+
{%- if attributes.class is empty %}
|
|
17
|
+
{%- set attributes = attributes.addClass(['mb-4']) %}
|
|
20
18
|
{% endif %}
|
|
21
19
|
|
|
22
|
-
{
|
|
20
|
+
{%- set attributes = attributes.addClass(['bcl-heading']) %}
|
|
23
21
|
|
|
24
|
-
{
|
|
25
|
-
{
|
|
22
|
+
{%- if _title_link is not empty and _title is not empty and _title_link.label is empty %}
|
|
23
|
+
{%- set _title_link = _title_link|merge({ label: _title }) %}
|
|
26
24
|
{% endif %}
|
|
27
25
|
|
|
28
|
-
{
|
|
29
|
-
<{{ _title_tag }}
|
|
26
|
+
{%- if _title is not empty or _title_link is not empty -%}
|
|
27
|
+
<{{ _title_tag }}
|
|
30
28
|
{{- attributes -}}
|
|
31
29
|
>
|
|
32
30
|
{%- if _title_link is not empty -%}
|
|
33
31
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _title_link|merge({ standalone: true }) only %}
|
|
34
32
|
{%- else -%}
|
|
35
33
|
{{- _title -}}
|
|
36
|
-
{%- endif
|
|
34
|
+
{%- endif -%}
|
|
37
35
|
</{{ _title_tag }}>
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
{% endapply %}
|
|
36
|
+
{%- endif -%}
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-heading",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.10",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@openeuropa/bcl-link": "^1.10.
|
|
10
|
+
"@openeuropa/bcl-link": "^1.10.10"
|
|
11
11
|
},
|
|
12
12
|
"description": "OE - BCL heading",
|
|
13
13
|
"repository": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"design-system",
|
|
25
25
|
"twig"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "9f7c4a046e8f8f325e4de7e998f1c2a654f6eed1"
|
|
28
28
|
}
|