@openeuropa/bcl-project 0.19.0 → 0.22.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 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.19.0",
5
+ "version": "0.22.0",
6
6
  "description": "OE - BCL Project",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-base-templates": "^0.19.0",
12
- "@openeuropa/bcl-carousel": "^0.19.0",
13
- "@openeuropa/bcl-description-list": "^0.19.0",
14
- "@openeuropa/bcl-featured-media": "^0.19.0",
15
- "@openeuropa/bcl-inpage-navigation": "^0.19.0",
16
- "@openeuropa/bcl-project-status": "^0.19.0"
11
+ "@openeuropa/bcl-base-templates": "^0.22.0",
12
+ "@openeuropa/bcl-carousel": "^0.22.0",
13
+ "@openeuropa/bcl-description-list": "^0.22.0",
14
+ "@openeuropa/bcl-featured-media": "^0.22.0",
15
+ "@openeuropa/bcl-heading": "^0.22.0",
16
+ "@openeuropa/bcl-inpage-navigation": "^0.22.0",
17
+ "@openeuropa/bcl-project-status": "^0.22.0"
17
18
  },
18
19
  "repository": {
19
20
  "type": "git",
@@ -29,5 +30,5 @@
29
30
  "design-system",
30
31
  "twig"
31
32
  ],
32
- "gitHead": "8bfce06400c8829a46578797f0126b4e9c02e725"
33
+ "gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
33
34
  }
@@ -0,0 +1,67 @@
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('h3') %}
18
+ {% set _title_attributes = title_attributes ?: create_attribute() %}
19
+ {% set _items = items|default([]) %}
20
+
21
+ {% if attributes is empty %}
22
+ {% set attributes = create_attribute() %}
23
+ {% endif %}
24
+
25
+ {% set _title_classes = ['fw-bold', 'my-4-5'] %}
26
+ {% set _title_attributes = _title_attributes.addClass(_title_classes) %}
27
+
28
+ <div
29
+ {{ attributes }}
30
+ >
31
+ {% if _title is not empty %}
32
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
33
+ title: _title,
34
+ title_tag: _title_tag,
35
+ attributes: _title_attributes,
36
+ } only %}
37
+ {% endif %}
38
+ {% if _items is defined and _items is not empty %}
39
+ {% for _item in _items %}
40
+ {% if _item.title is not empty %}
41
+ {% set _item_title_attributes = _item.title_attributes ?: create_attribute() %}
42
+ {% set _item_title_attributes = _item_title_attributes.addClass(['fw-bold', 'mb-3']) %}
43
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
44
+ title: _item.title,
45
+ title_tag: _item.title_tag|default('h4'),
46
+ attributes: _item_title_attributes,
47
+ } only %}
48
+ {% endif %}
49
+ {% for _list in _item.content %}
50
+ {% if _list.attributes is empty %}
51
+ {% set _list = _list|merge({
52
+ attributes: create_attribute()
53
+ }) %}
54
+ {% endif %}
55
+ {% if not loop.last %}
56
+ {% set _list = _list|merge({
57
+ attributes: _list.attributes.addClass(['border-bottom', 'pb-3'])
58
+ })
59
+ %}
60
+ {% endif %}
61
+ {% include '@oe-bcl/bcl-description-list/description-list.html.twig' with _list only %}
62
+ {% endfor %}
63
+ {% endfor %}
64
+ {% endif %}
65
+ </div>
66
+
67
+ {% endspaceless %}
package/project.html.twig CHANGED
@@ -5,56 +5,91 @@
5
5
  {% endblock %}
6
6
 
7
7
  {% block content %}
