@openeuropa/bcl-twig-templates 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/package.json +64 -61
- package/templates/bcl-alert/alert.html.twig +9 -1
- package/templates/bcl-badge/badge.html.twig +13 -9
- package/templates/bcl-banner/banner.html.twig +20 -9
- package/templates/bcl-base-templates/content-type.html.twig +3 -3
- package/templates/bcl-base-templates/listing-page.html.twig +30 -20
- package/templates/bcl-card/card.html.twig +57 -41
- package/templates/bcl-carousel/carousel.html.twig +26 -5
- package/templates/bcl-content-banner/content-banner.html.twig +53 -62
- package/templates/bcl-date-block/date-block.html.twig +29 -9
- package/templates/bcl-description-list/description-list.html.twig +14 -10
- package/templates/bcl-event/event.html.twig +2 -2
- package/templates/bcl-fact-figures/fact-figures.html.twig +31 -25
- package/templates/bcl-file/file.html.twig +22 -14
- package/templates/bcl-footer/footer.html.twig +3 -1
- package/templates/bcl-form/form.html.twig +10 -4
- package/templates/bcl-gallery/gallery.html.twig +207 -0
- package/templates/bcl-group/group-landing.html.twig +7 -7
- package/templates/bcl-group/group.html.twig +1 -1
- package/templates/bcl-heading/heading.html.twig +40 -0
- package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +16 -8
- package/templates/bcl-landing-page/landing-page.html.twig +2 -2
- package/templates/bcl-links-block/links-block.html.twig +16 -6
- package/templates/bcl-listing/listing.html.twig +19 -9
- package/templates/bcl-modal/modal.html.twig +4 -1
- package/templates/bcl-offcanvas/offcanvas.html.twig +16 -19
- package/templates/bcl-page/page.html.twig +3 -3
- package/templates/bcl-pagination/pagination.html.twig +123 -9
- package/templates/bcl-person/person.html.twig +44 -0
- package/templates/bcl-progress/progress.html.twig +3 -0
- package/templates/bcl-project/project-lists.html.twig +70 -0
- package/templates/bcl-project/project.html.twig +51 -76
- package/templates/bcl-project-status/project-contributions.html.twig +56 -0
- package/templates/bcl-project-status/project-status.html.twig +14 -44
- package/templates/bcl-recent-activities/recent-activities.html.twig +9 -7
- package/templates/bcl-search/search.html.twig +9 -2
- package/templates/bcl-select/select.html.twig +10 -3
- package/templates/bcl-timeline/timeline.html.twig +22 -18
- package/templates/bcl-user/{user-view-compact.html.twig → user-compact.html.twig} +0 -0
- package/templates/bcl-user/user-terms.html.twig +11 -0
- package/templates/bcl-user/user.html.twig +129 -0
- package/templates/bcl-user/user-edit.html.twig +0 -38
- package/templates/bcl-user/user-view.html.twig +0 -86
package/package.json
CHANGED
|
@@ -2,71 +2,74 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-twig-templates",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.23.0",
|
|
6
6
|
"description": "OE Bcl Twig Templates",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@openeuropa/bcl-accordion": "^0.
|
|
12
|
-
"@openeuropa/bcl-alert": "^0.
|
|
13
|
-
"@openeuropa/bcl-badge": "^0.
|
|
14
|
-
"@openeuropa/bcl-banner": "^0.
|
|
15
|
-
"@openeuropa/bcl-base-templates": "^0.
|
|
16
|
-
"@openeuropa/bcl-blockquote": "^0.
|
|
17
|
-
"@openeuropa/bcl-breadcrumb": "^0.
|
|
18
|
-
"@openeuropa/bcl-button": "^0.
|
|
19
|
-
"@openeuropa/bcl-button-group": "^0.
|
|
20
|
-
"@openeuropa/bcl-card": "^0.
|
|
21
|
-
"@openeuropa/bcl-card-layout": "^0.
|
|
22
|
-
"@openeuropa/bcl-carousel": "^0.
|
|
23
|
-
"@openeuropa/bcl-contact-form": "^0.
|
|
24
|
-
"@openeuropa/bcl-content-banner": "^0.
|
|
25
|
-
"@openeuropa/bcl-date-block": "^0.
|
|
26
|
-
"@openeuropa/bcl-description-list": "^0.
|
|
27
|
-
"@openeuropa/bcl-dropdown": "^0.
|
|
28
|
-
"@openeuropa/bcl-event": "^0.
|
|
29
|
-
"@openeuropa/bcl-fact-figures": "^0.
|
|
30
|
-
"@openeuropa/bcl-featured-media": "^0.
|
|
31
|
-
"@openeuropa/bcl-file": "^0.
|
|
32
|
-
"@openeuropa/bcl-footer": "^0.
|
|
33
|
-
"@openeuropa/bcl-form": "^0.
|
|
34
|
-
"@openeuropa/bcl-form-input": "^0.
|
|
35
|
-
"@openeuropa/bcl-
|
|
36
|
-
"@openeuropa/bcl-
|
|
37
|
-
"@openeuropa/bcl-
|
|
38
|
-
"@openeuropa/bcl-
|
|
39
|
-
"@openeuropa/bcl-
|
|
40
|
-
"@openeuropa/bcl-
|
|
41
|
-
"@openeuropa/bcl-
|
|
42
|
-
"@openeuropa/bcl-
|
|
43
|
-
"@openeuropa/bcl-
|
|
44
|
-
"@openeuropa/bcl-
|
|
45
|
-
"@openeuropa/bcl-
|
|
46
|
-
"@openeuropa/bcl-
|
|
47
|
-
"@openeuropa/bcl-
|
|
48
|
-
"@openeuropa/bcl-
|
|
49
|
-
"@openeuropa/bcl-
|
|
50
|
-
"@openeuropa/bcl-
|
|
51
|
-
"@openeuropa/bcl-
|
|
52
|
-
"@openeuropa/bcl-
|
|
53
|
-
"@openeuropa/bcl-
|
|
54
|
-
"@openeuropa/bcl-
|
|
55
|
-
"@openeuropa/bcl-
|
|
56
|
-
"@openeuropa/bcl-
|
|
57
|
-
"@openeuropa/bcl-
|
|
58
|
-
"@openeuropa/bcl-
|
|
59
|
-
"@openeuropa/bcl-
|
|
60
|
-
"@openeuropa/bcl-
|
|
61
|
-
"@openeuropa/bcl-
|
|
62
|
-
"@openeuropa/bcl-
|
|
63
|
-
"@openeuropa/bcl-
|
|
64
|
-
"@openeuropa/bcl-
|
|
65
|
-
"@openeuropa/bcl-
|
|
66
|
-
"@openeuropa/bcl-
|
|
67
|
-
"@openeuropa/bcl-
|
|
68
|
-
"@openeuropa/bcl-
|
|
69
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-accordion": "^0.23.0",
|
|
12
|
+
"@openeuropa/bcl-alert": "^0.23.0",
|
|
13
|
+
"@openeuropa/bcl-badge": "^0.23.0",
|
|
14
|
+
"@openeuropa/bcl-banner": "^0.23.0",
|
|
15
|
+
"@openeuropa/bcl-base-templates": "^0.23.0",
|
|
16
|
+
"@openeuropa/bcl-blockquote": "^0.23.0",
|
|
17
|
+
"@openeuropa/bcl-breadcrumb": "^0.23.0",
|
|
18
|
+
"@openeuropa/bcl-button": "^0.23.0",
|
|
19
|
+
"@openeuropa/bcl-button-group": "^0.23.0",
|
|
20
|
+
"@openeuropa/bcl-card": "^0.23.0",
|
|
21
|
+
"@openeuropa/bcl-card-layout": "^0.23.0",
|
|
22
|
+
"@openeuropa/bcl-carousel": "^0.23.0",
|
|
23
|
+
"@openeuropa/bcl-contact-form": "^0.23.0",
|
|
24
|
+
"@openeuropa/bcl-content-banner": "^0.23.0",
|
|
25
|
+
"@openeuropa/bcl-date-block": "^0.23.0",
|
|
26
|
+
"@openeuropa/bcl-description-list": "^0.23.0",
|
|
27
|
+
"@openeuropa/bcl-dropdown": "^0.23.0",
|
|
28
|
+
"@openeuropa/bcl-event": "^0.23.0",
|
|
29
|
+
"@openeuropa/bcl-fact-figures": "^0.23.0",
|
|
30
|
+
"@openeuropa/bcl-featured-media": "^0.23.0",
|
|
31
|
+
"@openeuropa/bcl-file": "^0.23.0",
|
|
32
|
+
"@openeuropa/bcl-footer": "^0.23.0",
|
|
33
|
+
"@openeuropa/bcl-form": "^0.23.0",
|
|
34
|
+
"@openeuropa/bcl-form-input": "^0.23.0",
|
|
35
|
+
"@openeuropa/bcl-gallery": "^0.23.0",
|
|
36
|
+
"@openeuropa/bcl-group": "^0.23.0",
|
|
37
|
+
"@openeuropa/bcl-header": "^0.23.0",
|
|
38
|
+
"@openeuropa/bcl-heading": "^0.23.0",
|
|
39
|
+
"@openeuropa/bcl-icon": "^0.23.0",
|
|
40
|
+
"@openeuropa/bcl-inpage-navigation": "^0.23.0",
|
|
41
|
+
"@openeuropa/bcl-landing-page": "^0.23.0",
|
|
42
|
+
"@openeuropa/bcl-language-list": "^0.23.0",
|
|
43
|
+
"@openeuropa/bcl-language-switcher": "^0.23.0",
|
|
44
|
+
"@openeuropa/bcl-link": "^0.23.0",
|
|
45
|
+
"@openeuropa/bcl-links-block": "^0.23.0",
|
|
46
|
+
"@openeuropa/bcl-list-group": "^0.23.0",
|
|
47
|
+
"@openeuropa/bcl-listing": "^0.23.0",
|
|
48
|
+
"@openeuropa/bcl-modal": "^0.23.0",
|
|
49
|
+
"@openeuropa/bcl-multilingual": "^0.23.0",
|
|
50
|
+
"@openeuropa/bcl-navbar": "^0.23.0",
|
|
51
|
+
"@openeuropa/bcl-navigation": "^0.23.0",
|
|
52
|
+
"@openeuropa/bcl-news": "^0.23.0",
|
|
53
|
+
"@openeuropa/bcl-offcanvas": "^0.23.0",
|
|
54
|
+
"@openeuropa/bcl-page": "^0.23.0",
|
|
55
|
+
"@openeuropa/bcl-pagination": "^0.23.0",
|
|
56
|
+
"@openeuropa/bcl-person": "^0.23.0",
|
|
57
|
+
"@openeuropa/bcl-placeholder": "^0.23.0",
|
|
58
|
+
"@openeuropa/bcl-progress": "^0.23.0",
|
|
59
|
+
"@openeuropa/bcl-project": "^0.23.0",
|
|
60
|
+
"@openeuropa/bcl-project-status": "^0.23.0",
|
|
61
|
+
"@openeuropa/bcl-recent-activities": "^0.23.0",
|
|
62
|
+
"@openeuropa/bcl-search": "^0.23.0",
|
|
63
|
+
"@openeuropa/bcl-search-form": "^0.23.0",
|
|
64
|
+
"@openeuropa/bcl-select": "^0.23.0",
|
|
65
|
+
"@openeuropa/bcl-spinner": "^0.23.0",
|
|
66
|
+
"@openeuropa/bcl-subscription": "^0.23.0",
|
|
67
|
+
"@openeuropa/bcl-subscription-block": "^0.23.0",
|
|
68
|
+
"@openeuropa/bcl-table": "^0.23.0",
|
|
69
|
+
"@openeuropa/bcl-textarea": "^0.23.0",
|
|
70
|
+
"@openeuropa/bcl-timeline": "^0.23.0",
|
|
71
|
+
"@openeuropa/bcl-toast": "^0.23.0",
|
|
72
|
+
"@openeuropa/bcl-user": "^0.23.0",
|
|
70
73
|
"copyfiles": "2.4.1",
|
|
71
74
|
"rimraf": "3.0.2"
|
|
72
75
|
},
|
|
@@ -89,5 +92,5 @@
|
|
|
89
92
|
"design-system",
|
|
90
93
|
"twig"
|
|
91
94
|
],
|
|
92
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "fa2097e14024989cddf6f9cd7a9115bed5886aeb"
|
|
93
96
|
}
|
|
@@ -37,6 +37,14 @@
|
|
|
37
37
|
{% set _classes = _classes|merge(['fade', 'show']) %}
|
|
38
38
|
{% endif %}
|
|
39
39
|
|
|
40
|
+
{% set _classes = _classes|merge(['text-dark']) %}
|
|
41
|
+
|
|
42
|
+
{% set _icon_classes = ['flex-shrink-0 me-3 mt-1 align-self-start' ] %}
|
|
43
|
+
|
|
44
|
+
{% if _variant != 'light' %}
|
|
45
|
+
{% set _icon_classes = _icon_classes|merge(['text-' ~ _variant]) %}
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
40
48
|
{% if attributes is empty %}
|
|
41
49
|
{% set attributes = create_attribute() %}
|
|
42
50
|
{% endif %}
|
|
@@ -49,7 +57,7 @@
|
|
|
49
57
|
name: _icon_name ?: _icon_names[_variant],
|
|
50
58
|
size: 's',
|
|
51
59
|
path: _icon_path,
|
|
52
|
-
attributes: create_attribute().addClass(
|
|
60
|
+
attributes: create_attribute().addClass(_icon_classes),
|
|
53
61
|
} only %}
|
|
54
62
|
{% endif %}
|
|
55
63
|
<div class="alert-content flex-grow-1">
|
|
@@ -33,22 +33,25 @@
|
|
|
33
33
|
{% set _classes = _classes|merge([ 'bg-' ~ _background]) %}
|
|
34
34
|
{% endif %}
|
|
35
35
|
|
|
36
|
-
{% if _background in ['light', 'warning'] %}
|
|
37
|
-
{% set _classes = _classes|merge(['text-dark']) %}
|
|
38
|
-
{% endif %}
|
|
39
|
-
|
|
40
36
|
{% if attributes is empty %}
|
|
41
37
|
{% set attributes = create_attribute() %}
|
|
42
38
|
{% endif %}
|
|
43
39
|
|
|
40
|
+
{%- if _url is not empty -%}
|
|
41
|
+
{% set attributes = attributes.setAttribute('title', _title).setAttribute('href', _url) %}
|
|
42
|
+
{%- endif -%}
|
|
43
|
+
|
|
44
44
|
{% set attributes = attributes.addClass(_classes) %}
|
|
45
45
|
|
|
46
46
|
{%- if _url is not empty -%}
|
|
47
|
-
<a
|
|
47
|
+
<a
|
|
48
|
+
{{ attributes }}
|
|
49
|
+
>
|
|
50
|
+
{%- else -%}
|
|
51
|
+
<span
|
|
52
|
+
{{ attributes }}
|
|
53
|
+
>
|
|
48
54
|
{%- endif -%}
|
|
49
|
-
<span
|
|
50
|
-
{{ attributes }}
|
|
51
|
-
>
|
|
52
55
|
{%- if _assistive_text is not empty -%}
|
|
53
56
|
<span class="visually-hidden">
|
|
54
57
|
{{- _assistive_text -}}
|
|
@@ -63,9 +66,10 @@
|
|
|
63
66
|
} only %}
|
|
64
67
|
</span>
|
|
65
68
|
{%- endif -%}
|
|
66
|
-
</span>
|
|
67
69
|
{%- if _url is not empty -%}
|
|
68
70
|
</a>
|
|
71
|
+
{%- else -%}
|
|
72
|
+
</span>
|
|
69
73
|
{%- endif -%}
|
|
70
74
|
|
|
71
75
|
{% endspaceless %}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
{# Parameters:
|
|
4
4
|
- title: (string) (default: "")
|
|
5
5
|
- title_tag: (string) (default: "div")
|
|
6
|
+
- title_link: (link object) (default: {})
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
6
8
|
- description: (string) (default: "")
|
|
7
9
|
- link: (link object) (default: {}): predefined structure for Link component
|
|
8
10
|
- image: (string) <img> tag
|
|
@@ -14,6 +16,8 @@
|
|
|
14
16
|
|
|
15
17
|
{% set _title = title|default('') %}
|
|
16
18
|
{% set _title_tag = title_tag|default('div') %}
|
|
19
|
+
{% set _title_link = title_link|default({}) %}
|
|
20
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
17
21
|
{% set _description = description|default('') %}
|
|
18
22
|
{% set _link = link|default({}) %}
|
|
19
23
|
{% set _image = image|default('') %}
|
|
@@ -28,11 +32,13 @@
|
|
|
28
32
|
{% set _content_class = _content_class ~ " " ~ _content_classes %}
|
|
29
33
|
{% endif %}
|
|
30
34
|
|
|
31
|
-
{% set _title_classes =
|
|
35
|
+
{% set _title_classes = ['display-6'] %}
|
|
32
36
|
{% if _description is not empty or _link is not empty %}
|
|
33
|
-
{% set _title_classes = _title_classes
|
|
37
|
+
{% set _title_classes = _title_classes|merge(['mb-3']) %}
|
|
34
38
|
{% endif %}
|
|
35
39
|
|
|
40
|
+
{% set _title_attributes = _title_attributes.addClass(_title_classes) %}
|
|
41
|
+
|
|
36
42
|
{% set _classes = [
|
|
37
43
|
'bcl-banner',
|
|
38
44
|
_shade ? 'shade',
|
|
@@ -53,14 +59,19 @@
|
|
|
53
59
|
{% endif %}
|
|
54
60
|
<div class="container">
|
|
55
61
|
<div class="{{ _content_class }}">
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
{% if _title is not empty %}
|
|
63
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
64
|
+
title: _title,
|
|
65
|
+
title_tag: _title_tag,
|
|
66
|
+
title_link: _title_link,
|
|
67
|
+
attributes: _title_attributes,
|
|
68
|
+
} only %}
|
|
63
69
|
{% endif %}
|
|
70
|
+
{% if _description is not empty %}
|
|
71
|
+
<p class="mb-4">{{ _description }}</p>
|
|
72
|
+
{% endif %}
|
|
73
|
+
{% if _link.path %}
|
|
74
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
64
75
|
{% endif %}
|
|
65
76
|
</div>
|
|
66
77
|
</div>
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
{% block related %}
|
|
117
117
|
{{ related }}
|
|
118
118
|
{% endblock %}
|
|
119
|
+
{% block share %}
|
|
120
|
+
{{ share }}
|
|
121
|
+
{% endblock %}
|
|
119
122
|
</div>
|
|
120
123
|
</div>
|
|
121
124
|
</main>
|
|
@@ -123,9 +126,6 @@
|
|
|
123
126
|
{% block feedback %}
|
|
124
127
|
{{ feedback }}
|
|
125
128
|
{% endblock %}
|
|
126
|
-
{% block share %}
|
|
127
|
-
{{ share }}
|
|
128
|
-
{% endblock %}
|
|
129
129
|
|
|
130
130
|
{% if _with_footer %}
|
|
131
131
|
{% include '@oe-bcl/bcl-footer/footer.html.twig' with footer only %}
|
|
@@ -1,53 +1,63 @@
|
|
|
1
1
|
{#
|
|
2
2
|
Parameters:
|
|
3
|
+
- title: (string) (default: '')
|
|
4
|
+
- title_tag: (string) (default: 'h2')
|
|
5
|
+
- title_link: (link object) (default: {})
|
|
6
|
+
- title_attributes (drupal attrs)
|
|
3
7
|
- listing (object) (default: {})
|
|
4
8
|
- pagination (object) (default: {})
|
|
5
9
|
- sidebar (object) (default: '')
|
|
6
|
-
- page_title (string) (default: '')
|
|
7
10
|
#}
|
|
8
11
|
|
|
9
12
|
{% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
|
|
10
13
|
|
|
14
|
+
{% set _title = title|default('') %}
|
|
15
|
+
{% set _title_tag = title_tag|default('h2') %}
|
|
16
|
+
{% set _title_link = title_link|default({}) %}
|
|
17
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
11
18
|
{% set _listing = listing|default({}) %}
|
|
12
19
|
{% set _pagination = pagination|default({}) %}
|
|
13
20
|
{% set _search = search|default({}) %}
|
|
14
21
|
{% set _sidebar = sidebar|default({}) %}
|
|
15
|
-
|
|
22
|
+
|
|
23
|
+
{% set _title_attributes = _title_attributes ?: create_attribute() %}
|
|
16
24
|
|
|
17
25
|
{% block content_top %}
|
|
18
26
|
{% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
|
|
19
27
|
<div class="row">
|
|
20
|
-
<div class="col-md-6 col-lg-8">
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<div class="col-md-12 order-md-2 mt-3 mt-md-1">
|
|
29
|
-
{% if badges is not empty and badges is iterable %}
|
|
30
|
-
{% for badge in badges %}
|
|
31
|
-
{% include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
|
|
32
|
-
attributes: create_attribute().addClass(["mb-2", "me-2"])
|
|
33
|
-
}) only %}
|
|
34
|
-
{% endfor %}
|
|
28
|
+
<div class="col-md-6 col-lg-8 align-self-center">
|
|
29
|
+
{% if _title is not empty %}
|
|
30
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
31
|
+
title: _title ~ ' (' ~ listing.items.length ~ ')',
|
|
32
|
+
title_tag: _title_tag,
|
|
33
|
+
title_link: _title_link,
|
|
34
|
+
attributes: _title_attributes.addClass(['mb-0', 'text-capitalize']),
|
|
35
|
+
} only %}
|
|
35
36
|
{% endif %}
|
|
36
37
|
</div>
|
|
38
|
+
{% if badges is not empty and badges is iterable %}
|
|
39
|
+
<div class="col-md-12 order-md-2 mt-3">
|
|
40
|
+
{% for badge in badges %}
|
|
41
|
+
{% include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
|
|
42
|
+
attributes: create_attribute().addClass(["mb-2", "me-2"])
|
|
43
|
+
}) only %}
|
|
44
|
+
{% endfor %}
|
|
45
|
+
</div>
|
|
46
|
+
{% endif %}
|
|
37
47
|
<div class="col-md-6 col-lg-4 mt-3 mt-md-0">
|
|
38
48
|
<div class="float-md-end d-md-flex align-items-center mb-4 mb-md-0">
|
|
39
49
|
{% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
|
|
40
|
-
attributes: create_attribute().addClass(['ms-md-2
|
|
50
|
+
attributes: create_attribute().addClass(['ms-md-2']),
|
|
41
51
|
}) only %}
|
|
42
52
|
</div>
|
|
43
53
|
</div>
|
|
44
54
|
</div>
|
|
45
|
-
<hr class="d-none d-md-block mb-4"/>
|
|
55
|
+
<hr class="d-none d-md-block mb-4-75"/>
|
|
46
56
|
{% endblock %}
|
|
47
57
|
|
|
48
58
|
{% block content %}
|
|
49
59
|
{% if _listing is not empty %}
|
|
50
|
-
{% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing %}
|
|
60
|
+
{% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing only %}
|
|
51
61
|
{% endif %}
|
|
52
62
|
{% endblock %}
|
|
53
63
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{% spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- title (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
classes: ''
|
|
9
|
-
}
|
|
4
|
+
- title: (string) (default: '')
|
|
5
|
+
- title_tag: (string) (default: 'h5')
|
|
6
|
+
- title_link: (link object) (default: {})
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
10
8
|
- subtitle (object) (default: {})
|
|
11
9
|
format: {
|
|
12
10
|
content: '',
|
|
@@ -47,10 +45,14 @@
|
|
|
47
45
|
|
|
48
46
|
Blocks
|
|
49
47
|
- card_date
|
|
50
|
-
-
|
|
48
|
+
- card_badges
|
|
49
|
+
- card_links
|
|
51
50
|
#}
|
|
52
51
|
|
|
53
|
-
{% set _title = title|default(
|
|
52
|
+
{% set _title = title|default('') %}
|
|
53
|
+
{% set _title_tag = title_tag|default('h1') %}
|
|
54
|
+
{% set _title_link = title_link|default({}) %}
|
|
55
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
54
56
|
{% set _subtitle = subtitle|default({}) %}
|
|
55
57
|
{% set _text = text|default({}) %}
|
|
56
58
|
{% set _content = content|default('') %}
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
{% set _extra_classes_header = extra_classes_header|default('') %}
|
|
71
73
|
{% set _extra_classes_footer = extra_classes_footer|default('') %}
|
|
72
74
|
{% set _badges = badges|default([]) %}
|
|
75
|
+
{% set _links = links|default([]) %}
|
|
73
76
|
{% set _classes = ['card'] %}
|
|
74
77
|
{% if _text_color is not empty %}
|
|
75
78
|
{% set _classes = _classes|merge(['text-' ~ _text_color]) %}
|
|
@@ -114,7 +117,7 @@
|
|
|
114
117
|
|
|
115
118
|
{% set attributes = attributes.addClass(_classes) %}
|
|
116
119
|
|
|
117
|
-
<
|
|
120
|
+
<article
|
|
118
121
|
{{ attributes }}
|
|
119
122
|
>
|
|
120
123
|
{% if _card_header is not empty %}
|
|
@@ -169,16 +172,18 @@
|
|
|
169
172
|
<div class='{{ _horizontal_grid.right_col_classes }}'>
|
|
170
173
|
{% endif %}
|
|
171
174
|
<div class='{{ _body_classes }}'>
|
|
172
|
-
{
|
|
173
|
-
{%
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
{% if _title is not empty %}
|
|
176
|
+
{% if _title_attributes.class is empty %}
|
|
177
|
+
{% set _title_attributes = _title_attributes.addClass('fs-5') %}
|
|
178
|
+
{% endif %}
|
|
179
|
+
{% set _title_attributes = _title_attributes.addClass('card-title') %}
|
|
180
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
181
|
+
title: _title,
|
|
182
|
+
title_tag: _title_tag,
|
|
183
|
+
title_link: _title_link,
|
|
184
|
+
attributes: _title_attributes,
|
|
185
|
+
} only %}
|
|
186
|
+
{% endif %}
|
|
182
187
|
{%- if _subtitle is not empty -%}
|
|
183
188
|
{% set _subtitle_tag = _subtitle.tag ?? 'h6' %}
|
|
184
189
|
<{{ _subtitle_tag }}
|
|
@@ -198,31 +203,42 @@
|
|
|
198
203
|
{%- if _content is not empty -%}
|
|
199
204
|
{{- _content -}}
|
|
200
205
|
{%- endif -%}
|
|
201
|
-
{
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
{%
|
|
205
|
-
{%
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
attributes: _badge.attributes.addClass('mb-2')
|
|
211
|
-
})
|
|
212
|
-
%}
|
|
213
|
-
{% if not loop.last %}
|
|
206
|
+
{% block card_badges %}
|
|
207
|
+
{%- if _badges is not empty and _badges is iterable -%}
|
|
208
|
+
<div class="mt-2-5">
|
|
209
|
+
{% for _badge in _badges %}
|
|
210
|
+
{% if _badge.attributes is empty %}
|
|
211
|
+
{% set _badge = _badge|merge({
|
|
212
|
+
attributes: create_attribute()
|
|
213
|
+
}) %}
|
|
214
|
+
{% endif %}
|
|
214
215
|
{% set _badge = _badge|merge({
|
|
215
|
-
attributes: _badge.attributes.addClass('
|
|
216
|
+
attributes: _badge.attributes.addClass('mb-2')
|
|
216
217
|
})
|
|
217
218
|
%}
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
{% if not loop.last %}
|
|
220
|
+
{% set _badge = _badge|merge({
|
|
221
|
+
attributes: _badge.attributes.addClass('me-2')
|
|
222
|
+
})
|
|
223
|
+
%}
|
|
224
|
+
{% endif %}
|
|
220
225
|
{% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
{
|
|
226
|
+
|
|
227
|
+
{% endfor %}
|
|
228
|
+
</div>
|
|
229
|
+
{%- endif -%}
|
|
230
|
+
{% endblock %}
|
|
231
|
+
{% block card_links %}
|
|
232
|
+
{%- if _links is not empty and _links is iterable -%}
|
|
233
|
+
<div class="mt-2-5 mb-2">
|
|
234
|
+
{% for _link in _links %}
|
|
235
|
+
<div class="mb-3 mb-md-0 d-block d-md-inline-block me-4-5">
|
|
236
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
237
|
+
</div>
|
|
238
|
+
{% endfor %}
|
|
239
|
+
</div>
|
|
240
|
+
{%- endif -%}
|
|
241
|
+
{% endblock %}
|
|
226
242
|
</div>
|
|
227
243
|
{% if _horizontal %}
|
|
228
244
|
</div>
|
|
@@ -257,6 +273,6 @@
|
|
|
257
273
|
{{- _card_footer -}}
|
|
258
274
|
</div>
|
|
259
275
|
{% endif %}
|
|
260
|
-
</
|
|
276
|
+
</article>
|
|
261
277
|
|
|
262
278
|
{% endspaceless %}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
image: (string) <img> tag
|
|
12
12
|
caption (string)
|
|
13
13
|
caption_classes (string)
|
|
14
|
+
caption_title (string)
|
|
14
15
|
interval (integer) (default: 0)
|
|
15
16
|
}
|
|
16
17
|
...
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
- previous_label (string) (default: '')
|
|
21
22
|
- next_label (string) (default: '')
|
|
22
23
|
- with_indicators (boolean) (default: false)
|
|
24
|
+
- rounded_indicators (boolean) (default: false)
|
|
23
25
|
#}
|
|
24
26
|
|
|
25
27
|
{% set _id = id|default('') %}
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
{% set _prev_label = prev_label|default('') %}
|
|
30
32
|
{% set _next_label = next_label|default('') %}
|
|
31
33
|
{% set _with_indicators = with_indicators|default(false) %}
|
|
34
|
+
{% set _rounded_indicators = rounded_indicators|default(false) %}
|
|
32
35
|
{% set _classes = ['carousel slide'] %}
|
|
33
36
|
{% set _autoinit = autoinit ?? true %}
|
|
34
37
|
{% set _autoplay = autoplay ?? true %}
|
|
@@ -59,6 +62,10 @@
|
|
|
59
62
|
{% set attributes = attributes.setAttribute('data-bs-touch', 'false') %}
|
|
60
63
|
{% endif %}
|
|
61
64
|
|
|
65
|
+
{% if _rounded_indicators %}
|
|
66
|
+
{% set attributes = attributes.addClass('rounded-indicators') %}
|
|
67
|
+
{% endif %}
|
|
68
|
+
|
|
62
69
|
{% if not _autoplay %}
|
|
63
70
|
{% set attributes = attributes.setAttribute('data-bs-interval', 'false') %}
|
|
64
71
|
{% endif %}
|
|
@@ -69,7 +76,7 @@
|
|
|
69
76
|
{{ attributes }}
|
|
70
77
|
>
|
|
71
78
|
{% if _with_indicators %}
|
|
72
|
-
<div class="carousel-indicators">
|
|
79
|
+
<div class="carousel-indicators d-none d-md-flex">
|
|
73
80
|
{% for _i in 0..(_items|length - 1) %}
|
|
74
81
|
{% set button_attributes = create_attribute()
|
|
75
82
|
.setAttribute('aria-label', 'Slide ' ~ (_i + 1))
|
|
@@ -102,15 +109,29 @@
|
|
|
102
109
|
{% if _item.image is defined and _item.image is not empty %}
|
|
103
110
|
{{ _item.image }}
|
|
104
111
|
{% endif %}
|
|
105
|
-
{% if _item.caption is defined and _item.caption is not empty %}
|
|
112
|
+
{% if (_item.caption is defined and _item.caption is not empty) or (_item.link is defined and _item.link is not empty) %}
|
|
106
113
|
{% set _caption_classes = 'carousel-caption' %}
|
|
107
|
-
{% if _item.
|
|
108
|
-
{% set _caption_classes = _caption_classes ~ ' '
|
|
114
|
+
{% if _item.caption is not empty and _item.link is empty %}
|
|
115
|
+
{% set _caption_classes = _caption_classes ~ ' d-none d-md-block' %}
|
|
109
116
|
{% endif %}
|
|
110
117
|
<div
|
|
111
118
|
class="{{ _caption_classes }}"
|
|
112
119
|
>
|
|
113
|
-
{
|
|
120
|
+
{% if _item.caption is not empty or _item.caption_title is not empty %}
|
|
121
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty %}
|
|
122
|
+
<div class="{{ _item.caption_classes }}">
|
|
123
|
+
{% endif %}
|
|
124
|
+
{% if _item.caption_title is not empty %}
|
|
125
|
+
<h5>{{ _item.caption_title }}</h5>
|
|
126
|
+
{% endif %}
|
|
127
|
+
{{- _item.caption -}}
|
|
128
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty %}
|
|
129
|
+
</div>
|
|
130
|
+
{% endif %}
|
|
131
|
+
{% endif %}
|
|
132
|
+
{% if _item.link is defined and _item.link is not empty %}
|
|
133
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _item.link only %}
|
|
134
|
+
{% endif %}
|
|
114
135
|
</div>
|
|
115
136
|
{% endif %}
|
|
116
137
|
</div>
|