@openeuropa/bcl-user 0.26.0 → 0.28.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/package.json +8 -8
- package/user-compact.html.twig +34 -23
package/package.json
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-user",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.28.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL user",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-base-templates": "^0.
|
|
12
|
-
"@openeuropa/bcl-button": "^0.
|
|
13
|
-
"@openeuropa/bcl-card": "^0.
|
|
14
|
-
"@openeuropa/bcl-form": "^0.
|
|
15
|
-
"@openeuropa/bcl-link": "^0.
|
|
16
|
-
"@openeuropa/bcl-navigation": "^0.
|
|
11
|
+
"@openeuropa/bcl-base-templates": "^0.28.0",
|
|
12
|
+
"@openeuropa/bcl-button": "^0.28.0",
|
|
13
|
+
"@openeuropa/bcl-card": "^0.28.0",
|
|
14
|
+
"@openeuropa/bcl-form": "^0.28.0",
|
|
15
|
+
"@openeuropa/bcl-link": "^0.28.0",
|
|
16
|
+
"@openeuropa/bcl-navigation": "^0.28.0"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"design-system",
|
|
30
30
|
"twig"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "9ceb916258c8c7331f37bbb7c4380a2121440e12"
|
|
33
33
|
}
|
package/user-compact.html.twig
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
{% spaceless %}
|
|
1
|
+
{% apply spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- picture (object)
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
- picture (object) (default: {})
|
|
5
|
+
format: {
|
|
6
|
+
- path (string) (default: '')
|
|
7
|
+
- alt (string) (default: '')
|
|
8
|
+
- classes (string) (default: '')
|
|
9
|
+
}
|
|
10
|
+
- name (object) (default: {})
|
|
11
|
+
format: {
|
|
12
|
+
- text (string) (default: '')
|
|
13
|
+
- link (string) (default: '')
|
|
14
|
+
}
|
|
13
15
|
- infos (array of strings) (default: [])
|
|
14
16
|
#}
|
|
15
17
|
|
|
18
|
+
{% set _picture = picture|default({}) %}
|
|
19
|
+
{% set _name = name|default({}) %}
|
|
20
|
+
{% set _infos = infos|default([]) %}
|
|
21
|
+
|
|
16
22
|
{% set _picture_classes = 'rounded-pill' %}
|
|
17
23
|
{% set _classes = ['bcl-user-compact', 'd-flex', 'mb-3'] %}
|
|
18
24
|
|
|
@@ -22,8 +28,8 @@
|
|
|
22
28
|
|
|
23
29
|
{% set attributes = attributes.addClass(_classes) %}
|
|
24
30
|
|
|
25
|
-
{% if
|
|
26
|
-
{% set _picture_classes = _picture_classes ~ ' ' ~
|
|
31
|
+
{% if _picture is not empty and _picture.classes is not empty %}
|
|
32
|
+
{% set _picture_classes = _picture_classes ~ ' ' ~ _picture.classes %}
|
|
27
33
|
{% endif %}
|
|
28
34
|
|
|
29
35
|
<div
|
|
@@ -32,22 +38,27 @@
|
|
|
32
38
|
<div class="flex-shrink-0">
|
|
33
39
|
<img
|
|
34
40
|
class="{{ _picture_classes }}"
|
|
35
|
-
src="{{
|
|
36
|
-
alt="{{
|
|
41
|
+
src="{{ _picture.path }}"
|
|
42
|
+
alt="{{ _picture.alt }}"
|
|
37
43
|
>
|
|
38
44
|
</div>
|
|
39
45
|
<div class="flex-grow-1 ms-3">
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
{% if _name.link is not empty %}
|
|
47
|
+
<a href="{{ _name.link }}" class="fs-5 standalone mb-0">{{ _name.text }}</a>
|
|
48
|
+
{% else %}
|
|
49
|
+
<p class="fs-5 mb-0 text-primary">{{ _name.text }}</p>
|
|
50
|
+
{% endif %}
|
|
51
|
+
|
|
52
|
+
{% if _infos is not empty %}
|
|
45
53
|
<div class="d-flex flex-wrap">
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
54
|
+
{% for _info in _infos %}
|
|
55
|
+
{% if _info is not empty %}
|
|
56
|
+
<span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ _info }}</span>
|
|
57
|
+
{% endif %}
|
|
58
|
+
{% endfor %}
|
|
49
59
|
</div>
|
|
60
|
+
{% endif %}
|
|
50
61
|
</div>
|
|
51
62
|
</div>
|
|
52
63
|
|
|
53
|
-
{%
|
|
64
|
+
{% endapply %}
|