@openeuropa/bcl-file 1.2.2 → 1.4.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-translations.html.twig +10 -7
- package/file.html.twig +6 -5
- package/package.json +5 -5
|
@@ -69,18 +69,21 @@
|
|
|
69
69
|
{% endif %}
|
|
70
70
|
</div>
|
|
71
71
|
<div class="col-12 col-md-3 align-self-end text-md-end">
|
|
72
|
-
{%
|
|
72
|
+
{% set download_attributes = create_attribute()
|
|
73
|
+
.setAttribute('download', true)
|
|
74
|
+
.setAttribute('target', '_blank')
|
|
75
|
+
.addClass(['d-block', 'standalone', 'mt-1'])
|
|
76
|
+
%}
|
|
77
|
+
{% set _download_item = _item.download|merge({
|
|
73
78
|
icon_position: "after",
|
|
74
79
|
icon: {
|
|
75
80
|
name: "download",
|
|
76
81
|
size: "fluid",
|
|
77
82
|
path: _icon_path,
|
|
78
|
-
},
|
|
79
|
-
attributes: create_attribute()
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
.addClass(['d-block', 'standalone', 'mt-1'])
|
|
83
|
-
}) only %}
|
|
83
|
+
}|merge(_item.download.icon|default({})),
|
|
84
|
+
attributes: download_attributes.merge(_item.download.attributes|default(create_attribute()))
|
|
85
|
+
}) %}
|
|
86
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _download_item only %}
|
|
84
87
|
</div>
|
|
85
88
|
</div>
|
|
86
89
|
{% endif %}
|
package/file.html.twig
CHANGED
|
@@ -138,17 +138,18 @@
|
|
|
138
138
|
</small>
|
|
139
139
|
{% endif %}
|
|
140
140
|
</div>
|
|
141
|
+
{% set download_attributes = create_attribute()
|
|
142
|
+
.setAttribute('download', 'true')
|
|
143
|
+
.setAttribute('target', '_blank')
|
|
144
|
+
.addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0']) %}
|
|
141
145
|
{% set _download = _download|merge({
|
|
142
146
|
icon_position: "after",
|
|
143
147
|
icon: {
|
|
144
148
|
name: "download",
|
|
145
149
|
size: "fluid",
|
|
146
150
|
path: _icon_path,
|
|
147
|
-
},
|
|
148
|
-
attributes: create_attribute()
|
|
149
|
-
.setAttribute('download', true)
|
|
150
|
-
.setAttribute('target', '_blank')
|
|
151
|
-
.addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0'])
|
|
151
|
+
}|merge(_download.icon|default({})),
|
|
152
|
+
attributes: download_attributes.merge(_download.attributes|default(create_attribute()))
|
|
152
153
|
}) %}
|
|
153
154
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
|
|
154
155
|
</div>
|
package/package.json
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-file",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.4.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL file",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-heading": "^1.
|
|
12
|
-
"@openeuropa/bcl-icon": "^1.
|
|
13
|
-
"@openeuropa/bcl-link": "^1.
|
|
11
|
+
"@openeuropa/bcl-heading": "^1.4.0",
|
|
12
|
+
"@openeuropa/bcl-icon": "^1.4.0",
|
|
13
|
+
"@openeuropa/bcl-link": "^1.4.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"design-system",
|
|
27
27
|
"twig"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "0271b344c41999ea181851f229385df1d539047b"
|
|
30
30
|
}
|