@openeuropa/bcl-file 0.19.0 → 0.22.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/file.html.twig +11 -8
- package/package.json +5 -4
package/file.html.twig
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Parameters:
|
|
5
5
|
- title (string) (default: '')
|
|
6
6
|
- title_tag (string) (default: 'h2')
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
7
8
|
- item_title (string) (default: '')
|
|
8
9
|
- icon (icon Object) (default: {})
|
|
9
10
|
- text (string) (default: '')
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
{% set _icon = icon|default({}) %}
|
|
38
39
|
{% set _title = title|default('') %}
|
|
39
40
|
{% set _title_tag = title_tag|default('h2') %}
|
|
41
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
40
42
|
{% set _item_title = item_title|default('') %}
|
|
41
43
|
{% set _text = text|default('') %}
|
|
42
44
|
{% set _content = content|default('') %}
|
|
@@ -62,10 +64,11 @@
|
|
|
62
64
|
{% endif %}
|
|
63
65
|
|
|
64
66
|
{% if _title is not empty %}
|
|
65
|
-
{%
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
68
|
+
title: _title,
|
|
69
|
+
title_tag: _title_tag,
|
|
70
|
+
attributes: _title_attributes,
|
|
71
|
+
} only %}
|
|
69
72
|
{% endif %}
|
|
70
73
|
|
|
71
74
|
{% if _variant == 'card' %}
|
|
@@ -135,7 +138,7 @@
|
|
|
135
138
|
},
|
|
136
139
|
attributes: create_attribute()
|
|
137
140
|
.setAttribute('download', _download.url)
|
|
138
|
-
.addClass(['
|
|
141
|
+
.addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0'])
|
|
139
142
|
}) %}
|
|
140
143
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
|
|
141
144
|
</div>
|
|
@@ -148,7 +151,7 @@
|
|
|
148
151
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _translation.label|merge({
|
|
149
152
|
path: '#' ~ _id,
|
|
150
153
|
attributes: create_attribute()
|
|
151
|
-
.addClass(['
|
|
154
|
+
.addClass(['standalone'])
|
|
152
155
|
.setAttribute('aria-controls', _id)
|
|
153
156
|
.setAttribute('data-bs-toggle', 'collapse')
|
|
154
157
|
.setAttribute('aria-expanded', 'false')
|
|
@@ -168,7 +171,7 @@
|
|
|
168
171
|
{% if _item.title is not empty %}
|
|
169
172
|
<p class="fw-bold m-0">{{ _item.title }}</p>
|
|
170
173
|
{% endif %}
|
|
171
|
-
{% if _item.
|
|
174
|
+
{% if _item.description is not empty %}
|
|
172
175
|
<p class="m-0">{{ _item.description }}</p>
|
|
173
176
|
{% endif %}
|
|
174
177
|
{% if _item.language is not empty or _item.meta is not empty %}
|
|
@@ -194,7 +197,7 @@
|
|
|
194
197
|
},
|
|
195
198
|
attributes: create_attribute()
|
|
196
199
|
.setAttribute("download", _item.download.url)
|
|
197
|
-
.addClass(['d-block', '
|
|
200
|
+
.addClass(['d-block', 'standalone', 'mt-1'])
|
|
198
201
|
}) only %}
|
|
199
202
|
</div>
|
|
200
203
|
</div>
|
package/package.json
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-file",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.22.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL file",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-
|
|
12
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-heading": "^0.22.0",
|
|
12
|
+
"@openeuropa/bcl-icon": "^0.22.0",
|
|
13
|
+
"@openeuropa/bcl-link": "^0.22.0"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -25,5 +26,5 @@
|
|
|
25
26
|
"design-system",
|
|
26
27
|
"twig"
|
|
27
28
|
],
|
|
28
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
|
|
29
30
|
}
|