@openeuropa/bcl-header 1.10.9 → 1.10.10

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 (2) hide show
  1. package/header.html.twig +44 -48
  2. package/package.json +6 -6
package/header.html.twig CHANGED
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - variant (string) (default: 'neutral')
5
3
  - options: ['ec', 'eu', 'neutral']
@@ -22,7 +20,7 @@
22
20
  - attributes (drupal attrs)
23
21
  #}
24
22
 
25
- {% set _variant = variant|default('neutral') %}
23
+ {%- set _variant = variant|default('neutral') %}
26
24
  {% set _navbar = navbar|default({}) %}
27
25
  {% set _project_logo = project_logo|default({}) %}
28
26
  {% set _site_name = site_name|default('') %}
@@ -36,24 +34,24 @@
36
34
  {% set _icon_path = icon_path|default('') %}
37
35
  {% set _modals = modals|default([]) %}
38
36
 
39
- {% set _site_name_classes = 'bcl-header__site-name' %}
37
+ {%- set _site_name_classes = 'bcl-header__site-name' %}
40
38
 
41
- {% if attributes is empty %}
42
- {% set attributes = create_attribute() %}
39
+ {%- if attributes is empty %}
40
+ {%- set attributes = create_attribute() %}
43
41
  {% endif %}
44
42
 
45
- {% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant, 'shadow-sm']) %}
43
+ {%- set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant, 'shadow-sm']) %}
46
44
 
47
- {% if site_name_classes is not empty %}
48
- {% set _site_name_classes = _site_name_classes ~ ' ' ~ site_name_classes %}
45
+ {%- if site_name_classes is not empty %}
46
+ {%- set _site_name_classes = _site_name_classes ~ ' ' ~ site_name_classes %}
49
47
  {% endif %}
50
48
 
51
- {% set _project_classes = 'bcl-header__project' %}
49
+ {%- set _project_classes = 'bcl-header__project' %}
52
50
  {% if _light is not empty %}
53
- {% set _project_classes = _project_classes ~ ' light' %}
51
+ {%- set _project_classes = _project_classes ~ ' light' %}
54
52
  {% endif %}
55
53
 
56
- {% set toggler_attributes = _toggler_attributes.addClass(['bcl-navbar-toggler', 'd-lg-none'])
54
+ {%- set toggler_attributes = _toggler_attributes.addClass(['bcl-navbar-toggler', 'd-lg-none'])
57
55
  .setAttribute('type', 'button')
58
56
  .setAttribute('data-bs-toggle', 'collapse')
59
57
  .setAttribute('data-bs-target', '#' ~ navbar_id)
@@ -61,79 +59,77 @@
61
59
  .setAttribute('aria-expanded', 'false')
62
60
  %}
63
61
 
64
- {% set navbar_toggle_button %}
62
+ {%- set navbar_toggle_button -%}
65
63
  <button
66
64
  {{ toggler_attributes }}
67
65
  >
68
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
66
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
69
67
  name: 'list',
70
68
  size: 'fluid',
71
69
  path: _icon_path,
72
70
  attributes: create_attribute().addClass(['default-icon']),
73
71
  } only %}
74
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
72
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
75
73
  name: 'x',
76
74
  size: 'fluid',
77
75
  path: _icon_path,
78
76
  attributes: create_attribute().addClass(['active-icon']),
79
- } only %}
77
+ } only -%}
80
78
  </button>
81
- {% endset %}
79
+ {%- endset -%}
82
80
 
83
81
  <header
84
82
  {{ attributes }}