8
- {% include '@oe-bcl/bcl-project-status/project-status.html.twig' with project_details|merge({ charts: charts }) %}
8
+ {% if project_status_title is not empty %}
9
+ {% set _project_title_attributes = create_attribute().addClass(['fw-bold', '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: 'h3',
16
+ attributes: _project_title_attributes,
17
+ } only %}
18
+ {% endif %}
19
+ {% if project_status is not empty %}
20
+ {% include '@oe-bcl/bcl-project-status/project-status.html.twig' with project_status %}
21
+ {% endif %}
22
+ {% if project_contributions is not empty %}
23
+ {% include '@oe-bcl/bcl-project-status/project-contributions.html.twig' with project_contributions %}
24
+ {% endif %}
9
25
 
10
- <div class="border-bottom mb-4">
11
- {% include '@oe-bcl/bcl-description-list/description-list.html.twig' with details_list only %}
26
+ {% if status_lists is not empty %}
27
+ {% include '@oe-bcl/bcl-project/project-lists.html.twig' with status_lists only %}
28
+ {% endif %}
29
+
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: 'h3',
35
+ attributes: create_attribute().addClass(['fw-bold', 'mb-4', 'pt-3'])
36
+ .setAttribute('id', _paragraph.title_id),
37
+ } only %}
38
+ {{- _paragraph.content -}}
39
+ {% endfor %}
40
+ {% endif %}
41
+
42
+ {% if featured_lists is not empty %}
43
+ {% include '@oe-bcl/bcl-project/project-lists.html.twig' with featured_lists only %}
44
+ {% endif %}
45
+
46
+ {% if content_lists is not empty %}
47
+ {% include '@oe-bcl/bcl-project/project-lists.html.twig' with content_lists only %}
48
+ {% endif %}
49
+
50
+ {% if second_paragraphs is defined and second_paragraphs is not empty %}
51
+ {% for _paragraph in second_paragraphs %}
52
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
53
+ title: _paragraph.title,
54
+ title_tag: 'h3',
55
+ attributes: create_attribute().addClass(['fw-bold', 'mb-4', 'pt-3'])
56
+ .setAttribute('id', _paragraph.title_id),
57
+ } only %}
58
+ {{- _paragraph.content -}}
59
+ {% endfor %}
60
+ {% endif %}
61
+
62
+ {% if gallery.main_title is not empty %}
63
+ {% set _gallery_title_attributes = create_attribute().addClass(['fw-bold', '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: 'h3',
70
+ attributes: _gallery_title_attributes,
71
+ } only %}
72
+ {% endif %}
73
+ {% if gallery.items is defined and gallery.items is not empty %}
74
+ <div class="mt-3">
75
+ {% for _showcase in gallery.items %}
76
+ <div class="mb-2-5 pb-4">
77
+ {% if _showcase.carousel %}
78
+ {% include '@oe-bcl/bcl-carousel/carousel.html.twig' with _showcase only %}
79
+ {% else %}
80
+ {% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with _showcase only %}
81
+ {% endif %}
82
+ </div>
83
+ {% endfor %}
12
84
  </div>
85
+ {% endif %}
86
+
87
+ {% if social_block is not empty %}
88
+ {% block social_block %}
89
+ {{ social_buttons }}
90
+ {% include '@oe-bcl/bcl-button/button.html.twig' with button_social_modal only %}
91
+ {% include '@oe-bcl/bcl-modal/modal.html.twig' with social_modal only %}
92
+ {% endblock %}
93
+ {% endif %}
13
94
 
14
- {% include '@oe-bcl/bcl-description-list/description-list.html.twig' with coordinator_list only %}
15
-
16
- {% for paragraph in paragraphs %}
17
- <h3
18
- class="fw-bold mb-4 pt-3"
19
- id="{{ paragraph.title_id }}"
20
- >
21
- {{ paragraph.title }}
22
- </h3>
23
-
24
- {{ paragraph.content }}
25
- {% endfor %}
26
-
27
- <h3
28
- class="fw-bold mb-4 pt-2"
29
- id="{{ contributors.main_title_id }}"
30
- >
31
- {{ contributors.main_title }}
32
- </h3>
33
-
34
- {% for contributor in contributors.listing %}
35
- <h4 class="fw-bold mb-3">{{ contributor.title }}</h4>
36
-
37
- {% include '@oe-bcl/bcl-description-list/description-list.html.twig' with contributor.list only %}
38
-
39
- {% endfor %}
40
-
41
- {% for achievement in achievements %}
42
- <h3
43
- class="fw-bold mb-4 pt-2"
44
- id="{{ achievement.title_id }}"
45
- >
46
- {{ achievement.title }}
47
- </h3>
48
- {{ achievement.content }}
49
- {% endfor %}
50
-
51
- <h3
52
- class="fw-bold mb-4 pt-2"
53
- id="{{ gallery.title_id }}"
54
- >
55
- {{ gallery.title }}
56
- </h3>
57
-
58
- {% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with gallery.featured only %}
59
- {% include '@oe-bcl/bcl-carousel/carousel.html.twig' with gallery.carousel only %}
60
95
  {% endblock %}