@openeuropa/bcl-listing 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/listing.html.twig +19 -9
- package/package.json +5 -4
package/listing.html.twig
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{% spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- variant: (string) (default: "horizontal") options:
|
|
5
|
-
[ default-1-col, highlight-1-col, default-2-col, default-3-col, highlight-2-col, highlight-3-col ]
|
|
6
4
|
- title: (string) (default: "")
|
|
7
5
|
- title_tag: (string) (default: "h2")
|
|
6
|
+
- title_link: (link object) (default: {})
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
8
|
+
- variant: (string) (default: "horizontal") options:
|
|
9
|
+
[ default-1-col, highlight-1-col, default-2-col, default-3-col, highlight-2-col, highlight-3-col ]
|
|
8
10
|
- items: (array of objects of type card)
|
|
9
11
|
- link: (object of type link)
|
|
10
12
|
- alignment: (string) (default: '') options:
|
|
11
13
|
['start', 'end', 'center', 'baseline', 'stretch']
|
|
12
14
|
#}
|
|
13
15
|
|
|
14
|
-
{% set _items = items|default([]) %}
|
|
15
|
-
{% set _variant = variant|default('default-1-col') %}
|
|
16
16
|
{% set _title = title|default('') %}
|
|
17
17
|
{% set _title_tag = title_tag|default('h2') %}
|
|
18
|
+
{% set _title_link = title_link|default({}) %}
|
|
19
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
20
|
+
{% set _items = items|default([]) %}
|
|
21
|
+
{% set _variant = variant|default('default-1-col') %}
|
|
18
22
|
{% set _alignment = alignment|default('') %}
|
|
19
23
|
{% set _link = link|default({}) %}
|
|
20
24
|
{% set _classes = ['bcl-listing', 'bcl-listing--' ~ _variant] %}
|
|
@@ -35,10 +39,12 @@
|
|
|
35
39
|
<div {{ attributes }}>
|
|
36
40
|
|
|
37
41
|
{% if _title is not empty %}
|
|
38
|
-
{%
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
43
|
+
title: _title,
|
|
44
|
+
title_tag: _title_tag,
|
|
45
|
+
title_link: _title_link,
|
|
46
|
+
title_attributes: _title_attributes,
|
|
47
|
+
} only %}
|
|
42
48
|
{% endif %}
|
|
43
49
|
|
|
44
50
|
{% if _items is not empty %}
|
|
@@ -56,13 +62,17 @@
|
|
|
56
62
|
classes: _image_classes,
|
|
57
63
|
})}) %}
|
|
58
64
|
{% elseif _card.date is not empty %}
|
|
59
|
-
{% set _max_width = 'mw-date mb-3' %}
|
|
65
|
+
{% set _max_width = 'mw-col-date mb-3' %}
|
|
60
66
|
{% endif %}
|
|
61
67
|
{% if _alignment is not empty %}
|
|
62
68
|
{% set _alignment_class = ' align-self-' ~ _alignment %}
|
|
63
69
|
{% endif %}
|
|
64
70
|
{% set _card_classes = [] %}
|
|
65
71
|
{% set _card_attributes = card.attributes ? card.attributes : create_attribute() %}
|
|
72
|
+
{% set _card_title_attributes = card.title_attributes ? card.title_attributes : create_attribute() %}
|
|
73
|
+
{% set _card = _card|merge({
|
|
74
|
+
title_attributes: _card_title_attributes.addClass(['fs-5'])
|
|
75
|
+
}) %}
|
|
66
76
|
|
|
67
77
|
{% if _variant == 'default-1-col' %}
|
|
68
78
|
{% set _card_classes = [
|
package/package.json
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-listing",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.23.0",
|
|
6
6
|
"description": "OE - BCL Listing",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-card-layout": "^0.
|
|
12
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-card-layout": "^0.23.0",
|
|
12
|
+
"@openeuropa/bcl-heading": "^0.23.0",
|
|
13
|
+
"@openeuropa/bcl-link": "^0.23.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": "fa2097e14024989cddf6f9cd7a9115bed5886aeb"
|
|
29
30
|
}
|