@openeuropa/bcl-theme-joinup 0.26.0 → 0.27.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.
Files changed (65) hide show
  1. package/icons/bcl-default-icons.svg +1 -1
  2. package/js/oe-bcl-joinup.bundle.js +60 -49
  3. package/js/oe-bcl-joinup.bundle.js.map +1 -1
  4. package/js/oe-bcl-joinup.bundle.min.js +1 -1
  5. package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
  6. package/js/oe-bcl-joinup.umd.js +60 -49
  7. package/js/oe-bcl-joinup.umd.js.map +1 -1
  8. package/js/oe-bcl-joinup.umd.min.js +1 -1
  9. package/js/oe-bcl-joinup.umd.min.js.map +1 -1
  10. package/package.json +7 -7
  11. package/templates/bcl-accordion/accordion.html.twig +2 -2
  12. package/templates/bcl-alert/alert.html.twig +2 -2
  13. package/templates/bcl-badge/badge.html.twig +2 -2
  14. package/templates/bcl-banner/banner.html.twig +2 -2
  15. package/templates/bcl-base-templates/content-type.html.twig +2 -2
  16. package/templates/bcl-blockquote/blockquote.html.twig +2 -2
  17. package/templates/bcl-breadcrumb/breadcrumb.html.twig +2 -2
  18. package/templates/bcl-button/button.html.twig +2 -2
  19. package/templates/bcl-button-group/button-group.html.twig +2 -2
  20. package/templates/bcl-card/card.html.twig +2 -2
  21. package/templates/bcl-card-layout/card-layout.html.twig +2 -2
  22. package/templates/bcl-carousel/carousel.html.twig +2 -2
  23. package/templates/bcl-content-banner/content-banner.html.twig +2 -2
  24. package/templates/bcl-date-block/date-block.html.twig +2 -2
  25. package/templates/bcl-description-list/description-list.html.twig +87 -85
  26. package/templates/bcl-dropdown/dropdown.html.twig +2 -2
  27. package/templates/bcl-fact-figures/fact-figures.html.twig +2 -2
  28. package/templates/bcl-featured-media/featured-media.html.twig +2 -2
  29. package/templates/bcl-file/file.html.twig +2 -2
  30. package/templates/bcl-footer/footer.html.twig +2 -2
  31. package/templates/bcl-form/form.html.twig +2 -2
  32. package/templates/bcl-form-input/form-input.html.twig +2 -2
  33. package/templates/bcl-gallery/gallery.html.twig +2 -2
  34. package/templates/bcl-header/header.html.twig +2 -2
  35. package/templates/bcl-heading/heading.html.twig +2 -2
  36. package/templates/bcl-icon/icon.html.twig +2 -2
  37. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +2 -2
  38. package/templates/bcl-language-list/language-list-grid.html.twig +2 -2
  39. package/templates/bcl-language-list/language-list.html.twig +2 -2
  40. package/templates/bcl-language-switcher/language-switcher.html.twig +2 -2
  41. package/templates/bcl-link/link.html.twig +2 -2
  42. package/templates/bcl-links-block/links-block.html.twig +2 -2
  43. package/templates/bcl-list-group/list-group.html.twig +2 -2
  44. package/templates/bcl-listing/listing.html.twig +2 -2
  45. package/templates/bcl-modal/modal.html.twig +2 -2
  46. package/templates/bcl-navbar/navbar.html.twig +2 -2
  47. package/templates/bcl-navigation/navigation.html.twig +4 -4
  48. package/templates/bcl-offcanvas/offcanvas.html.twig +2 -2
  49. package/templates/bcl-pagination/pagination.html.twig +2 -2
  50. package/templates/bcl-placeholder/placeholder.html.twig +2 -2
  51. package/templates/bcl-progress/progress.html.twig +2 -2
  52. package/templates/bcl-project/project-lists.html.twig +2 -2
  53. package/templates/bcl-project-status/project-contributions.html.twig +2 -2
  54. package/templates/bcl-project-status/project-status.html.twig +2 -2
  55. package/templates/bcl-recent-activities/recent-activities.html.twig +2 -2
  56. package/templates/bcl-search-form/search-form.html.twig +2 -2
  57. package/templates/bcl-section/section.html.twig +41 -0
  58. package/templates/bcl-select/select.html.twig +2 -2
  59. package/templates/bcl-spinner/spinner.html.twig +2 -2
  60. package/templates/bcl-subscription-block/subscription-block.html.twig +2 -2
  61. package/templates/bcl-table/table.html.twig +2 -2
  62. package/templates/bcl-textarea/textarea.html.twig +2 -2
  63. package/templates/bcl-timeline/timeline.html.twig +2 -2
  64. package/templates/bcl-toast/toasts.html.twig +2 -2
  65. package/templates/bcl-user/user-compact.html.twig +22 -14
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - size (string) (sm, lg, xl, fullscreen) default('')
@@ -78,4 +78,4 @@
78
78
  </div>