85
- >
83
+ >{# -#}
86
84
  <nav
87
- {{ _head.attributes.addClass(['navbar', 'navbar-expand-lg', 'navbar-light']) }}>
85
+ {{ _head.attributes.addClass(['navbar', 'navbar-expand-lg', 'navbar-light']) }}>{# -#}
88
86
  <div class='container'>
89
- {% if _head.brand is not empty %}
87
+ {%- if _head.brand is not empty -%}
90
88
  <a class='navbar-brand' href='{{ _head.brand.link }}'>
91
- {% for logo in _head.brand.logos %}
89
+ {%- for logo in _head.brand.logos -%}
92
90
  <img
93
91
  src='{{ logo.src }}'
94
92
  {% if logo.alt is not empty %}
95
93
  alt='{{ logo.alt }}'
96
94
  {% endif %}
97
- {% if logo.class is not empty %}
95
+ {%- if logo.class is not empty %}
98
96
  class='{{ logo.class }}'
99
97
  {% endif %}
100
98
  />
101
- {% endfor %}
99
+ {%- endfor -%}
102
100
  </a>
103
- {% endif %}
104
- {{ navbar_toggle_button }}
105
- </div>
106
- </nav>
107
-
108
- <!-- site name -->
109
- <div class="bcl-header__site-name" id="site-name-heading">
110
- <div class="container">
111
- <span class="h5 py-3-5 border-top-subtle mb-0 d-block">{{ _site_name }}</span>
112
- </div>
113
- </div>
101
+ {%- endif %}
102
+ {{- navbar_toggle_button -}}
103
+ </div>{# -#}
104
+ </nav>{# -#}
105
+
106
+ <!-- site name -->{# -#}
107
+ <div class="bcl-header__site-name" id="site-name-heading">{# -#}
108
+ <div class="container">{# -#}
109
+ <span class="h5 py-3-5 border-top-subtle mb-0 d-block">{{ _site_name }}</span>{# -#}
110
+ </div>{# -#}
111
+ </div>{# -#}
114
112
 
115
113
  <!-- navbar -->
116
- {% if _navbar is not empty %}
117
- {% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
114
+ {%- if _navbar is not empty %}
115
+ {%- include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
118
116
  disable_collapse: true,
119
117
  attributes: create_attribute().addClass('bcl-header__navbar collapse navbar-collapse').setAttribute('id', _navbar_id).setAttribute('aria-label', 'Main Navigation'),
120
118
  }) only %}
121
- {% endif %}
122
- </header>
119
+ {%- endif -%}
120
+ </header>{# -#}
123
121
 
124
122
  <!-- breadcrumbs -->
125
- {% if _breadcrumbs is not empty %}
123
+ {%- if _breadcrumbs is not empty -%}
126
124
  <div class="container">
127
- {% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
125
+ {%- include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only -%}
128
126
  </div>
129
- {% endif %}
127
+ {%- endif %}
130
128
 
131
- {% for modal in _modals %}
132
- {% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
129
+ {%- for modal in _modals %}
130
+ {%- include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
133
131
  {% endfor %}
134
132
 
135
- {% if _language_modal is not empty %}
136
- {% include '@oe-bcl/bcl-language-list/language-list.html.twig' with _language_modal only %}
137
- {% endif %}
138
-
139
- {% endapply %}
133
+ {%- if _language_modal is not empty %}
134
+ {%- include '@oe-bcl/bcl-language-list/language-list.html.twig' with _language_modal only %}
135
+ {% endif -%}
package/package.json CHANGED
@@ -2,16 +2,16 @@
2
2
  "name": "@openeuropa/bcl-header",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.9",
5
+ "version": "1.10.10",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL header",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-breadcrumb": "^1.10.9",
12
- "@openeuropa/bcl-language-list": "^1.10.9",
13
- "@openeuropa/bcl-modal": "^1.10.9",
14
- "@openeuropa/bcl-navbar": "^1.10.9"
11
+ "@openeuropa/bcl-breadcrumb": "^1.10.10",
12
+ "@openeuropa/bcl-language-list": "^1.10.10",
13
+ "@openeuropa/bcl-modal": "^1.10.10",
14
+ "@openeuropa/bcl-navbar": "^1.10.10"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -27,5 +27,5 @@
27
27
  "design-system",
28
28
  "twig"
29
29
  ],
30
- "gitHead": "cb9864341bfc98404071520d61568bd18e17e1fe"
30
+ "gitHead": "9f7c4a046e8f8f325e4de7e998f1c2a654f6eed1"
31
31
  }