@openeuropa/bcl-twig-templates 1.1.1 → 1.2.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 +66 -66
- package/templates/bcl-badge/badge.html.twig +1 -1
- package/templates/bcl-card/card.html.twig +1 -1
- package/templates/bcl-carousel/carousel.html.twig +1 -1
- package/templates/bcl-date-block/date-block.html.twig +5 -5
- package/templates/bcl-featured-media/featured-media.html.twig +20 -5
- package/templates/bcl-form/form.html.twig +1 -1
- package/templates/bcl-gallery/gallery-item.html.twig +1 -1
- package/templates/bcl-link/link.html.twig +2 -2
- package/templates/bcl-placeholder/placeholder.html.twig +1 -1
- package/templates/bcl-subscription-block/subscription-block.html.twig +1 -1
package/package.json
CHANGED
|
@@ -2,77 +2,77 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-twig-templates",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.0",
|
|
6
6
|
"description": "OE Bcl Twig Templates",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@openeuropa/bcl-accordion": "^1.
|
|
12
|
-
"@openeuropa/bcl-alert": "^1.
|
|
13
|
-
"@openeuropa/bcl-badge": "^1.
|
|
14
|
-
"@openeuropa/bcl-banner": "^1.
|
|
15
|
-
"@openeuropa/bcl-base-templates": "^1.
|
|
16
|
-
"@openeuropa/bcl-blockquote": "^1.
|
|
17
|
-
"@openeuropa/bcl-breadcrumb": "^1.
|
|
18
|
-
"@openeuropa/bcl-button": "^1.
|
|
19
|
-
"@openeuropa/bcl-button-group": "^1.
|
|
20
|
-
"@openeuropa/bcl-card": "^1.
|
|
21
|
-
"@openeuropa/bcl-card-layout": "^1.
|
|
22
|
-
"@openeuropa/bcl-carousel": "^1.
|
|
23
|
-
"@openeuropa/bcl-contact-form": "^1.
|
|
24
|
-
"@openeuropa/bcl-content-banner": "^1.
|
|
25
|
-
"@openeuropa/bcl-date-block": "^1.
|
|
26
|
-
"@openeuropa/bcl-description-list": "^1.
|
|
27
|
-
"@openeuropa/bcl-dropdown": "^1.
|
|
28
|
-
"@openeuropa/bcl-event": "^1.
|
|
29
|
-
"@openeuropa/bcl-fact-figures": "^1.
|
|
30
|
-
"@openeuropa/bcl-featured-media": "^1.
|
|
31
|
-
"@openeuropa/bcl-file": "^1.
|
|
32
|
-
"@openeuropa/bcl-footer": "^1.
|
|
33
|
-
"@openeuropa/bcl-form": "^1.
|
|
34
|
-
"@openeuropa/bcl-form-input": "^1.
|
|
35
|
-
"@openeuropa/bcl-gallery": "^1.
|
|
36
|
-
"@openeuropa/bcl-glossary": "^1.
|
|
37
|
-
"@openeuropa/bcl-group": "^1.
|
|
38
|
-
"@openeuropa/bcl-header": "^1.
|
|
39
|
-
"@openeuropa/bcl-heading": "^1.
|
|
40
|
-
"@openeuropa/bcl-icon": "^1.
|
|
41
|
-
"@openeuropa/bcl-inpage-navigation": "^1.
|
|
42
|
-
"@openeuropa/bcl-landing-page": "^1.
|
|
43
|
-
"@openeuropa/bcl-language-list": "^1.
|
|
44
|
-
"@openeuropa/bcl-language-switcher": "^1.
|
|
45
|
-
"@openeuropa/bcl-link": "^1.
|
|
46
|
-
"@openeuropa/bcl-links-block": "^1.
|
|
47
|
-
"@openeuropa/bcl-list-group": "^1.
|
|
48
|
-
"@openeuropa/bcl-listing": "^1.
|
|
49
|
-
"@openeuropa/bcl-modal": "^1.
|
|
50
|
-
"@openeuropa/bcl-multilingual": "^1.
|
|
51
|
-
"@openeuropa/bcl-navbar": "^1.
|
|
52
|
-
"@openeuropa/bcl-navigation": "^1.
|
|
53
|
-
"@openeuropa/bcl-news": "^1.
|
|
54
|
-
"@openeuropa/bcl-offcanvas": "^1.
|
|
55
|
-
"@openeuropa/bcl-page": "^1.
|
|
56
|
-
"@openeuropa/bcl-pagination": "^1.
|
|
57
|
-
"@openeuropa/bcl-person": "^1.
|
|
58
|
-
"@openeuropa/bcl-placeholder": "^1.
|
|
59
|
-
"@openeuropa/bcl-progress": "^1.
|
|
60
|
-
"@openeuropa/bcl-project": "^1.
|
|
61
|
-
"@openeuropa/bcl-project-status": "^1.
|
|
62
|
-
"@openeuropa/bcl-recent-activities": "^1.
|
|
63
|
-
"@openeuropa/bcl-search": "^1.
|
|
64
|
-
"@openeuropa/bcl-search-form": "^1.
|
|
65
|
-
"@openeuropa/bcl-select": "^1.
|
|
66
|
-
"@openeuropa/bcl-spinner": "^1.
|
|
67
|
-
"@openeuropa/bcl-subscription": "^1.
|
|
68
|
-
"@openeuropa/bcl-subscription-block": "^1.
|
|
69
|
-
"@openeuropa/bcl-table": "^1.
|
|
70
|
-
"@openeuropa/bcl-textarea": "^1.
|
|
71
|
-
"@openeuropa/bcl-timeline": "^1.
|
|
72
|
-
"@openeuropa/bcl-toast": "^1.
|
|
73
|
-
"@openeuropa/bcl-user": "^1.
|
|
11
|
+
"@openeuropa/bcl-accordion": "^1.2.0",
|
|
12
|
+
"@openeuropa/bcl-alert": "^1.2.0",
|
|
13
|
+
"@openeuropa/bcl-badge": "^1.2.0",
|
|
14
|
+
"@openeuropa/bcl-banner": "^1.2.0",
|
|
15
|
+
"@openeuropa/bcl-base-templates": "^1.2.0",
|
|
16
|
+
"@openeuropa/bcl-blockquote": "^1.2.0",
|
|
17
|
+
"@openeuropa/bcl-breadcrumb": "^1.2.0",
|
|
18
|
+
"@openeuropa/bcl-button": "^1.2.0",
|
|
19
|
+
"@openeuropa/bcl-button-group": "^1.2.0",
|
|
20
|
+
"@openeuropa/bcl-card": "^1.2.0",
|
|
21
|
+
"@openeuropa/bcl-card-layout": "^1.2.0",
|
|
22
|
+
"@openeuropa/bcl-carousel": "^1.2.0",
|
|
23
|
+
"@openeuropa/bcl-contact-form": "^1.2.0",
|
|
24
|
+
"@openeuropa/bcl-content-banner": "^1.2.0",
|
|
25
|
+
"@openeuropa/bcl-date-block": "^1.2.0",
|
|
26
|
+
"@openeuropa/bcl-description-list": "^1.2.0",
|
|
27
|
+
"@openeuropa/bcl-dropdown": "^1.2.0",
|
|
28
|
+
"@openeuropa/bcl-event": "^1.2.0",
|
|
29
|
+
"@openeuropa/bcl-fact-figures": "^1.2.0",
|
|
30
|
+
"@openeuropa/bcl-featured-media": "^1.2.0",
|
|
31
|
+
"@openeuropa/bcl-file": "^1.2.0",
|
|
32
|
+
"@openeuropa/bcl-footer": "^1.2.0",
|
|
33
|
+
"@openeuropa/bcl-form": "^1.2.0",
|
|
34
|
+
"@openeuropa/bcl-form-input": "^1.2.0",
|
|
35
|
+
"@openeuropa/bcl-gallery": "^1.2.0",
|
|
36
|
+
"@openeuropa/bcl-glossary": "^1.2.0",
|
|
37
|
+
"@openeuropa/bcl-group": "^1.2.0",
|
|
38
|
+
"@openeuropa/bcl-header": "^1.2.0",
|
|
39
|
+
"@openeuropa/bcl-heading": "^1.2.0",
|
|
40
|
+
"@openeuropa/bcl-icon": "^1.2.0",
|
|
41
|
+
"@openeuropa/bcl-inpage-navigation": "^1.2.0",
|
|
42
|
+
"@openeuropa/bcl-landing-page": "^1.2.0",
|
|
43
|
+
"@openeuropa/bcl-language-list": "^1.2.0",
|
|
44
|
+
"@openeuropa/bcl-language-switcher": "^1.2.0",
|
|
45
|
+
"@openeuropa/bcl-link": "^1.2.0",
|
|
46
|
+
"@openeuropa/bcl-links-block": "^1.2.0",
|
|
47
|
+
"@openeuropa/bcl-list-group": "^1.2.0",
|
|
48
|
+
"@openeuropa/bcl-listing": "^1.2.0",
|
|
49
|
+
"@openeuropa/bcl-modal": "^1.2.0",
|
|
50
|
+
"@openeuropa/bcl-multilingual": "^1.2.0",
|
|
51
|
+
"@openeuropa/bcl-navbar": "^1.2.0",
|
|
52
|
+
"@openeuropa/bcl-navigation": "^1.2.0",
|
|
53
|
+
"@openeuropa/bcl-news": "^1.2.0",
|
|
54
|
+
"@openeuropa/bcl-offcanvas": "^1.2.0",
|
|
55
|
+
"@openeuropa/bcl-page": "^1.2.0",
|
|
56
|
+
"@openeuropa/bcl-pagination": "^1.2.0",
|
|
57
|
+
"@openeuropa/bcl-person": "^1.2.0",
|
|
58
|
+
"@openeuropa/bcl-placeholder": "^1.2.0",
|
|
59
|
+
"@openeuropa/bcl-progress": "^1.2.0",
|
|
60
|
+
"@openeuropa/bcl-project": "^1.2.0",
|
|
61
|
+
"@openeuropa/bcl-project-status": "^1.2.0",
|
|
62
|
+
"@openeuropa/bcl-recent-activities": "^1.2.0",
|
|
63
|
+
"@openeuropa/bcl-search": "^1.2.0",
|
|
64
|
+
"@openeuropa/bcl-search-form": "^1.2.0",
|
|
65
|
+
"@openeuropa/bcl-select": "^1.2.0",
|
|
66
|
+
"@openeuropa/bcl-spinner": "^1.2.0",
|
|
67
|
+
"@openeuropa/bcl-subscription": "^1.2.0",
|
|
68
|
+
"@openeuropa/bcl-subscription-block": "^1.2.0",
|
|
69
|
+
"@openeuropa/bcl-table": "^1.2.0",
|
|
70
|
+
"@openeuropa/bcl-textarea": "^1.2.0",
|
|
71
|
+
"@openeuropa/bcl-timeline": "^1.2.0",
|
|
72
|
+
"@openeuropa/bcl-toast": "^1.2.0",
|
|
73
|
+
"@openeuropa/bcl-user": "^1.2.0",
|
|
74
74
|
"copyfiles": "2.4.1",
|
|
75
|
-
"rimraf": "5.0.
|
|
75
|
+
"rimraf": "5.0.1"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"clean": "rimraf templates",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"design-system",
|
|
94
94
|
"twig"
|
|
95
95
|
],
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "e8750bd56d83523370a6a1f32f3cc5c0b14bdfca"
|
|
97
97
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
{% if _outline %}
|
|
32
32
|
{% set _classes = _classes|merge(['badge-outline-' ~ _background]) %}
|
|
33
33
|
{% else %}
|
|
34
|
-
{% set _classes = _classes|merge(['bg-' ~ _background]) %}
|
|
34
|
+
{% set _classes = _classes|merge(['text-bg-' ~ _background]) %}
|
|
35
35
|
{% endif %}
|
|
36
36
|
|
|
37
37
|
{% if attributes is empty %}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
{% set _classes = _classes|merge(['text-' ~ _text_color]) %}
|
|
83
83
|
{% endif %}
|
|
84
84
|
{% if _variant is not empty %}
|
|
85
|
-
{% set _classes = _classes|merge(['bg-' ~ _variant]) %}
|
|
85
|
+
{% set _classes = _classes|merge(['text-bg-' ~ _variant]) %}
|
|
86
86
|
{% endif %}
|
|
87
87
|
{% if _border_variant is not empty %}
|
|
88
88
|
{% set _classes = _classes|merge(['border-' ~ _border_variant]) %}
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<div class="{{ _item.caption_classes }}">
|
|
136
136
|
{% endif %}
|
|
137
137
|
{% if _item.caption_title is not empty %}
|
|
138
|
-
<
|
|
138
|
+
<div class="fs-5">{{ _item.caption_title }}</div>
|
|
139
139
|
{% endif %}
|
|
140
140
|
{{- _item.caption -}}
|
|
141
141
|
{% if _item.caption_classes is defined and _item.caption_classes is not empty %}
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
<span class="d-flex flex-column pt-2">
|
|
46
46
|
<span class="d-flex flex-column align-item-center justify-content-center bg-white border border-bottom-0 w-100 h-100 fs-5 text-uppercase">
|
|
47
47
|
<span class="d-block">{{- _day ~ ' ' ~ _month ~ ((_end_day or _end_month) ? ' - ' ) -}}</span>
|
|
48
|
-
{%- if _end_day is not empty
|
|
48
|
+
{%- if _end_day is not empty %}
|
|
49
49
|
{{- _end_day -}}
|
|
50
|
-
{% endif
|
|
51
|
-
{
|
|
52
|
-
{{- _end_month -}}
|
|
53
|
-
{
|
|
50
|
+
{% endif -%}
|
|
51
|
+
{%- if _end_month is not empty %}
|
|
52
|
+
{{- ' ' ~ _end_month -}}
|
|
53
|
+
{% endif -%}
|
|
54
54
|
</span>
|
|
55
55
|
<span class="bg-lighter border w-100 rounded-bottom py-1">
|
|
56
56
|
{{- _year -}}
|
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
- poster_image: (string) (default: '')
|
|
13
13
|
- content: (string) (default: '')
|
|
14
14
|
- wrapper_classes: (default: '')
|
|
15
|
+
- force_wrapper (boolean) (default: false) - always render wrapper element
|
|
15
16
|
- content_classes: (string) (default: '')
|
|
16
17
|
- read_more (object) (default: {})
|
|
18
|
+
- description_title (string) (default: '')
|
|
19
|
+
- description_title_tag (string) (default: 'h3')
|
|
20
|
+
- description_title_attributes (drupal attrs)
|
|
17
21
|
- description (string) (default: '')
|
|
18
22
|
- ratio: (string) (default: '16x9')
|
|
19
23
|
- options ['1x1', '4x3', '16x9', '21x9']
|
|
@@ -40,6 +44,7 @@
|
|
|
40
44
|
{% set _title_tag = title_tag|default('h2') %}
|
|
41
45
|
{% set _title_link = title_link|default({}) %}
|
|
42
46
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
47
|
+
{% set _force_wrapper = force_wrapper ?? false %}
|
|
43
48
|
{% set _with_text = with_text ?? false %}
|
|
44
49
|
{% set _alignment = alignment|default('right') %}
|
|
45
50
|
{% set _image = image|default('') %}
|
|
@@ -48,6 +53,9 @@
|
|
|
48
53
|
{% set _wrapper_classes = wrapper_classes|default('') %}
|
|
49
54
|
{% set _content_classes = content_classes|default('') %}
|
|
50
55
|
{% set _read_more = read_more|default({}) %}
|
|
56
|
+
{% set _description_title = description_title|default('') %}
|
|
57
|
+
{% set _description_title_tag = description_title_tag|default('h3') %}
|
|
58
|
+
{% set _description_title_attributes = description_title_attributes ?: create_attribute() %}
|
|
51
59
|
{% set _description = description|default('') %}
|
|
52
60
|
{% set _ratio = ratio|default('16x9') %}
|
|
53
61
|
{% set _sources = sources|default([]) %}
|
|
@@ -65,10 +73,6 @@
|
|
|
65
73
|
{% set attributes = create_attribute() %}
|
|
66
74
|
{% endif %}
|
|
67
75
|
|
|
68
|
-
{% if _with_text %}
|
|
69
|
-
{% set _title_attributes = _title_attributes.addClass(['fw-bold', 'mb-4']) %}
|
|
70
|
-
{% endif %}
|
|
71
|
-
|
|
72
76
|
{% set attributes = attributes.addClass(["rounded", "overflow-hidden"]) %}
|
|
73
77
|
|
|
74
78
|
{% if _image is not empty %}
|
|
@@ -80,8 +84,10 @@
|
|
|
80
84
|
{% endif %}
|
|
81
85
|
{% endif %}
|
|
82
86
|
|
|
83
|
-
{% if _with_text %}
|
|
87
|
+
{% if _with_text or _force_wrapper %}
|
|
84
88
|
<div class="{{ _classes }}">
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% if _with_text %}
|
|
85
91
|
<div class="row">
|
|
86
92
|
{% endif %}
|
|
87
93
|
|
|
@@ -96,6 +102,13 @@
|
|
|
96
102
|
|
|
97
103
|
{% if _with_text %}
|
|
98
104
|
<div class="{{ _col_classes }} order-{{ _alignment == "right" ? '1' : '2' }}">
|
|
105
|
+
{%- if _description_title is not empty -%}
|
|
106
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
107
|
+
title: _description_title,
|
|
108
|
+
title_tag: _description_title_tag,
|
|
109
|
+
attributes: _description_title_attributes,
|
|
110
|
+
} only %}
|
|
111
|
+
{%- endif -%}
|
|
99
112
|
{{- _description|default('') -}}
|
|
100
113
|
|
|
101
114
|
{% if _read_more is not empty %}
|
|
@@ -151,6 +164,8 @@
|
|
|
151
164
|
{% if _with_text %}
|
|
152
165
|
</div>
|
|
153
166
|
</div>
|
|
167
|
+
{% endif %}
|
|
168
|
+
{% if _with_text or _force_wrapper %}
|
|
154
169
|
</div>
|
|
155
170
|
{% endif %}
|
|
156
171
|
|
|
@@ -48,7 +48,7 @@ Parameters:
|
|
|
48
48
|
{% if _item.caption is not empty or item.caption_title is not empty %}
|
|
49
49
|
<div class="bcl-gallery__item-caption">
|
|
50
50
|
{% if _item.caption_title is not empty %}
|
|
51
|
-
<
|
|
51
|
+
<div class="fs-5">{{ _item.caption_title }}</div>
|
|
52
52
|
{% endif %}
|
|
53
53
|
{% if _item.caption is not empty %}
|
|
54
54
|
<div class="bcl-gallery__item-description">
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
{{ attributes }}
|
|
79
79
|
>
|
|
80
80
|
{%- if _icon_position == 'before' and _icon_markup is defined -%}
|
|
81
|
-
{{ _icon_markup
|
|
81
|
+
{{ _icon_markup }}
|
|
82
82
|
{%- endif -%}
|
|
83
83
|
{{- _label -}}
|
|
84
84
|
{%- if _icon_position == 'after' and _icon_markup is defined -%}
|
|
85
|
-
{{ _icon_markup
|
|
85
|
+
{{ _icon_markup }}
|
|
86
86
|
{%- endif -%}
|
|
87
87
|
</a>
|
|
88
88
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{% set _content = content|default('') %}
|
|
12
12
|
{% set _button = button|default({}) %}
|
|
13
13
|
|
|
14
|
-
{% set _classes = ['bcl-subscription-block', 'bg-light', 'px-4-5', 'pt-4', 'pb-4-5'] %}
|
|
14
|
+
{% set _classes = ['bcl-subscription-block', 'text-bg-light', 'px-4-5', 'pt-4', 'pb-4-5'] %}
|
|
15
15
|
|
|
16
16
|
{% if attributes is empty %}
|
|
17
17
|
{% set attributes = create_attribute() %}
|