79
79
  </div>
80
80
 
81
- {% endspaceless %}
81
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - collapse_id (string) (default: '')
@@ -106,4 +106,4 @@
106
106
  </div>
107
107
  </nav>
108
108
 
109
- {% endspaceless %}
109
+ {% endapply %}
@@ -1,5 +1,5 @@
1
1
  {% import _self as navigation %}
2
- {% spaceless %}
2
+ {% apply spaceless %}
3
3
 
4
4
  {# Parameters:
5
5
  - id (string) (default: '')
@@ -27,7 +27,7 @@
27
27
 
28
28
  {# Define main macro #}
29
29
  {% macro render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) %}
30
- {% spaceless %}
30
+ {% apply spaceless %}
31
31
  {% import _self as navigation %}
32
32
 
33
33
  {% set _id = id|default('') %}
@@ -171,9 +171,9 @@
171
171
  {%- endblock -%}
172
172
  </div>
173
173
  {% endif %}
174
- {% endspaceless %}
174
+ {% endapply %}
175
175
  {% endmacro %}
176
176
 
177
177
  {{ navigation.render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) }}
178
178
 
179
- {% endspaceless %}
179
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - title: (string) (default: '')
@@ -115,4 +115,4 @@
115
115
  {%- endif -%}
116
116
  </div>
117
117
 
118
- {% endspaceless %}
118
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - size (string) (default: '')
@@ -271,4 +271,4 @@
271
271
  </ul>
272
272
  </nav>
273
273
 
274
- {% endspaceless %}
274
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - width (int) (default: 0) - between 0-100
@@ -41,4 +41,4 @@
41
41
  </p>
42
42
  {% endif %}
43
43
 
44
- {% endspaceless %}
44
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - progress (int) (default: 0)
@@ -70,4 +70,4 @@
70
70
  <small class="form-text text-muted progress-bar-message">{{ _message }}</small>
71
71
  {% endif %}
72
72
 
73
- {% endspaceless %}
73
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
 
