@openeuropa/bcl-theme-default 1.12.0 → 1.21.1
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 +5 -5
- package/templates/bcl-banner/banner.html.twig +8 -1
- package/templates/bcl-card/card.html.twig +23 -20
- package/templates/bcl-carousel/carousel.html.twig +37 -29
- package/templates/bcl-content-banner/content-banner.html.twig +3 -0
- package/templates/bcl-featured-media/featured-media.html.twig +15 -11
- package/templates/bcl-gallery/gallery.html.twig +1 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-theme-default",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.21.1",
|
|
6
6
|
"description": "OE - BCL theme default",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"align-templates": "lerna --scope \"@openeuropa/bcl-twig-templates\" run prepublish",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"@ecl/resources-ec-logo": "3.13.0",
|
|
24
24
|
"@ecl/resources-eu-logo": "3.13.0",
|
|
25
25
|
"@ecl/resources-flag-icons": "3.13.0",
|
|
26
|
-
"@openeuropa/bcl-bootstrap": "^1.
|
|
27
|
-
"@openeuropa/bcl-builder": "^1.
|
|
28
|
-
"@openeuropa/bcl-twig-templates": "^1.
|
|
26
|
+
"@openeuropa/bcl-bootstrap": "^1.21.1",
|
|
27
|
+
"@openeuropa/bcl-builder": "^1.21.1",
|
|
28
|
+
"@openeuropa/bcl-twig-templates": "^1.21.1",
|
|
29
29
|
"@rollup/plugin-replace": "6.0.3",
|
|
30
30
|
"copyfiles": "2.4.1",
|
|
31
31
|
"cross-env": "10.1.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"design-system",
|
|
52
52
|
"twig"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8a5c615f22e7988f691c72054725529d06023263"
|
|
55
55
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- link: (link object) (default: {})
|
|
8
8
|
- image: (string) <img> tag
|
|
9
9
|
- copyright: (string) (default: '')
|
|
10
|
+
- copyright_label: (string) (default: '')
|
|
10
11
|
- shade: (boolean) (default: false)
|
|
11
12
|
- hero: (boolean) (default: false)
|
|
12
13
|
- full_width: (boolean) (default: false)
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
{% set _link = link|default({}) %}
|
|
24
25
|
{% set _image = image|default('') %}
|
|
25
26
|
{% set _copyright = copyright|default('') %}
|
|
27
|
+
{% set _copyright_label = copyright_label|default('') %}
|
|
26
28
|
{% set _shade = shade ?? false %}
|
|
27
29
|
{% set _hero = hero ?? false %}
|
|
28
30
|
{% set _full_width = full_width ?? false %}
|
|
@@ -93,6 +95,11 @@
|
|
|
93
95
|
</div>{# -#}
|
|
94
96
|
</div>
|
|
95
97
|
{%- if _copyright is not empty -%}
|
|
96
|
-
<div class="bcl-copyright">
|
|
98
|
+
<div class="bcl-copyright">
|
|
99
|
+
{%- if _copyright_label is not empty -%}
|
|
100
|
+
<span class="visually-hidden">{{- _copyright_label }} </span>
|
|
101
|
+
{%- endif -%}
|
|
102
|
+
{{- _copyright -}}
|
|
103
|
+
</div>
|
|
97
104
|
{%- endif -%}
|
|
98
105
|
{#--#}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
position (string)
|
|
24
24
|
}
|
|
25
25
|
- image_copyright (string) (default: '')
|
|
26
|
+
- image_copyright_label (string) (default: '')
|
|
26
27
|
- date (date block object) (default: {})
|
|
27
28
|
- variant (string) (default: '')
|
|
28
29
|
- horizontal (boolean) (default: false)
|
|
@@ -59,6 +60,26 @@
|
|
|
59
60
|
{% set _content = content|default('') %}
|
|
60
61
|
{% set _image = image|default({}) %}
|
|
61
62
|
{% set _image_copyright = image_copyright|default('') %}
|
|
63
|
+
{% set _image_copyright_label = image_copyright_label|default('') %}
|
|
64
|
+
{% macro image_figure(image, img_class, copyright, copyright_label) %}
|
|
65
|
+
<figure class="m-0 bcl-card__image-wrapper">
|
|
66
|
+
<img
|
|
67
|
+
src="{{ image.path }}"
|
|
68
|
+
alt="{{ image.alt }}"
|
|
69
|
+
class="{{ img_class }}"
|
|
70
|
+
>
|
|
71
|
+
{%- if copyright is not empty %}
|
|
72
|
+
<figcaption class="bcl-card__image-footer">
|
|
73
|
+
<div class="bcl-copyright">
|
|
74
|
+
{%- if copyright_label is not empty -%}
|
|
75
|
+
<span class="visually-hidden">{{- copyright_label }} </span>
|
|
76
|
+
{%- endif -%}
|
|
77
|
+
{{- copyright -}}
|
|
78
|
+
</div>
|
|
79
|
+
</figcaption>
|
|
80
|
+
{%- endif %}
|
|
81
|
+
</figure>
|
|
82
|
+
{% endmacro %}
|
|
62
83
|
{% set _date = date|default({}) %}
|
|
63
84
|
{% set _variant = variant|default('') %}
|
|
64
85
|
{% set _horizontal = horizontal ?? false %}
|
|
@@ -157,16 +178,7 @@
|
|
|
157
178
|
{%- include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
|
|
158
179
|
{%- endblock %}
|
|
159
180
|
{%- elseif _image is not empty and _image.position != "bottom" -%}
|
|
160
|
-
|
|
161
|
-
src="{{ _image.path }}"
|
|
162
|
-
alt="{{ _image.alt }}"
|
|
163
|
-
class="{{ _img_class }}"
|
|
164
|
-
>
|
|
165
|
-
{%- if _image_copyright is not empty %}
|
|
166
|
-
<div class="bcl-card__image-footer">
|
|
167
|
-
<div class="bcl-copyright">{{- _image_copyright -}}</div>
|
|
168
|
-
</div>
|
|
169
|
-
{%- endif %}
|
|
181
|
+
{{- _self.image_figure(_image, _img_class, _image_copyright, _image_copyright_label) }}
|
|
170
182
|
{%- endif %}
|
|
171
183
|
{% if _horizontal and (_image is not empty or _date is not empty) -%}
|
|
172
184
|
</div>
|
|
@@ -261,16 +273,7 @@
|
|
|
261
273
|
{%- if _horizontal -%}
|
|
262
274
|
<div class="col-4">
|
|
263
275
|
{%- endif -%}
|
|
264
|
-
|
|
265
|
-
src="{{ _image.path }}"
|
|
266
|
-
alt="{{ _image.alt }}"
|
|
267
|
-
class="{{ _img_class }}"
|
|
268
|
-
>
|
|
269
|
-
{%- if _image_copyright is not empty %}
|
|
270
|
-
<div class="bcl-card__image-footer">
|
|
271
|
-
<div class="bcl-copyright">{{- _image_copyright -}}</div>
|
|
272
|
-
</div>
|
|
273
|
-
{%- endif %}
|
|
276
|
+
{{- _self.image_figure(_image, _img_class, _image_copyright, _image_copyright_label) }}
|
|
274
277
|
{%- if _horizontal -%}
|
|
275
278
|
</div>
|
|
276
279
|
{%- endif %}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
caption_classes (string)
|
|
15
15
|
caption_title (string)
|
|
16
16
|
copyright (string)
|
|
17
|
+
copyright_label (string)
|
|
17
18
|
interval (integer) (default: 0)
|
|
18
19
|
}
|
|
19
20
|
],
|
|
@@ -119,36 +120,43 @@
|
|
|
119
120
|
{% endif %}
|
|
120
121
|
>
|
|
121
122
|
{%- if _item.image is defined and _item.image is not empty %}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
123
|
+
<figure class="m-0 h-100">
|
|
124
|
+
{{- _item.image }}
|
|
125
|
+
{%- if (_item.caption is defined and _item.caption is not empty) or (_item.link is defined and _item.link is not empty) or (_item.caption_title is defined and _item.caption_title is not empty) %}
|
|
126
|
+
{%- set _caption_classes = 'carousel-caption' %}
|
|
127
|
+
{%- if _item.caption is not empty and _item.link is empty %}
|
|
128
|
+
{%- set _caption_classes = _caption_classes ~ ' d-none d-md-block' %}
|
|
129
|
+
{%- endif -%}
|
|
130
|
+
<div
|
|
131
|
+
class="{{ _caption_classes }}"
|
|
132
|
+
>
|
|
133
|
+
{%- if _item.caption is not empty or _item.caption_title is not empty %}
|
|
134
|
+
{%- if _item.caption_classes is defined and _item.caption_classes is not empty -%}
|
|
135
|
+
<div class="{{ _item.caption_classes }}">
|
|
136
|
+
{%- endif %}
|
|
137
|
+
{%- if _item.caption_title is not empty -%}
|
|
138
|
+
<div class="fs-5">{{ _item.caption_title }}</div>
|
|
139
|
+
{%- endif %}
|
|
140
|
+
{{- _item.caption -}}
|
|
141
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty -%}
|
|
142
|
+
</div>
|
|
143
|
+
{%- endif %}
|
|
144
|
+
{%- endif %}
|
|
145
|
+
{%- if _item.link is defined and _item.link is not empty %}
|
|
146
|
+
{%- include '@oe-bcl/bcl-link/link.html.twig' with _item.link only %}
|
|
147
|
+
{%- endif -%}
|
|
148
|
+
</div>
|
|
146
149
|
{%- endif -%}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
{%- if _item.copyright is defined and _item.copyright is not empty -%}
|
|
151
|
+
<figcaption class="bcl-copyright">
|
|
152
|
+
{%- if _item.copyright_label is defined and _item.copyright_label is not empty -%}
|
|
153
|
+
<span class="visually-hidden">{{- _item.copyright_label }} </span>
|
|
154
|
+
{%- endif -%}
|
|
155
|
+
{{- _item.copyright -}}
|
|
156
|
+
</figcaption>
|
|
157
|
+
{%- endif -%}
|
|
158
|
+
</figure>
|
|
159
|
+
{%- endif %}
|
|
152
160
|
</div>
|
|
153
161
|
{%- endfor %}
|
|
154
162
|
{%- endif -%}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
options: ['md', 'lg', 'xl']
|
|
12
12
|
- date: (date block object) (default: {})
|
|
13
13
|
- copyright: (string) (default: '')
|
|
14
|
+
- copyright_label: (string) (default: '')
|
|
14
15
|
|
|
15
16
|
Card inheritance
|
|
16
17
|
- badges (badge[]) (default: [])
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
{% set _action_bar = action_bar|default('') %}
|
|
46
47
|
{% set _date = date|default({}) %}
|
|
47
48
|
{% set _copyright = copyright|default('') %}
|
|
49
|
+
{% set _copyright_label = copyright_label|default('') %}
|
|
48
50
|
{%- set _action_bar_content -%}
|
|
49
51
|
{%- block action_bar -%}
|
|
50
52
|
{{ _action_bar }}
|
|
@@ -120,6 +122,7 @@
|
|
|
120
122
|
extra_classes_header: 'bg-transparent pt-0 pb-0 border-0',
|
|
121
123
|
extra_classes_body: _body_classes,
|
|
122
124
|
image_copyright: _copyright,
|
|
125
|
+
image_copyright_label: _copyright_label,
|
|
123
126
|
attributes: create_attribute().addClass(['bg-transparent', 'border-0']),
|
|
124
127
|
} %}
|
|
125
128
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
- poster_image: (string) (default: '')
|
|
11
11
|
- content: (string) (default: '')
|
|
12
12
|
- copyright: (string) (default: '')
|
|
13
|
+
- copyright_label: (string) (default: '')
|
|
13
14
|
- wrapper_classes: (default: '')
|
|
14
15
|
- force_wrapper (boolean) (default: false) - always render wrapper element
|
|
15
16
|
- content_classes: (string) (default: '')
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
{% set _poster_image = poster_image|default('') %}
|
|
51
52
|
{% set _content = content|default('') %}
|
|
52
53
|
{% set _copyright = copyright|default('') %}
|
|
54
|
+
{% set _copyright_label = copyright_label|default('') %}
|
|
53
55
|
{% set _wrapper_classes = wrapper_classes|default('') %}
|
|
54
56
|
{% set _content_classes = content_classes|default('') %}
|
|
55
57
|
{% set _read_more = read_more|default({}) %}
|
|
@@ -149,17 +151,19 @@
|
|
|
149
151
|
{{- _image }}
|
|
150
152
|
{%- endif %}
|
|
151
153
|
|
|
152
|
-
{%- if _copyright is not empty -%}
|
|
153
|
-
<
|
|
154
|
-
{%-
|
|
155
|
-
|
|
156
|
-
{%-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
{%- if _copyright is not empty or _content is not empty -%}
|
|
155
|
+
<figcaption>
|
|
156
|
+
{%- if _content is not empty -%}
|
|
157
|
+
<div{% if _content_classes is not empty %} class="{{ _content_classes }}"{% endif %}>{{- _content -}}</div>
|
|
158
|
+
{%- endif -%}
|
|
159
|
+
{%- if _copyright is not empty -%}
|
|
160
|
+
<div class="bcl-copyright">
|
|
161
|
+
{%- if _copyright_label is not empty -%}
|
|
162
|
+
<span class="visually-hidden">{{- _copyright_label }} </span>
|
|
163
|
+
{%- endif -%}
|
|
164
|
+
{{- _copyright -}}
|
|
165
|
+
</div>
|
|
166
|
+
{%- endif -%}
|
|
163
167
|
</figcaption>
|
|
164
168
|
{%- endif -%}
|
|
165
169
|
</figure>
|