@openeuropa/bcl-badge 0.20.0 → 0.23.0
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/badge.html.twig +13 -9
- package/package.json +2 -2
package/badge.html.twig
CHANGED
|
@@ -33,22 +33,25 @@
|
|
|
33
33
|
{% set _classes = _classes|merge([ 'bg-' ~ _background]) %}
|
|
34
34
|
{% endif %}
|
|
35
35
|
|
|
36
|
-
{% if _background in ['light', 'warning'] %}
|
|
37
|
-
{% set _classes = _classes|merge(['text-dark']) %}
|
|
38
|
-
{% endif %}
|
|
39
|
-
|
|
40
36
|
{% if attributes is empty %}
|
|
41
37
|
{% set attributes = create_attribute() %}
|
|
42
38
|
{% endif %}
|
|
43
39
|
|
|
40
|
+
{%- if _url is not empty -%}
|
|
41
|
+
{% set attributes = attributes.setAttribute('title', _title).setAttribute('href', _url) %}
|
|
42
|
+
{%- endif -%}
|
|
43
|
+
|
|
44
44
|
{% set attributes = attributes.addClass(_classes) %}
|
|
45
45
|
|
|
46
46
|
{%- if _url is not empty -%}
|
|
47
|
-
<a
|
|
47
|
+
<a
|
|
48
|
+
{{ attributes }}
|
|
49
|
+
>
|
|
50
|
+
{%- else -%}
|
|
51
|
+
<span
|
|
52
|
+
{{ attributes }}
|
|
53
|
+
>
|
|
48
54
|
{%- endif -%}
|
|
49
|
-
<span
|
|
50
|
-
{{ attributes }}
|
|
51
|
-
>
|
|
52
55
|
{%- if _assistive_text is not empty -%}
|
|
53
56
|
<span class="visually-hidden">
|
|
54
57
|
{{- _assistive_text -}}
|
|
@@ -63,9 +66,10 @@
|
|
|
63
66
|
} only %}
|
|
64
67
|
</span>
|
|
65
68
|
{%- endif -%}
|
|
66
|
-
</span>
|
|
67
69
|
{%- if _url is not empty -%}
|
|
68
70
|
</a>
|
|
71
|
+
{%- else -%}
|
|
72
|
+
</span>
|
|
69
73
|
{%- endif -%}
|
|
70
74
|
|
|
71
75
|
{% endspaceless %}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-badge",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.23.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"design-system",
|
|
22
22
|
"twig"
|
|
23
23
|
],
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "fa2097e14024989cddf6f9cd7a9115bed5886aeb"
|
|
25
25
|
}
|