4
4
  {#
@@ -67,4 +67,4 @@
67
67
  {% endif %}
68
68
  </div>
69
69
 
70
- {% endspaceless %}
70
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - corporate_contributions (string) (default: '') // value every 5 percent
@@ -53,4 +53,4 @@
53
53
  </div>
54
54
  </div>
55
55
 
56
- {% endspaceless %}
56
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - status (string) (default: 'planned')
@@ -97,4 +97,4 @@
97
97
 
98
98
 
99
99
 
100
- {% endspaceless %}
100
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - activities (array of custom object) (default: [])
@@ -60,4 +60,4 @@
60
60
  {% endif %}
61
61
  </div>
62
62
 
63
- {% endspaceless %}
63
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - pill (boolean) (default: false)
@@ -50,4 +50,4 @@
50
50
  </div>
51
51
  </form>
52
52
 
53
- {% endspaceless %}
53
+ {% endapply %}
@@ -0,0 +1,41 @@
1
+ {% spaceless %}
2
+
3
+ {# Parameters:
4
+ - title (string) (default: '')
5
+ - content (string)
6
+ - id (string) (default: '')
7
+ #}
8
+
9
+ {% set _title = title|default('') %}
10
+ {% set _content = content %}
11
+ {% set _id = id|default('') %}
12
+
13
+ {% if attributes is empty %}
14
+ {% set attributes = create_attribute() %}
15
+ {% endif %}
16
+
17
+ {% if attributes.class is empty %}
18
+ {% set attributes = attributes.addClass(['mb-5']) %}
19
+ {% endif %}
20
+
21
+ {% if _id is not empty %}
22
+ {# Put the id directly on the <section> instead of the title, should work fine. #}
23
+ {% set attributes = attributes.setAttribute('id', _id) %}
24
+ {% endif %}
25
+
26
+ {% set _content_rendered %}{{ _content }}{% endset %}
27
+
28
+ {% if _content_rendered|trim is not empty %}
29
+ <section{{ attributes }}>
30
+ {% if _title is not empty %}
31
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
32
+ title: _title,
33
+ title_tag: 'h2',
34
+ attributes: create_attribute().addClass(['mb-4'])
35
+ } only %}
36
+ {% endif %}
37
+ {{ _content_rendered }}
38
+ </section>
39
+ {% endif %}
40
+
41
+ {% endspaceless %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {#
4
4
  Parameters:
@@ -167,4 +167,4 @@
167
167
  </div>
168
168
  {% endif %}
169
169
 
170
- {% endspaceless %}
170
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - type (string) (default: 'border')
@@ -37,4 +37,4 @@
37
37
  {% endif %}
38
38
  </div>
39
39
 
40
- {% endspaceless %}
40
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - title: (string) (default: '')
@@ -35,4 +35,4 @@
35
35
  {% endif %}
36
36
  </div>
37
37
 
38
- {% endspaceless %}
38
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - striped (boolean) (default: false)
@@ -192,4 +192,4 @@
192
192
  </div>
193
193
  {% endif %}
194
194
 
195
- {% endspaceless %}
195
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {#
4
4
  Parameters:
@@ -146,4 +146,4 @@
146
146
  {% if _floating or _horizontal %}
147
147
  </div>
148
148
  {% endif %}
149
- {% endspaceless %}
149
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {#
4
4
  Parameters:
@@ -117,4 +117,4 @@ Parameters:
117
117
  {% endif %}
118
118
  </ol>
119
119
 
120
- {% endspaceless %}
120
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {#
4
4
  Parameters:
@@ -119,4 +119,4 @@
119
119
  </div>
120
120
  {% endif %}
121
121
 
122
- {% endspaceless %}
122
+ {% endapply %}
@@ -1,4 +1,4 @@
1
- {% spaceless %}
1
+ {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
4
  - picture (object) format: {
@@ -13,6 +13,9 @@
13
13
  - infos (array of strings) (default: [])
14
14
  #}
15
15
 
16
+ {% set _infos = infos|default([]) %}
17
+ {% set _name = name|default({}) %}
18
+ {% set _picture = picture|default({}) %}
16
19
  {% set _picture_classes = 'rounded-pill' %}
17
20
  {% set _classes = ['bcl-user-compact', 'd-flex', 'mb-3'] %}
18
21
 
@@ -22,8 +25,8 @@
22
25
 
23
26
  {% set attributes = attributes.addClass(_classes) %}
24
27
 
25
- {% if picture is not empty and picture.classes is not empty %}
26
- {% set _picture_classes = _picture_classes ~ ' ' ~ picture.classes %}
28
+ {% if _picture is not empty and _picture.classes is not empty %}
29
+ {% set _picture_classes = _picture_classes ~ ' ' ~ _picture.classes %}
27
30
  {% endif %}
28
31
 
29
32
  <div
@@ -32,22 +35,27 @@
32
35
  <div class="flex-shrink-0">
33
36
  <img
34
37
  class="{{ _picture_classes }}"
35
- src="{{ picture.path }}"
36
- alt="{{ picture.alt }}"
38
+ src="{{ _picture.path }}"
39
+ alt="{{ _picture.alt }}"
37
40
  >
38
41
  </div>
39
42
  <div class="flex-grow-1 ms-3">
40
- {% if name.link is not empty %}
41
- <a href="{{ name.link }}" class="fs-5 standalone mb-0">{{ name.text }}</a>
42
- {% else %}
43
- <p class="fs-5 mb-0 text-primary">{{ name.text }}</p>
44
- {% endif %}
43
+ {% if _name.link is not empty %}
44
+ <a href="{{ _name.link }}" class="fs-5 standalone mb-0">{{ _name.text }}</a>
45
+ {% else %}
46
+ <p class="fs-5 mb-0 text-primary">{{ _name.text }}</p>
47
+ {% endif %}
48
+
49
+ {% if _infos is not empty %}
45
50
  <div class="d-flex flex-wrap">
46
- {% for info in infos %}
47
- <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ info }}</span>
48
- {% endfor %}
51
+ {% for _info in _infos %}
52
+ {% if _info is not empty %}
53
+ <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ _info }}</span>
54
+ {% endif %}
55
+ {% endfor %}
49
56
  </div>
57
+ {% endif %}
50
58
  </div>
51
59
  </div>
52
60
 
53
- {% endspaceless %}
61
+ {% endapply %}