@openeuropa/bcl-theme-joinup 0.4230.202512021730 → 0.4360.202601141610

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 (102) hide show
  1. package/css/oe-bcl-joinup.css +61 -48
  2. package/css/oe-bcl-joinup.css.map +1 -1
  3. package/css/oe-bcl-joinup.min.css +1 -1
  4. package/css/oe-bcl-joinup.min.css.map +1 -1
  5. package/js/oe-bcl-joinup.bundle.js +112 -1
  6. package/js/oe-bcl-joinup.bundle.js.map +1 -1
  7. package/js/oe-bcl-joinup.bundle.min.js +1 -1
  8. package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
  9. package/js/oe-bcl-joinup.esm.js +111 -1
  10. package/js/oe-bcl-joinup.esm.js.map +1 -1
  11. package/js/oe-bcl-joinup.esm.min.js +1 -1
  12. package/js/oe-bcl-joinup.esm.min.js.map +1 -1
  13. package/js/oe-bcl-joinup.umd.js +112 -1
  14. package/js/oe-bcl-joinup.umd.js.map +1 -1
  15. package/js/oe-bcl-joinup.umd.min.js +1 -1
  16. package/js/oe-bcl-joinup.umd.min.js.map +1 -1
  17. package/package.json +7 -7
  18. package/src/js/index.esm.js +2 -0
  19. package/src/js/index.umd.js +2 -0
  20. package/templates/bcl-accordion/accordion.html.twig +42 -43
  21. package/templates/bcl-alert/alert.html.twig +18 -18
  22. package/templates/bcl-badge/badge.html.twig +11 -12
  23. package/templates/bcl-banner/banner.html.twig +34 -34
  24. package/templates/bcl-base-templates/content-type.html.twig +63 -64
  25. package/templates/bcl-base-templates/listing-page.html.twig +31 -31
  26. package/templates/bcl-base-templates/sidebar-search.html.twig +10 -10
  27. package/templates/bcl-blockquote/blockquote.html.twig +17 -17
  28. package/templates/bcl-breadcrumb/breadcrumb.html.twig +24 -25
  29. package/templates/bcl-button/button.html.twig +24 -24
  30. package/templates/bcl-button-group/button-group.html.twig +25 -26
  31. package/templates/bcl-card/card.html.twig +98 -98
  32. package/templates/bcl-card-layout/card-layout.html.twig +34 -34
  33. package/templates/bcl-carousel/carousel.html.twig +64 -64
  34. package/templates/bcl-contact-form/contact-form.html.twig +1 -1
  35. package/templates/bcl-content-banner/content-banner.html.twig +37 -37
  36. package/templates/bcl-date-block/date-block.html.twig +26 -26
  37. package/templates/bcl-description-list/description-list-details.html.twig +6 -6
  38. package/templates/bcl-description-list/description-list-title.html.twig +11 -11
  39. package/templates/bcl-description-list/description-list.html.twig +44 -45
  40. package/templates/bcl-dropdown/dropdown.html.twig +48 -49
  41. package/templates/bcl-event/event.html.twig +7 -7
  42. package/templates/bcl-fact-figures/fact-figures.html.twig +34 -34
  43. package/templates/bcl-featured-media/featured-media.html.twig +42 -43
  44. package/templates/bcl-file/file-translations.html.twig +29 -29
  45. package/templates/bcl-file/file.html.twig +46 -46
  46. package/templates/bcl-footer/footer.html.twig +31 -31
  47. package/templates/bcl-form/form.html.twig +70 -70
  48. package/templates/bcl-form-input/form-input.html.twig +57 -58
  49. package/templates/bcl-gallery/gallery-item.html.twig +20 -20
  50. package/templates/bcl-gallery/gallery.html.twig +62 -63
  51. package/templates/bcl-glossary/glossary-detail.html.twig +19 -19
  52. package/templates/bcl-glossary/glossary-listing.html.twig +6 -6
  53. package/templates/bcl-group/group-landing.html.twig +69 -69
  54. package/templates/bcl-group/group.html.twig +19 -19
  55. package/templates/bcl-header/header.html.twig +71 -79
  56. package/templates/bcl-heading/heading.html.twig +13 -14
  57. package/templates/bcl-icon/icon.html.twig +10 -10
  58. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +20 -20
  59. package/templates/bcl-landing-page/landing-page.html.twig +33 -33
  60. package/templates/bcl-language-list/language-list-grid.html.twig +25 -25
  61. package/templates/bcl-language-list/language-list-modal.html.twig +52 -52
  62. package/templates/bcl-language-list/language-list.html.twig +33 -34
  63. package/templates/bcl-language-switcher/language-switcher.html.twig +12 -12
  64. package/templates/bcl-link/link.html.twig +24 -24
  65. package/templates/bcl-links-block/links-block.html.twig +29 -30
  66. package/templates/bcl-list-group/list-group.html.twig +43 -44
  67. package/templates/bcl-listing/listing.html.twig +88 -88
  68. package/templates/bcl-mega-menu/mega-menu-items.html.twig +18 -18
  69. package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +27 -22
  70. package/templates/bcl-mega-menu/mega-menu.html.twig +37 -35
  71. package/templates/bcl-modal/modal.html.twig +17 -17
  72. package/templates/bcl-navbar/navbar.html.twig +35 -35
  73. package/templates/bcl-navigation/navigation.html.twig +106 -106
  74. package/templates/bcl-offcanvas/offcanvas.html.twig +33 -33
  75. package/templates/bcl-page/page.html.twig +27 -27
  76. package/templates/bcl-pagination/pagination-item.html.twig +22 -23
  77. package/templates/bcl-pagination/pagination.html.twig +59 -59
  78. package/templates/bcl-pagination-v2/pagination-item.html.twig +31 -32
  79. package/templates/bcl-pagination-v2/pagination.html.twig +79 -79
  80. package/templates/bcl-person/person.html.twig +12 -12
  81. package/templates/bcl-placeholder/placeholder.html.twig +14 -15
  82. package/templates/bcl-progress/progress.html.twig +16 -17
  83. package/templates/bcl-project/project-lists.html.twig +25 -25
  84. package/templates/bcl-project/project.html.twig +35 -35
  85. package/templates/bcl-project-status/project-contributions.html.twig +25 -25
  86. package/templates/bcl-project-status/project-status.html.twig +32 -34
  87. package/templates/bcl-recent-activities/recent-activities.html.twig +13 -13
  88. package/templates/bcl-search/search.html.twig +12 -12
  89. package/templates/bcl-search-form/search-form.html.twig +21 -21
  90. package/templates/bcl-select/select.html.twig +52 -53
  91. package/templates/bcl-spinner/spinner.html.twig +10 -10
  92. package/templates/bcl-subscription/subscription-modal.html.twig +7 -7
  93. package/templates/bcl-subscription/subscription.html.twig +3 -3
  94. package/templates/bcl-subscription-block/subscription-block.html.twig +14 -14
  95. package/templates/bcl-table/table.html.twig +61 -62
  96. package/templates/bcl-textarea/textarea.html.twig +44 -44
  97. package/templates/bcl-timeline/timeline-item.html.twig +12 -12
  98. package/templates/bcl-timeline/timeline.html.twig +42 -42
  99. package/templates/bcl-toasts/toasts.html.twig +56 -57
  100. package/templates/bcl-user/user-compact.html.twig +24 -24
  101. package/templates/bcl-user/user-terms.html.twig +6 -6
  102. package/templates/bcl-user/user.html.twig +117 -117
