@openeuropa/bcl-file 0.23.0 → 0.24.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 +43 -39
- package/package.json +5 -5
package/file.html.twig
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
- title_attributes (drupal attrs)
|
|
9
9
|
- item_title (string) (default: '')
|
|
10
10
|
- icon (icon Object) (default: {})
|
|
11
|
+
- icon_inline (boolean) (deafult: true)
|
|
11
12
|
- text (string) (default: '')
|
|
12
13
|
- content (string) (default: '')
|
|
13
14
|
- image (object) (default: {}) - format: {
|
|
14
|
-
path:
|
|
15
|
-
alt:
|
|
15
|
+
path: '',
|
|
16
|
+
alt: '',
|
|
16
17
|
}
|
|
17
18
|
- badges (array of badges Object) (default: [])
|
|
18
19
|
- meta (string) (default: '')
|
|
@@ -21,22 +22,24 @@
|
|
|
21
22
|
- options: ['default', 'card']
|
|
22
23
|
- download (link Object) (default: {})
|
|
23
24
|
- translation (object) (default: {}) format: {
|
|
24
|
-
id:
|
|
25
|
+
id: '',
|
|
25
26
|
label: {}, - link Object
|
|
26
27
|
items: [
|
|
27
28
|
{
|
|
28
|
-
extension:
|
|
29
|
-
language:
|
|
30
|
-
size:
|
|
29
|
+
extension: '',
|
|
30
|
+
language: '',
|
|
31
|
+
size: '',
|
|
31
32
|
download: {}, - link Object
|
|
32
33
|
},
|
|
33
34
|
}
|
|
34
35
|
- icon_path (string) (default: '')
|
|
36
|
+
- attributes (drupal attrs)
|
|
35
37
|
#}
|
|
36
38
|
|
|
37
39
|
{# Internal properties #}
|
|
38
40
|
|
|
39
41
|
{% set _icon = icon|default({}) %}
|
|
42
|
+
{% set _icon_inline = icon_inline|default(true) %}
|
|
40
43
|
{% set _title = title|default('') %}
|
|
41
44
|
{% set _title_tag = title_tag|default('h2') %}
|
|
42
45
|
{% set _title_link = title_link|default({}) %}
|
|
@@ -59,7 +62,6 @@
|
|
|
59
62
|
|
|
60
63
|
{% set attributes = attributes.addClass(['bcl-file']) %}
|
|
61
64
|
|
|
62
|
-
{% set _container_classes = 'w-100 d-md-flex' %}
|
|
63
65
|
{% if _icon is not empty %}
|
|
64
66
|
{% set _container_classes = _container_classes ~ ' ms-2-5' %}
|
|
65
67
|
{% set _icon = _icon|merge({
|
|
@@ -76,51 +78,53 @@
|
|
|
76
78
|
} only %}
|
|
77
79
|
{% endif %}
|
|
78
80
|
|
|
79
|
-
{%
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
position: "top",
|
|
83
|
-
classes: "mb-3",
|
|
84
|
-
rounded: 0,
|
|
85
|
-
}) %}
|
|
86
|
-
{% include '@oe-bcl/bcl-card/card.html.twig' with {
|
|
87
|
-
horizontal: true,
|
|
88
|
-
horizontal_grid: {
|
|
89
|
-
left_col_classes: "col-12 col-md-4 order-md-2",
|
|
90
|
-
right_col_classes: "col-12 col-md-8",
|
|
91
|
-
},
|
|
92
|
-
badges: _badges,
|
|
93
|
-
title: _item_title,
|
|
94
|
-
text: {
|
|
95
|
-
content: _text,
|
|
96
|
-
classes: "mb-2",
|
|
97
|
-
},
|
|
98
|
-
content: _content,
|
|
99
|
-
image: _image,
|
|
100
|
-
extra_classes_body: "p-0",
|
|
101
|
-
attributes: create_attribute().addClass(['rounded-0', 'rounded-top', 'p-4', 'border-bottom-0'])
|
|
102
|
-
} only %}
|
|
103
|
-
{% else %}
|
|
104
|
-
{% set attributes = attributes.addClass(['border', 'rounded']) %}
|
|
105
|
-
{% endif %}
|
|
81
|
+
{% set attributes = attributes.addClass(['border', 'rounded']) %}
|
|
82
|
+
|
|
83
|
+
{% set _container_classes = 'd-md-flex flex-grow-1' %}
|
|
106
84
|
|
|
107
85
|
<div
|
|
108
86
|
{{ attributes }}
|
|
109
87
|
>
|
|
110
|
-
|
|
111
|
-
<div class="d-flex">
|
|
88
|
+
{% if _variant == 'card' %}
|
|
89
|
+
<div class="border-bottom px-3-5 py-3 d-md-flex">
|
|
90
|
+
<div class="pe-2 pb-2">
|
|
112
91
|
{% if _icon is not empty %}
|
|
113
92
|
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
|
|
114
93
|
path: _icon_path,
|
|
115
94
|
}) only -%}
|
|
116
95
|
{% endif %}
|
|
96
|
+
</div>
|
|
97
|
+
<div>
|
|
98
|
+
{% if _item_title is not empty %}
|
|
99
|
+
<p class="fw-medium mb-2 fs-5">{{ _item_title }}</p>
|
|
100
|
+
{% endif %}
|
|
101
|
+
{% if _text is not empty %}
|
|
102
|
+
<p class="mb-3">{{ _text }}</p>
|
|
103
|
+
{% endif %}
|
|
104
|
+
{% if _content is not empty %}
|
|
105
|
+
{{ _content }}
|
|
106
|
+
{% endif %}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
{% endif %}
|
|
110
|
+
<div class="px-3-5 py-3">
|
|
111
|
+
<div class="d-flex">
|
|
112
|
+
{% if _icon is not empty and _variant == 'default' %}
|
|
113
|
+
<div class="pe-2 pb-2">
|
|
114
|
+
{% if _icon is not empty %}
|
|
115
|
+
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
|
|
116
|
+
path: _icon_path,
|
|
117
|
+
}) only -%}
|
|
118
|
+
{% endif %}
|
|
119
|
+
</div>
|
|
120
|
+
{% endif %}
|
|
117
121
|
<div class="{{ _container_classes }}">
|
|
118
122
|
<div class="flex-grow-1">
|
|
119
123
|
{% if _item_title is not empty and _variant == 'default' %}
|
|
120
|
-
<p class="fw-
|
|
124
|
+
<p class="fw-medium m-0 fs-5">{{ _item_title }}</p>
|
|
121
125
|
{% endif %}
|
|
122
126
|
{% if _language is not empty or _meta is not empty %}
|
|
123
|
-
<small class="fw-
|
|
127
|
+
<small class="fw-medium m-0">
|
|
124
128
|
{%- if _language is not empty -%}
|
|
125
129
|
{{- _language -}}
|
|
126
130
|
{%- endif -%}
|
|
@@ -142,7 +146,7 @@
|
|
|
142
146
|
attributes: create_attribute()
|
|
143
147
|
.setAttribute('download', true)
|
|
144
148
|
.setAttribute('target', '_blank')
|
|
145
|
-
.addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0'])
|
|
149
|
+
.addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0'])
|
|
146
150
|
}) %}
|
|
147
151
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
|
|
148
152
|
</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": "0.
|
|
5
|
+
"version": "0.24.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL file",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-heading": "^0.
|
|
12
|
-
"@openeuropa/bcl-icon": "^0.
|
|
13
|
-
"@openeuropa/bcl-link": "^0.
|
|
11
|
+
"@openeuropa/bcl-heading": "^0.24.0",
|
|
12
|
+
"@openeuropa/bcl-icon": "^0.24.0",
|
|
13
|
+
"@openeuropa/bcl-link": "^0.24.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": "a46bb6bc12771da4667516dc7b0665b00504ade2"
|
|
30
30
|
}
|