@openeuropa/bcl-project 0.21.0 → 0.23.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 +9 -8
- package/project-lists.html.twig +70 -0
- package/project.html.twig +51 -76
package/package.json
CHANGED
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-project",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.23.1",
|
|
6
6
|
"description": "OE - BCL Project",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-base-templates": "^0.
|
|
12
|
-
"@openeuropa/bcl-carousel": "^0.
|
|
13
|
-
"@openeuropa/bcl-description-list": "^0.
|
|
14
|
-
"@openeuropa/bcl-featured-media": "^0.
|
|
15
|
-
"@openeuropa/bcl-
|
|
16
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-base-templates": "^0.23.1",
|
|
12
|
+
"@openeuropa/bcl-carousel": "^0.23.1",
|
|
13
|
+
"@openeuropa/bcl-description-list": "^0.23.1",
|
|
14
|
+
"@openeuropa/bcl-featured-media": "^0.23.1",
|
|
15
|
+
"@openeuropa/bcl-heading": "^0.23.1",
|
|
16
|
+
"@openeuropa/bcl-inpage-navigation": "^0.23.1",
|
|
17
|
+
"@openeuropa/bcl-project-status": "^0.23.1"
|
|
17
18
|
},
|
|
18
19
|
"repository": {
|
|
19
20
|
"type": "git",
|
|
@@ -29,5 +30,5 @@
|
|
|
29
30
|
"design-system",
|
|
30
31
|
"twig"
|
|
31
32
|
],
|
|
32
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "927e89290a185b5e578065e44e81cb99b0b47c12"
|
|
33
34
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{% spaceless %}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
{#
|
|
5
|
+
Parameters:
|
|
6
|
+
- title (heading object) (default: {})
|
|
7
|
+
- items (array) (default: [])
|
|
8
|
+
{
|
|
9
|
+
title: (heading object),
|
|
10
|
+
content: [
|
|
11
|
+
description list object
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
#}
|
|
15
|
+
|
|
16
|
+
{% set _title = title|default('') %}
|
|
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
|
+
|
|
22
|
+
{% if attributes is empty %}
|
|
23
|
+
{% set attributes = create_attribute() %}
|
|
24
|
+
{% endif %}
|
|
25
|
+
|
|
26
|
+
{% set _title_classes = ['my-4-5'] %}
|
|
27
|
+
{% set _title_attributes = _title_attributes.addClass(_title_classes) %}
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
{{ attributes }}
|
|
31
|
+
>
|
|
32
|
+
{% if _title is not empty %}
|
|
33
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
34
|
+
title: _title,
|
|
35
|
+
title_tag: _title_tag,
|
|
36
|
+
title_link: _title_link,
|
|
37
|
+
attributes: _title_attributes,
|
|
38
|
+
} only %}
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% if _items is defined and _items is not empty %}
|
|
41
|
+
{% for _item in _items %}
|
|
42
|
+
{% if _item.title is not empty %}
|
|
43
|
+
{% set _item_title_attributes = _item.title_attributes ?: create_attribute() %}
|
|
44
|
+
{% set _item_title_attributes = _item_title_attributes.addClass(['mb-3']) %}
|
|
45
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
46
|
+
title: _item.title,
|
|
47
|
+
title_tag: _item.title_tag|default('h3'),
|
|
48
|
+
title_link: _item.title_link|default({}),
|
|
49
|
+
attributes: _item_title_attributes,
|
|
50
|
+
} only %}
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% for _list in _item.content %}
|
|
53
|
+
{% if _list.attributes is empty %}
|
|
54
|
+
{% set _list = _list|merge({
|
|
55
|
+
attributes: create_attribute()
|
|
56
|
+
}) %}
|
|
57
|
+
{% endif %}
|
|
58
|
+
{% if not loop.last %}
|
|
59
|
+
{% set _list = _list|merge({
|
|
60
|
+
attributes: _list.attributes.addClass(['border-bottom', 'pb-3'])
|
|
61
|
+
})
|
|
62
|
+
%}
|
|
63
|
+
{% endif %}
|
|
64
|
+
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with _list only %}
|
|
65
|
+
{% endfor %}
|
|
66
|
+
{% endfor %}
|
|
67
|
+
{% endif %}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{% endspaceless %}
|
package/project.html.twig
CHANGED
|
@@ -5,99 +5,74 @@
|
|
|
5
5
|
{% endblock %}
|
|
6
6
|
|
|
7
7
|
{% block content %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
{% if project_status_title is not empty %}
|
|
9
|
+
{% set _project_title_attributes = create_attribute().addClass(['mb-4']) %}
|
|
10
|
+
{% if project_status_id is not empty %}
|
|
11
|
+
{% set _project_title_attributes = _project_title_attributes.setAttribute('id', project_status_id) %}
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
14
|
+
title: project_status_title,
|
|
15
|
+
title_tag: 'h2',
|
|
16
|
+
attributes: _project_title_attributes,
|
|
17
|
+
} only %}
|
|
16
18
|
{% endif %}
|
|
17
|
-
{%
|
|
18
|
-
|
|
19
|
-
{% if status_lists.main_title is not empty %}
|
|
20
|
-
<h3
|
|
21
|
-
class="fw-bold my-4"
|
|
22
|
-
{% if status_lists.main_title_id is not empty %}
|
|
23
|
-
id="{{ status_lists.main_title_id }}"
|
|
24
|
-
{% endif %}
|
|
25
|
-
>{{- status_lists.main_title -}}</h3>
|
|
19
|
+
{% if project_status is not empty %}
|
|
20
|
+
{% include '@oe-bcl/bcl-project-status/project-status.html.twig' with project_status %}
|
|
26
21
|
{% endif %}
|
|
27
|
-
{% if
|
|
28
|
-
{%
|
|
29
|
-
{% if lists.title is not empty %}
|
|
30
|
-
<h4 class="fw-bold mb-3">{{ lists.title }}</h4>
|
|
31
|
-
{% endif %}
|
|
32
|
-
{% for list in lists.content %}
|
|
33
|
-
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with list only %}
|
|
34
|
-
{% endfor %}
|
|
35
|
-
{% endfor %}
|
|
22
|
+
{% if project_contributions is not empty %}
|
|
23
|
+
{% include '@oe-bcl/bcl-project-status/project-contributions.html.twig' with project_contributions %}
|
|
36
24
|
{% endif %}
|
|
37
25
|
|
|
38
|
-
{% if
|
|
39
|
-
{%
|
|
40
|
-
|
|
41
|
-
class="fw-bold mb-4 pt-3"
|
|
42
|
-
id="{{ paragraph.title_id }}"
|
|
43
|
-
>
|
|
44
|
-
{{- paragraph.title -}}
|
|
45
|
-
</h3>
|
|
26
|
+
{% if status_lists is not empty %}
|
|
27
|
+
{% include '@oe-bcl/bcl-project/project-lists.html.twig' with status_lists only %}
|
|
28
|
+
{% endif %}
|
|
46
29
|
|
|
47
|
-
|
|
30
|
+
{% if first_paragraphs is defined and first_paragraphs is not empty %}
|
|
31
|
+
{% for _paragraph in first_paragraphs %}
|
|
32
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
33
|
+
title: _paragraph.title,
|
|
34
|
+
title_tag: 'h2',
|
|
35
|
+
attributes: create_attribute().addClass(['mb-4', 'pt-3'])
|
|
36
|
+
.setAttribute('id', _paragraph.title_id),
|
|
37
|
+
} only %}
|
|
38
|
+
{{- _paragraph.content -}}
|
|
48
39
|
{% endfor %}
|
|
49
40
|
{% endif %}
|
|
50
41
|
|
|
51
|
-
{% if
|
|
52
|
-
|
|
53
|
-
class="fw-bold my-4"
|
|
54
|
-
{% if content_lists.main_title_id is not empty %}
|
|
55
|
-
id="{{ content_lists.main_title_id }}"
|
|
56
|
-
{% endif %}
|
|
57
|
-
>{{- content_lists.main_title -}}</h3>
|
|
42
|
+
{% if featured_lists is not empty %}
|
|
43
|
+
{% include '@oe-bcl/bcl-project/project-lists.html.twig' with featured_lists only %}
|
|
58
44
|
{% endif %}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<h4 class="fw-bold mb-3">{{ lists.title }}</h4>
|
|
63
|
-
{% endif %}
|
|
64
|
-
{% for list in lists.content %}
|
|
65
|
-
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with list only %}
|
|
66
|
-
{% endfor %}
|
|
67
|
-
{% endfor %}
|
|
45
|
+
|
|
46
|
+
{% if content_lists is not empty %}
|
|
47
|
+
{% include '@oe-bcl/bcl-project/project-lists.html.twig' with content_lists only %}
|
|
68
48
|
{% endif %}
|
|
69
49
|
|
|
70
50
|
{% if second_paragraphs is defined and second_paragraphs is not empty %}
|
|
71
|
-
{% for
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{{-
|
|
51
|
+
{% for _paragraph in second_paragraphs %}
|
|
52
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
53
|
+
title: _paragraph.title,
|
|
54
|
+
title_tag: 'h2',
|
|
55
|
+
attributes: create_attribute().addClass(['mb-4', 'pt-3'])
|
|
56
|
+
.setAttribute('id', _paragraph.title_id),
|
|
57
|
+
} only %}
|
|
58
|
+
{{- _paragraph.content -}}
|
|
79
59
|
{% endfor %}
|
|
80
60
|
{% endif %}
|
|
81
61
|
|
|
82
62
|
{% if gallery.main_title is not empty %}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{%
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
63
|
+
{% set _gallery_title_attributes = create_attribute().addClass(['my-4']) %}
|
|
64
|
+
{% if gallery.main_title_id is not empty %}
|
|
65
|
+
{% set _gallery_title_attributes = _gallery_title_attributes.setAttribute('id', gallery.main_title_id) %}
|
|
66
|
+
{% endif %}
|
|
67
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
68
|
+
title: gallery.main_title,
|
|
69
|
+
title_tag: 'h2',
|
|
70
|
+
attributes: _gallery_title_attributes,
|
|
71
|
+
} only %}
|
|
89
72
|
{% endif %}
|
|
90
|
-
{% if gallery
|
|
91
|
-
<div class="mt-3">
|
|
92
|
-
{%
|
|
93
|
-
<div class="mb-2-5 pb-4">
|
|
94
|
-
{% if showcase.carousel %}
|
|
95
|
-
{% include '@oe-bcl/bcl-carousel/carousel.html.twig' with showcase only %}
|
|
96
|
-
{% else %}
|
|
97
|
-
{% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with showcase only %}
|
|
98
|
-
{% endif %}
|
|
99
|
-
</div>
|
|
100
|
-
{% endfor %}
|
|
73
|
+
{% if gallery is not empty %}
|
|
74
|
+
<div class="mt-3 mb-4-5">
|
|
75
|
+
{% include '@oe-bcl/bcl-gallery/gallery.html.twig' with gallery only %}
|
|
101
76
|
</div>
|
|
102
77
|
{% endif %}
|
|
103
78
|
|