@@ -24,7 +24,7 @@
24
24
  - right
25
25
  #}
26
26
 
27
- {% set _collapse_id = collapse_id|default('') %}
27
+ {%- set _collapse_id = collapse_id|default('') %}
28
28
  {% set _background = background|default('') %}
29
29
  {% set _brand = brand|default({}) %}
30
30
  {% set _navigation = navigation|default({}) %}
@@ -33,48 +33,48 @@
33
33
  {% set _color_set = color_set|default('light') %}
34
34
  {% set _disable_collapse = disable_collapse ?? false %}
35
35
 
36
- {% set _classes = ['navbar', 'navbar-expand-' ~ _expand] %}
36
+ {%- set _classes = ['navbar', 'navbar-expand-' ~ _expand] %}
37
37
  {% if _background is not empty %}
38
- {% set _classes = _classes|merge(['bg-' ~ _background]) %}
38
+ {%- set _classes = _classes|merge(['bg-' ~ _background]) %}
39
39
  {% endif %}
40
40
  {% if _color_set is not empty %}
41
- {% set _classes = _classes|merge(['navbar-' ~ _color_set]) %}
41
+ {%- set _classes = _classes|merge(['navbar-' ~ _color_set]) %}
42
42
  {% endif %}
43
43
 
44
- {% if attributes is empty %}
45
- {% set attributes = create_attribute() %}
44
+ {%- if attributes is empty %}
45
+ {%- set attributes = create_attribute() %}
46
46
  {% endif %}
47
47
 
48
- {% set attributes = attributes.addClass(_classes) %}
48
+ {%- set attributes = attributes.addClass(_classes) -%}
49
49
 
50
50
  <nav
51
51
  {{ attributes }}
