@openeuropa/bcl-base-templates 1.10.9 → 1.10.11

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.
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {#
4
2
  Parameters:
5
3
  - with_header (boolean) (default: false)
@@ -25,7 +23,7 @@
25
23
  - messages_area
26
24
  #}
27
25
 
28
- {% set _with_header = header ?? false %}
26
+ {%- set _with_header = header ?? false %}
29
27
  {% set _with_footer = footer ?? false %}
30
28
  {% set _with_banner = banner ?? false %}
31
29
  {% set _with_sidebar = sidebar ?? false %}
@@ -34,8 +32,8 @@
34
32
  {% set _content_type = content_type|default('') %}
35
33
  {% set _classes = ['bcl-node-type'] %}
36
34
 
37
- {% if _with_sidebar %}
38
- {% set _col_classes = {
35
+ {%- if _with_sidebar %}
36
+ {%- set _col_classes = {
39
37
  left: [
40
38
  'col-12',
41
39
  'bcl-sidebar',
@@ -45,95 +43,93 @@
45
43
  ],
46
44
  } %}
47
45
 
48
- {% if _sidebar_size == 'normal' %}
49
- {% set _col_classes = _col_classes|merge({
46
+ {%- if _sidebar_size == 'normal' %}
47
+ {%- set _col_classes = _col_classes|merge({
50
48
  left: _col_classes.left|merge(['col-lg-3']),
51
49
  right: _col_classes.right|merge(['col-lg-9', 'col-xxl-8']),
52
50
  }) %}
53
- {% endif %}
51
+ {%- endif %}
54
52
 
55
- {% if _sidebar_size == 'large' %}
56
- {% set _col_classes = _col_classes|merge({
53
+ {%- if _sidebar_size == 'large' %}
54
+ {%- set _col_classes = _col_classes|merge({
57
55
  left: _col_classes.left|merge(['col-lg-4']),
58
56
  right: _col_classes.right|merge(['col-lg-8']),
59
57
  }) %}
60
- {% endif %}
58
+ {%- endif %}
61
59
  {% endif %}
62
60
 
63
- {% if _content_type is not empty %}
64
- {% set _classes = _classes|merge(['bcl-' ~ _content_type]) %}
61
+ {%- if _content_type is not empty %}
62
+ {%- set _classes = _classes|merge(['bcl-' ~ _content_type]) %}
65
63
  {% endif %}
66
64
 
67
- {% if attributes is empty %}
68
- {% set attributes = create_attribute() %}
65
+ {%- if attributes is empty %}
66
+ {%- set attributes = create_attribute() %}
69
67
  {% endif %}
70
68
 
71
- {% if _with_header %}
72
- {% include '@oe-bcl/bcl-header/header.html.twig' with header only %}
73
- {% endif %}
69
+ {%- if _with_header %}
70
+ {%- include '@oe-bcl/bcl-header/header.html.twig' with header only %}
71
+ {% endif -%}
74
72
 
75
73
  <main {{ attributes }}>
76
- {% if messages is defined and messages is not empty %}
77
- {% block messages_area %}
74
+ {%- if messages is defined and messages is not empty %}
75
+ {%- block messages_area -%}
78
76
  <div class="container">
79
- {% for message in messages %}
80
- {% set message_attributes = create_attribute().addClass(['mt-lg-5', 'mt-2']) %}
81
- {% include '@oe-bcl/bcl-alert/alert.html.twig' with message|merge({
77
+ {%- for message in messages %}
78
+ {%- set message_attributes = create_attribute().addClass(['mt-lg-5', 'mt-2']) %}
79
+ {%- include '@oe-bcl/bcl-alert/alert.html.twig' with message|merge({
82
80
  attributes: message_attributes,
83
81
  }) only %}
84
- {% endfor %}
82
+ {%- endfor -%}
85
83
  </div>
86
- {% endblock %}
84
+ {%- endblock %}
87
85
  {% endif %}
88
86
 
89
- {% if _with_banner %}
90
- {% block banner %}
91
- {% include '@oe-bcl/bcl-content-banner/content-banner.html.twig' with banner only %}
92
- {% endblock %}
93
- {% endif %}
87
+ {%- if _with_banner %}
88
+ {%- block banner %}
89
+ {%- include '@oe-bcl/bcl-content-banner/content-banner.html.twig' with banner only %}
90
+ {%- endblock %}
91
+ {% endif -%}
94
92
 
95
- <div class="container mt-md-4-75 mt-4">
93
+ <div class="container mt-md-4-75 mt-4">{# -#}
96
94
  <div class="row">
97
- {% block content_row %}
98
- {{ content_row }}
99
- {% endblock %}
100
- {% if _with_sidebar %}
95
+ {%- block content_row %}
96
+ {{- content_row }}
97
+ {%- endblock %}
98
+ {%- if _with_sidebar -%}
101
99
  <div class="{{ _col_classes.left|join(' ') }}">
102
- {% block sidebar %}{% endblock %}
103
- </div>
100
+ {%- block sidebar %}{% endblock -%}
101
+ </div>{# -#}
104
102
  <div class="{{ _col_classes.right|join(' ') }}">
105
- {% else %}
106
- {% if _landing %}
103
+ {%- else %}
104
+ {%- if _landing -%}
107
105
  <div class="col-12">
108
- {% else %}
106
+ {%- else -%}
109
107
  <div class="col-lg-10 col-xl-9 col-xxl-8">
110
- {% endif %}
111
- {% endif %}
112
- {% block content_top %}
113
- {{ content_top }}
114
- {% endblock %}
115
- {% block content %}
116
- {{ content }}
117
- {% endblock %}
118
- {% block content_bottom %}
119
- {{ content_bottom }}
120
- {% endblock %}
121
- {% block related %}
122
- {{ related }}
123
- {% endblock %}
124
- {% block share %}
125
- {{ share }}
126
- {% endblock %}
127
- </div>
128
- </div>
108
+ {%- endif %}
109
+ {%- endif %}
110
+ {%- block content_top %}
111
+ {{- content_top }}
112
+ {%- endblock %}
113
+ {%- block content %}
114
+ {{- content }}
115
+ {%- endblock %}
116
+ {%- block content_bottom %}
117
+ {{- content_bottom }}
118
+ {%- endblock %}
119
+ {%- block related %}
120
+ {{- related }}
121
+ {%- endblock %}
122
+ {%- block share %}
123
+ {{- share }}
124
+ {%- endblock -%}
125
+ </div>{# -#}
126
+ </div>{# -#}
129
127
  </main>
130
128
 
131
- {% block feedback %}
132
- {{ feedback }}
133
- {% endblock %}
134
-
135
- {% if _with_footer %}
136
- {% include '@oe-bcl/bcl-footer/footer.html.twig' with footer only %}
137
- {% endif %}
129
+ {%- block feedback %}
130
+ {{- feedback }}
131
+ {%- endblock %}
138
132
 
139
- {% endapply %}
133
+ {%- if _with_footer %}
134
+ {%- include '@oe-bcl/bcl-footer/footer.html.twig' with footer only %}
135
+ {% endif -%}
@@ -13,60 +13,60 @@
13
13
  {% set _listing = listing|default({}) %}
14
14
 
15
15
  {%- block content_top %}
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 _title_attributes = _title_attributes ?: create_attribute() %}
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 _title_attributes = _title_attributes ?: create_attribute() %}
21
21
  {% if filter_button %}
22
- {% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
23
- {% endif %}
24
- <div class="row">
22
+ {%- include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
23
+ {% endif -%}
24
+ <div class="row">{# -#}
25
25
  <div class="col-md-6 col-lg-8 align-self-center">
26
- {% if _title is not empty %}
27
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
26
+ {%- if _title is not empty %}
27
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
28
28
  title: _title ~ ' (' ~ (_listing.items|length) ~ ')',
29
29
  title_tag: _title_tag,
30
30
  title_link: _title_link,
31
31
  attributes: _title_attributes.addClass(['mb-0', 'text-capitalize']),
32
32
  } only %}
33
- {% endif %}
33
+ {%- endif -%}
34
34
  </div>
35
- {% if badges is not empty and badges is iterable %}
35
+ {%- if badges is not empty and badges is iterable -%}
36
36
  <div class="col-md-12 order-md-2 mt-3">
37
- {% for badge in badges %}
38
- {% include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
37
+ {%- for badge in badges %}
38
+ {%- include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
39
39
  attributes: create_attribute().addClass(["mb-2", "me-2"])
40
40
  }) only %}
41
- {% endfor %}
41
+ {%- endfor -%}
42
42
  </div>
43
- {% endif %}
44
- <div class="col-md-6 col-lg-4 mt-3 mt-md-0">
43
+ {%- endif -%}
44
+ <div class="col-md-6 col-lg-4 mt-3 mt-md-0">{# -#}
45
45
  <div class="float-md-end d-md-flex align-items-center mb-4 mb-md-0">
46
- {% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
46
+ {%- include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
47
47
  attributes: create_attribute().addClass(['ms-md-2']),
48
- }) only %}
49
- </div>
50
- </div>
51
- </div>
48
+ }) only -%}
49
+ </div>{# -#}
50
+ </div>{# -#}
51
+ </div>{# -#}
52
52
  <hr class="d-none d-md-block mb-4-75"/>
53
53
  {%- endblock -%}
54
54
 
55
55
  {%- block content %}
56
- {% if _listing is not empty %}
57
- {% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing only %}
58
- {% endif %}
56
+ {%- if _listing is not empty %}
57
+ {%- include '@oe-bcl/bcl-listing/listing.html.twig' with _listing only %}
58
+ {%- endif %}
59
59
  {%- endblock -%}
60
60
 
61
61
  {%- block content_bottom %}
62
- {% set _pagination = pagination|default({}) %}
63
- {% if _pagination is not empty %}
62
+ {%- set _pagination = pagination|default({}) %}
63
+ {%- if _pagination is not empty -%}
64
64
  <hr class="d-none d-md-block mt-4-5">
65
- {% include '@oe-bcl/bcl-pagination/pagination.html.twig' with _pagination only %}
66
- {% endif %}
65
+ {%- include '@oe-bcl/bcl-pagination/pagination.html.twig' with _pagination only %}
66
+ {%- endif %}
67
67
  {%- endblock -%}
68
68
 
69
69
  {%- block sidebar %}
70
- {% set _sidebar = sidebar|default({}) %}
71
- {% include '@oe-bcl/bcl-base-templates/sidebar-search.html.twig' with _sidebar only %}
70
+ {%- set _sidebar = sidebar|default({}) %}
71
+ {%- include '@oe-bcl/bcl-base-templates/sidebar-search.html.twig' with _sidebar only %}
72
72
  {%- endblock -%}
package/package.json CHANGED
@@ -2,21 +2,21 @@
2
2
  "name": "@openeuropa/bcl-base-templates",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.9",
5
+ "version": "1.10.11",
6
6
  "description": "OE - BCL base templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-badge": "^1.10.9",
12
- "@openeuropa/bcl-button": "^1.10.9",
13
- "@openeuropa/bcl-content-banner": "^1.10.9",
14
- "@openeuropa/bcl-footer": "^1.10.9",
15
- "@openeuropa/bcl-header": "^1.10.9",
16
- "@openeuropa/bcl-listing": "^1.10.9",
17
- "@openeuropa/bcl-offcanvas": "^1.10.9",
18
- "@openeuropa/bcl-pagination": "^1.10.9",
19
- "@openeuropa/bcl-select": "^1.10.9"
11
+ "@openeuropa/bcl-badge": "^1.10.11",
12
+ "@openeuropa/bcl-button": "^1.10.11",
13
+ "@openeuropa/bcl-content-banner": "^1.10.11",
14
+ "@openeuropa/bcl-footer": "^1.10.11",
15
+ "@openeuropa/bcl-header": "^1.10.11",
16
+ "@openeuropa/bcl-listing": "^1.10.11",
17
+ "@openeuropa/bcl-offcanvas": "^1.10.11",
18
+ "@openeuropa/bcl-pagination": "^1.10.11",
19
+ "@openeuropa/bcl-select": "^1.10.11"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",
@@ -32,5 +32,5 @@
32
32
  "design-system",
33
33
  "twig"
34
34
  ],
35
- "gitHead": "cb9864341bfc98404071520d61568bd18e17e1fe"
35
+ "gitHead": "82aecf2f60f8bd8f9afd447ea0d044396f085823"
36
36
  }
@@ -1,20 +1,20 @@
1
1
  {% extends "@oe-bcl/bcl-offcanvas/offcanvas.html.twig" %}
2
2
 
3
- {% set responsiveness = 'lg' %}
3
+ {%- set responsiveness = 'lg' %}
4
4
  {% if extra_classes_header is empty %}
5
- {% set extra_classes_header = 'd-lg-block' %}
5
+ {%- set extra_classes_header = 'd-lg-block' %}
6
6
  {% else %}
7
- {% set extra_classes_header = extra_classes_header ~ ' d-lg-block' %}
7
+ {%- set extra_classes_header = extra_classes_header ~ ' d-lg-block' %}
8
8
  {% endif %}
9
9
 
10
- {% block body %}
11
- {% if search_form.attributes is empty %}
12
- {% set attributes = search_form.create_attribute() %}
13
- {% endif %}
10
+ {%- block body %}
11
+ {%- if search_form.attributes is empty %}
12
+ {%- set attributes = search_form.create_attribute() %}
13
+ {%- endif -%}
14
14
 
15
15
  <div class="offcanvas-body p-lg-0">
16
- {% include '@oe-bcl/bcl-form/form.html.twig' with search_form|merge({
16
+ {%- include '@oe-bcl/bcl-form/form.html.twig' with search_form|merge({
17
17
  attributes: search_form.attributes.addClass('w-100')
18
- }) only %}
18
+ }) only -%}
19
19
  </div>
20
- {% endblock %}
20
+ {%- endblock %}