52
- >
52
+ >{# -#}
53
53
  <div class='container'>
54
- {% block branding %}
55
- {% if _brand is not empty %}
54
+ {%- block branding %}
55
+ {%- if _brand is not empty -%}
56
56
  <a class='navbar-brand' href='{{ _brand.link }}'>
57
- {% for logo in _brand.logos %}
57
+ {%- for logo in _brand.logos -%}
58
58
  <img
59
59
  src='{{ logo.src }}'
60
60
  {% if logo.alt is not empty %}
61
61
  alt='{{ logo.alt }}'
62
62
  {% endif %}
63
- {% if logo.class is not empty %}
63
+ {%- if logo.class is not empty %}
64
64
  class='{{ logo.class }}'
65
65
  {% endif %}
66
66
  />
67
- {% endfor %}
67
+ {%- endfor %}
68
68
  {%- if _brand.label is defined -%}
69
69
  <div class="h5 ms-4-5 d-none d-lg-inline-block">
70
70
  {{- _brand.label -}}
71
71
  </div>
72
- {% endif %}
72
+ {%- endif -%}
73
73
  </a>
74
- {% endif %}
75
- {% endblock %}
74
+ {%- endif %}
75
+ {%- endblock %}
76
76
 
77
- {% if not _disable_collapse %}
77
+ {%- if not _disable_collapse -%}
78
78
  <button
79
79
  class="navbar-toggler"
80
80
  type="button"
@@ -83,24 +83,24 @@
83
83
  aria-controls='{{ _collapse_id }}'
84
84
  aria-expanded="false"
85
85
  aria-label="Toggle navigation"
86
- >
87
- <span class="navbar-toggler-icon"></span>
88
- </button>
86
+ >{# -#}
87
+ <span class="navbar-toggler-icon"></span>{# -#}
88
+ </button>{# -#}
89
89
  <div class="collapse navbar-collapse" id='{{ _collapse_id }}'>
90
- {% endif %}
91
- {% block navigation %}
92
- {% if _navigation is not empty %}
93
- {% include '@oe-bcl/bcl-navigation/navigation.html.twig' with _navigation only %}
94
- {% endif %}
95
- {% endblock %}
96
- {% block right %}
97
- {% if _form is not empty %}
98
- {% include '@oe-bcl/bcl-form/form.html.twig' with _form only %}
99
- {% endif %}
100
- {% endblock %}
101
- {% if not _disable_collapse %}
90
+ {%- endif %}
91
+ {%- block navigation %}
92
+ {%- if _navigation is not empty %}
93
+ {%- include '@oe-bcl/bcl-navigation/navigation.html.twig' with _navigation only %}
94
+ {%- endif %}
95
+ {%- endblock %}
96
+ {%- block right %}
97
+ {%- if _form is not empty %}
98
+ {%- include '@oe-bcl/bcl-form/form.html.twig' with _form only %}
99
+ {%- endif %}
100
+ {%- endblock %}
101
+ {%- if not _disable_collapse -%}
102
102
  </div>
103
- {% endif %}
104
- </div>
103
+ {%- endif -%}
104
+ </div>{# -#}
105
105
  </nav>
106
-
106
+ {#--#}
@@ -1,5 +1,6 @@
1
1
  {% import _self as navigation %}
2
- {# Parameters:
2
+
3
+ {#- Parameters:
3
4
  - id (string) (default: '')
4
5
  - pills (boolean) (default: false)
5
6
  - tabs (boolean) (default: false) - If tabs is set to true, the nav should also be set to true for accessibility reasons
@@ -23,119 +24,119 @@
23
24
  - attributes (drupal attrs)
24
25
  #}
25
26
 
26
- {# Define main macro #}
27
+ {#- Define main macro #}
27
28
  {% macro render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) %}
28
- {% import _self as navigation %}
29
+ {%- import _self as navigation %}
29
30
 
30
- {% set _id = id|default('') %}
31
- {% set _pills = pills ?? false %}
32
- {% set _tabs = tabs ?? false %}
33
- {% set _vertical = vertical ?? false %}
34
- {% set _full_width = full_width ?? false %}
35
- {% set _alignment = alignment|default('') %}
36
- {% set _tabs_content = tabs_content ?? false %}
37
- {% set _nav = nav ?? false %}
38
- {% set _navbar = navbar ?? false %}
39
- {% set _items = items|default([]) %}
31
+ {%- set _id = id|default('') %}
32
+ {%- set _pills = pills ?? false %}
33
+ {%- set _tabs = tabs ?? false %}
34
+ {%- set _vertical = vertical ?? false %}
35
+ {%- set _full_width = full_width ?? false %}
36
+ {%- set _alignment = alignment|default('') %}
37
+ {%- set _tabs_content = tabs_content ?? false %}
38
+ {%- set _nav = nav ?? false %}
39
+ {%- set _navbar = navbar ?? false %}
40
+ {%- set _items = items|default([]) %}
40
41
 
41
- {% if _navbar %}
42
- {% set _classes = ['navbar-nav'] %}
43
- {% else %}
44
- {% set _classes = ['nav'] %}
45
- {% endif %}
46
- {% if _pills %}
47
- {% set _classes = _classes|merge(['nav-pills']) %}
48
- {% endif %}
49
- {% if _tabs %}
50
- {% set _classes = _classes|merge(['nav-tabs']) %}
51
- {% endif %}
52
- {% if _vertical %}
53
- {% set _classes = _classes|merge(['flex-column']) %}
54
- {% endif %}
55
- {% if _full_width %}
56
- {% set _classes = _classes|merge(['nav-fill']) %}
57
- {% endif %}
58
- {% if _alignment is not empty %}
59
- {% set _classes = _classes|merge(['justify-content-' ~ _alignment]) %}
60
- {% endif %}
42
+ {%- if _navbar %}
43
+ {%- set _classes = ['navbar-nav'] %}
44
+ {%- else %}
45
+ {%- set _classes = ['nav'] %}
46
+ {%- endif %}
47
+ {%- if _pills %}
48
+ {%- set _classes = _classes|merge(['nav-pills']) %}
49
+ {%- endif %}
50
+ {%- if _tabs %}
51
+ {%- set _classes = _classes|merge(['nav-tabs']) %}
52
+ {%- endif %}
53
+ {%- if _vertical %}
54
+ {%- set _classes = _classes|merge(['flex-column']) %}
55
+ {%- endif %}
56
+ {%- if _full_width %}
57
+ {%- set _classes = _classes|merge(['nav-fill']) %}
58
+ {%- endif %}
59
+ {%- if _alignment is not empty %}
60
+ {%- set _classes = _classes|merge(['justify-content-' ~ _alignment]) %}
61
+ {%- endif %}
61
62
 
62
- {% if attributes is empty %}
63
- {% set attributes = create_attribute() %}
64
- {% endif %}
63
+ {%- if attributes is empty %}
64
+ {%- set attributes = create_attribute() %}
65
+ {%- endif %}
65
66
 
66
- {% if _id is not empty %}
67
- {% set attributes = attributes.setAttribute('id', _id) %}
68
- {% endif %}
67
+ {%- if _id is not empty %}
68
+ {%- set attributes = attributes.setAttribute('id', _id) %}
69
+ {%- endif %}
69
70
 
70
- {% if _tabs %}
71
- {% set attributes = attributes.setAttribute('role', 'tablist') %}
72
- {% endif %}
73
- {% set attributes = attributes.addClass(_classes) %}
71
+ {%- if _tabs %}
72
+ {%- set attributes = attributes.setAttribute('role', 'tablist') %}
73
+ {%- endif %}
74
+ {%- set attributes = attributes.addClass(_classes) %}
74
75
 
75
- {% if _nav %}
76
+ {%- if _nav -%}
76
77
  <nav
77
78
  {{ attributes }}
78
79
  >
79
- {% else %}
80
+ {%- else -%}
80
81
  <ul
81
82
  {{ attributes }}
82
83
  >
83
- {% endif %}
84
- {% if _items is not empty and _items is iterable %}
85
- {% for _item in items %}
86
- {% set _nav_class = 'nav-item' %}
87
- {% if _item.dropdown %}
88
- {% set _nav_class = _nav_class ~ ' dropdown' %}
89
- {% set _item = _item|merge({remove_wrapper: true}) %}
90
- {% endif %}
91
- {% if _item.dropdown or _item.mega_menu %}
92
- {% set _item_classes = [] %}
93
- {% else %}
94
- {% set _item_classes = ['nav-link'] %}
95
- {% endif %}
96
- {% if _item.active %}
97
- {% set _item_classes = _item_classes|merge(['active']) %}
98
- {% endif %}
99
- {% if _item.attributes is empty %}
100
- {% set _item = _item|merge({
84
+ {%- endif %}
85
+ {%- if _items is not empty and _items is iterable %}
86
+ {%- for _item in items %}
87
+ {%- set _nav_class = 'nav-item' %}
88
+ {%- if _item.dropdown %}
89
+ {%- set _nav_class = _nav_class ~ ' dropdown' %}
90
+ {%- set _item = _item|merge({remove_wrapper: true}) %}
91
+ {%- endif %}
92
+ {%- if _item.dropdown or _item.mega_menu %}
93
+ {%- set _item_classes = [] %}
94
+ {%- else %}
95
+ {%- set _item_classes = ['nav-link'] %}
96
+ {%- endif %}
97
+ {%- if _item.active %}
98
+ {%- set _item_classes = _item_classes|merge(['active']) %}
99
+ {%- endif %}
100
+ {%- if _item.attributes is empty %}
101
+ {%- set _item = _item|merge({
101
102
  attributes: create_attribute()
102
103
  }) %}
103
- {% endif %}
104
- {% set _item = _item|merge({
104
+ {%- endif %}
105
+ {%- set _item = _item|merge({
105
106
  attributes: _item.attributes.addClass(_item_classes),
106
107
  clean_class: true}) %}
107
- {% if not _nav %}
108
+ {%- if not _nav -%}
108
109
  <li
109
110
  class="{{ _nav_class }}"
110
111
  {% if _tabs %}
111
112
  role="tab"
112
113
  {% endif %}
113
114
  >
114
- {% elseif _tabs and _item.dropdown is not defined %}
115
- {% set _item = _item|merge({
115
+ {%- elseif _tabs and _item.dropdown is not defined %}
116
+ {%- set _item = _item|merge({
116
117
  attributes: _item.attributes.setAttribute("role", "tab"),
117
- })
118
+ })
118
119
  %}
119
- {% endif %}
120
- {% if _item.dropdown is defined %}
121
- {% if _tabs %}
122
- {% set _item = _item|merge({
120
+ {%- endif %}
121
+ {%- if _item.dropdown is defined %}
122
+ {%- if _tabs %}
123
+ {%- set _item = _item|merge({
123
124
  inside_navigation: true,
124
125
  trigger: _item.trigger|merge({
125
126
  attributes: _item.trigger.attributes.setAttribute("role", "tab"),
126
127
  }),
127
128
  }) %}
128
- {% endif %}
129
- {% include '@oe-bcl/bcl-dropdown/dropdown.html.twig' with _item only %}
130
- {% elseif _item.button is defined %}
131
- {% include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
132
- {% elseif _item.mega_menu is defined %}
133
- {% include '@oe-bcl/bcl-mega-menu/mega-menu.html.twig' with _item only %}
134
- {% else %}
135
- {% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
136
- {% endif %}
137
- {% if _item.navigation is defined and _item.navigation.items is not empty and _item.navigation.items is iterable %}
138
- {{ navigation.render(
129
+ {%- endif %}
130
+ {%- include '@oe-bcl/bcl-dropdown/dropdown.html.twig' with _item only %}
131
+ {%- elseif _item.button is defined %}
132
+ {%- include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
133
+ {%- elseif _item.mega_menu is defined %}
134
+ {%- include '@oe-bcl/bcl-mega-menu/mega-menu.html.twig' with _item only %}
135
+ {%- else %}
136
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
137
+ {%- endif %}
138
+ {%- if _item.navigation is defined and _item.navigation.items is not empty and _item.navigation.items is iterable %}
139
+ {{- navigation.render(
139
140
  _item.navigation.items,
140
141
  _item.navigation.pills,
141
142
  _item.navigation.tabs,
@@ -148,37 +149,36 @@
148
149
  _item.navigation.navbar,
149
150
  _item.navigation.attributes
150
151
  ) }}
151
- {% endif %}
152
- {% if not _nav %}
152
+ {%- endif %}
153
+ {%- if not _nav -%}
153
154
  </li>
154
- {% endif %}
155
- {% endfor %}
156
- {% endif %}
157
- {% if _nav %}
155
+ {%- endif %}
156
+ {%- endfor %}
157
+ {%- endif %}
158
+ {%- if _nav -%}
158
159
  </nav>
159
- {% else %}
160
+ {%- else -%}
160
161
  </ul>
161
- {% endif %}
162
- {% if _tabs_content %}
162
+ {%- endif %}
163
+ {%- if _tabs_content -%}
163
164
  <div class="tab-content">
164
165
  {%- block contents -%}
165
166
  {% if _items is not empty and _items is iterable %}
166
- {% for _item in _items %}
167
- {% if _item.content is not empty %}
168
- {% set _content_class = 'tab-pane fade' %}
169
- {% if _item.active %}
170
- {% set _content_class = _content_class ~ ' show active' %}
171
- {% endif %}
167
+ {%- for _item in _items %}
168
+ {%- if _item.content is not empty %}
169
+ {%- set _content_class = 'tab-pane fade' %}
170
+ {%- if _item.active %}
171
+ {%- set _content_class = _content_class ~ ' show active' %}
172
+ {%- endif -%}
172
173
  <div class="{{ _content_class }}" id="{{ _item.target }}" role="tabpanel" aria-labelledby="{{ _item.id }}">
173
174
  {{- _item.content -}}
174
175
  </div>
175
- {% endif %}
176
- {% endfor %}
177
- {% endif %}
176
+ {%- endif %}
177
+ {%- endfor %}
178
+ {%- endif %}
178
179
  {%- endblock -%}
179
180
  </div>
180
- {% endif %}
181
- {% endmacro %}
182
-
183
- {{ navigation.render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) }}
181
+ {%- endif %}
182
+ {%- endmacro %}
184
183
 
184
+ {{- navigation.render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) -}}
@@ -18,7 +18,7 @@
18
18
  - attributes (drupal attrs)
19
19
  #}
20
20
 
21
- {% set _title = title|default('') %}
21
+ {%- set _title = title|default('') %}
22
22
  {% set _title_tag = title_tag|default('h2') %}
23
23
  {% set _title_link = title_link|default({}) %}
24
24
  {% set _title_attributes = title_attributes ?: create_attribute() %}
@@ -34,78 +34,78 @@
34
34
  {% set _extra_classes_close = extra_classes_close|default('') %}
35
35
  {% set _responsiveness = responsiveness|default('') %}
36
36
 
37
- {% if _responsiveness is not empty %}
38
- {% set _classes = ['offcanvas-' ~ _responsiveness] %}
37
+ {%- if _responsiveness is not empty %}
38
+ {%- set _classes = ['offcanvas-' ~ _responsiveness] %}
39
39
  {% else %}
40
- {% set _classes = ['offcanvas'] %}
40
+ {%- set _classes = ['offcanvas'] %}
41
41
  {% endif %}
42
42
 
43
- {% set _class_body = 'offcanvas-body' ~ (_extra_classes_body ? ' ' ~ _extra_classes_body : '') %}
43
+ {%- set _class_body = 'offcanvas-body' ~ (_extra_classes_body ? ' ' ~ _extra_classes_body : '') %}
44
44
  {% set _class_header = 'offcanvas-header' ~ (_extra_classes_header ? ' ' ~ _extra_classes_header : '') %}
45
45
 
46
- {% if _placement is not empty %}
47
- {% set _classes = _classes|merge(['offcanvas-' ~ _placement]) %}
46
+ {%- if _placement is not empty %}
47
+ {%- set _classes = _classes|merge(['offcanvas-' ~ _placement]) %}
48
48
  {% endif %}
49
49
 
50
- {% if _title is not empty %}
51
- {% set _aria_labelled = _title.id|default('') %}
50
+ {%- if _title is not empty %}
51
+ {%- set _aria_labelled = _title.id|default('') %}
52
52
  {% endif %}
53
53
 
54
- {% if attributes is empty %}
55
- {% set attributes = create_attribute() %}
54
+ {%- if attributes is empty %}
55
+ {%- set attributes = create_attribute() %}
56
56
  {% endif %}
57
57
 
58
- {% set attributes = attributes.setAttribute('id', _id) %}
58
+ {%- set attributes = attributes.setAttribute('id', _id) %}
59
59
 
60
- {% if _aria_labelled is defined and _aria_labelled is not empty %}
61
- {% set attributes = attributes.setAttribute('aria-labelledby', _aria_labelled) %}
60
+ {%- if _aria_labelled is defined and _aria_labelled is not empty %}
61
+ {%- set attributes = attributes.setAttribute('aria-labelledby', _aria_labelled) %}
62
62
  {% endif %}
63
63
 
64
- {% if _with_body_scroll %}
65
- {% set attributes = attributes.setAttribute('data-bs-scroll', 'true') %}
64
+ {%- if _with_body_scroll %}
65
+ {%- set attributes = attributes.setAttribute('data-bs-scroll', 'true') %}
66
66
  {% endif %}
67
67
 
68
- {% if not _with_backdrop %}
69
- {% set attributes = attributes.setAttribute('data-bs-backdrop', 'false') %}
68
+ {%- if not _with_backdrop %}
69
+ {%- set attributes = attributes.setAttribute('data-bs-backdrop', 'false') %}
70
70
  {% endif %}
71
71
 
72
- {% if _title is not empty %}
73
- {% set attributes = attributes.setAttribute('aria-labelledby', _id ~ '-title') %}
72
+ {%- if _title is not empty %}
73
+ {%- set attributes = attributes.setAttribute('aria-labelledby', _id ~ '-title') %}
74
74
  {% endif %}
75
75
 
76
- {% set attributes = attributes.setAttribute('tabindex', '-1').addClass(_classes) %}
76
+ {%- set attributes = attributes.setAttribute('tabindex', '-1').addClass(_classes) -%}
77
77
 
78
78
  <div
79
79
  {{ attributes }}
80
80
  >
81
- {% if _with_close or _title is not empty %}
81
+ {%- if _with_close or _title is not empty -%}
82
82
  <div class="{{ _class_header }}">
83
- {% if _title is not empty %}
84
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
83
+ {%- if _title is not empty %}
84
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
85
85
  title: _title,
86
86
  title_tag: _title_tag,
87
87
  title_link: _title_link,
88
88
  attributes: _title_attributes.setAttribute('id', _id ~ '-title').addClass(['offcanvas-title']),
89
89
  } only %}
90
- {% endif %}
91
- {% if _with_close %}
92
- {% set button_attributes = create_attribute()
90
+ {%- endif %}
91
+ {%- if _with_close %}
92
+ {%- set button_attributes = create_attribute()
93
93
  .addClass(['btn-close', 'text-reset'])
94
94
  .setAttribute('data-bs-dismiss', 'offcanvas')
95
95
  .setAttribute('data-bs-target', '#' ~ _id)
96
96
  .setAttribute('aria-label', _close_aria_label)
97
97
  .setAttribute('aria-controls', _id)
98
98
  %}
99
- {% if _extra_classes_close is not empty %}
100
- {% set button_attributes = button_attributes.addClass(_extra_classes_close) %}
101
- {% endif %}
99
+ {%- if _extra_classes_close is not empty %}
100
+ {%- set button_attributes = button_attributes.addClass(_extra_classes_close) %}
101
+ {%- endif %}
102
102
  {%- include '@oe-bcl/bcl-button/button.html.twig' with {
103
103
  attributes: button_attributes,
104
104
  clean_class: true
105
105
  } only -%}
106
- {% endif %}
106
+ {% endif -%}
107
107
  </div>
108
- {% endif %}
108
+ {%- endif %}
109
109
  {%- if _body is not empty -%}
110
110
  <div class="{{ _class_body }}">
111
111
  {%- endif -%}
@@ -116,4 +116,4 @@
116
116
  </div>
117
117
  {%- endif -%}
118
118
  </div>
119
-
119
+ {#--#}
@@ -1,45 +1,45 @@
1
1
  {% extends '@oe-bcl/bcl-base-templates/content-type.html.twig' -%}
2
2
 
3
3
  {%- block sidebar %}
4
- {% include '@oe-bcl/bcl-inpage-navigation/inpage-navigation.html.twig' with sidebar only %}
4
+ {%- include '@oe-bcl/bcl-inpage-navigation/inpage-navigation.html.twig' with sidebar only %}
5
5
  {%- endblock -%}
6
6
 
7
- {%- block content %}
8
- <p id="content">{{ get_dummy_text(6) }}
9
- </p>
7
+ {%- block content -%}
8
+ <p id="content">{{ get_dummy_text(6) -}}
9
+ </p>{# -#}
10
10
  <h2 id="item-1" class="my-4">Section 1</h2>
11
- {% if featured_item %}
12
- {% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with featured_item only %}
13
- {% endif %}
11
+ {%- if featured_item %}
12
+ {%- include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with featured_item only %}
13
+ {%- endif %}
14
14
 
15
- {% if page_banner %}
16
- {% include '@oe-bcl/bcl-banner/banner.html.twig' with page_banner only %}
17
- {% endif %}
15
+ {%- if page_banner %}
16
+ {%- include '@oe-bcl/bcl-banner/banner.html.twig' with page_banner only %}
17
+ {%- endif %}
18
18
 
19
- {% if listing %}
20
- {% include '@oe-bcl/bcl-listing/listing.html.twig' with listing only %}
21
- {% endif %}
19
+ {%- if listing %}
20
+ {%- include '@oe-bcl/bcl-listing/listing.html.twig' with listing only %}
21
+ {%- endif -%}
22
22
 
23
23
  <h2 id="item-2" class="my-4">Section 2</h2>
24
24
 
25
- {{ get_dummy_text(6, true) }}
25
+ {{- get_dummy_text(6, true) }}
26
26
 
27
- {% if blockquote %}
28
- {% include '@oe-bcl/bcl-blockquote/blockquote.html.twig' with blockquote only %}
29
- {% endif %}
30
- {% if accordion %}
31
- {% include '@oe-bcl/bcl-accordion/accordion.html.twig' with accordion only %}
32
- {% endif %}
33
- {% if timeline %}
34
- {% include '@oe-bcl/bcl-timeline/timeline.html.twig' with timeline only %}
35
- {% endif %}
27
+ {%- if blockquote %}
28
+ {%- include '@oe-bcl/bcl-blockquote/blockquote.html.twig' with blockquote only %}
29
+ {%- endif %}
30
+ {%- if accordion %}
31
+ {%- include '@oe-bcl/bcl-accordion/accordion.html.twig' with accordion only %}
32
+ {%- endif %}
33
+ {%- if timeline %}
34
+ {%- include '@oe-bcl/bcl-timeline/timeline.html.twig' with timeline only %}
35
+ {%- endif %}
36
36
 
37
- {{ get_dummy_text(8, true) }}
37
+ {{- get_dummy_text(8, true) -}}
38
38
 
39
39
  <h2 id="item-3" class="my-4">Section 3</h2>
40
40
 
41
- {{ get_dummy_text(4, true) }}
41
+ {{- get_dummy_text(4, true) }}
42
42
 
43
- {% include '@oe-bcl/bcl-file/file.html.twig' with files[0] only %}
44
- {% include '@oe-bcl/bcl-file/file.html.twig' with files[1] only %}
43
+ {%- include '@oe-bcl/bcl-file/file.html.twig' with files[0] only %}
44
+ {%- include '@oe-bcl/bcl-file/file.html.twig' with files[1] only %}
45
45
  {%- endblock -%}
@@ -8,7 +8,7 @@
8
8
  - attributes (drupal attrs)
9
9
  #}
10
10
 
11
- {% set _path = path|default('') %}
11
+ {%- set _path = path|default('') %}
12
12
  {% set _label = label|default('') %}
13
13
  {% set _disabled = disabled ?? false %}
14
14
  {% set _active = active ?? false %}
@@ -19,44 +19,44 @@
19
19
  {% set _icon_html = icon_html|default('') %}
20
20
  {% set _classes = ['page-link'] %}
21
21
 
22
- {% if _icon_path is not empty and _icon is empty %}
23
- {% if _icon_name is not empty %}
24
- {% set _icon = _icon|merge({
22
+ {%- if _icon_path is not empty and _icon is empty %}
23
+ {%- if _icon_name is not empty %}
24
+ {%- set _icon = _icon|merge({
25
25
  name: _icon_name,
26
26
  path: _icon_path,
27
27
  size: "fluid"
28
28
  }) %}
29
- {% set _label = "" %}
30
- {% endif %}
29
+ {%- set _label = "" %}
30
+ {%- endif %}
31
31
  {% else %}
32
- {% if _icon_html is not empty %}
33
- {% set _label %}
32
+ {%- if _icon_html is not empty %}
33
+ {%- set _label -%}
34
34
  <span aria-hidden="true">{{- _icon_html -}}</span>
35
- {% endset %}
36
- {% endif %}
35
+ {%- endset %}
36
+ {%- endif %}
37
37
  {% endif %}
38
38
 
39
- {% if _icon is not empty %}
40
- {% set _icon = _icon|merge({
39
+ {%- if _icon is not empty %}
40
+ {%- set _icon = _icon|merge({
41
41
  path: _icon_path,
42
42
  }) %}
43
43
  {% endif %}
44
44
 
45
- {% if attributes is empty %}
46
- {% set attributes = create_attribute() %}
45
+ {%- if attributes is empty %}
46
+ {%- set attributes = create_attribute() %}
47
47
  {% endif %}
48
48
 
49
- {% if _aria_label is not empty %}
50
- {% set attributes = attributes.setAttribute('aria-label', _aria_label ) %}
49
+ {%- if _aria_label is not empty %}
50
+ {%- set attributes = attributes.setAttribute('aria-label', _aria_label ) %}
51
51
  {% endif %}
52
52
 
53
- {% if _active %}
54
- {% set attributes = attributes.setAttribute('aria-current', 'page' ) %}
53
+ {%- if _active %}
54
+ {%- set attributes = attributes.setAttribute('aria-current', 'page' ) %}
55
55
  {% endif %}
56
56
 
57
- {% set attributes = attributes.addClass(_classes) %}
57
+ {%- set attributes = attributes.addClass(_classes) %}
58
58
 
59
- {% if _path %}
59
+ {%- if _path %}
60
60
  {%- include '@oe-bcl/bcl-link/link.html.twig' with {
61
61
  label: _label,
62
62
  path: _path,
@@ -64,7 +64,6 @@
64
64
  icon: _icon,
65
65
  attributes: attributes,
66
66
  } only -%}
67
- {% else %}
67
+ {% else -%}
68
68
  <div {{ attributes }}>{{- _label -}}</div>
69
- {% endif %}
70
-
69
+ {%- endif -%}