@openeuropa/bcl-twig-templates 0.19.0 → 0.20.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 (31) hide show
  1. package/package.json +61 -56
  2. package/templates/bcl-alert/alert.html.twig +4 -4
  3. package/templates/bcl-badge/badge.html.twig +4 -4
  4. package/templates/bcl-breadcrumb/breadcrumb.html.twig +2 -2
  5. package/templates/bcl-card/card.html.twig +11 -2
  6. package/templates/bcl-card-layout/card-layout.html.twig +6 -1
  7. package/templates/bcl-content-banner/content-banner.html.twig +38 -20
  8. package/templates/bcl-description-list/description-list.html.twig +16 -8
  9. package/templates/bcl-fact-figures/fact-figures.html.twig +3 -3
  10. package/templates/bcl-file/file.html.twig +3 -3
  11. package/templates/bcl-footer/footer.html.twig +1 -1
  12. package/templates/bcl-header/header.html.twig +31 -15
  13. package/templates/bcl-language-list/language-list-grid.html.twig +68 -0
  14. package/templates/bcl-language-list/language-list-modal.html.twig +58 -0
  15. package/templates/bcl-language-list/language-list.html.twig +111 -0
  16. package/templates/bcl-language-switcher/language-switcher.html.twig +44 -0
  17. package/templates/bcl-link/link.html.twig +1 -1
  18. package/templates/bcl-links-block/links-block.html.twig +1 -1
  19. package/templates/bcl-listing/listing.html.twig +4 -3
  20. package/templates/bcl-modal/modal.html.twig +12 -1
  21. package/templates/bcl-navbar/navbar.html.twig +39 -28
  22. package/templates/bcl-page/page.html.twig +1 -1
  23. package/templates/bcl-project/project.html.twig +96 -44
  24. package/templates/bcl-project-status/project-status.html.twig +24 -5
  25. package/templates/bcl-select/select.html.twig +3 -0
  26. package/templates/bcl-subscription/subscription-modal.html.twig +24 -0
  27. package/templates/bcl-subscription/subscription.html.twig +10 -0
  28. package/templates/bcl-subscription-block/subscription-block.html.twig +36 -0
  29. package/templates/bcl-timeline/timeline.html.twig +3 -3
  30. package/templates/bcl-user/user-view-compact.html.twig +9 -2
  31. package/templates/bcl-user/user-view.html.twig +0 -10
package/package.json CHANGED
@@ -2,66 +2,71 @@
2
2
  "name": "@openeuropa/bcl-twig-templates",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.19.0",
5
+ "version": "0.20.0",
6
6
  "description": "OE Bcl Twig Templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "devDependencies": {
11
- "@openeuropa/bcl-accordion": "^0.19.0",
12
- "@openeuropa/bcl-alert": "^0.19.0",
13
- "@openeuropa/bcl-badge": "^0.19.0",
14
- "@openeuropa/bcl-banner": "^0.19.0",
15
- "@openeuropa/bcl-base-templates": "^0.19.0",
16
- "@openeuropa/bcl-blockquote": "^0.19.0",
17
- "@openeuropa/bcl-breadcrumb": "^0.19.0",
18
- "@openeuropa/bcl-button": "^0.19.0",
19
- "@openeuropa/bcl-button-group": "^0.19.0",
20
- "@openeuropa/bcl-card": "^0.19.0",
21
- "@openeuropa/bcl-card-layout": "^0.19.0",
22
- "@openeuropa/bcl-carousel": "^0.19.0",
23
- "@openeuropa/bcl-contact-form": "^0.19.0",
24
- "@openeuropa/bcl-content-banner": "^0.19.0",
25
- "@openeuropa/bcl-date-block": "^0.19.0",
26
- "@openeuropa/bcl-description-list": "^0.19.0",
27
- "@openeuropa/bcl-dropdown": "^0.19.0",
28
- "@openeuropa/bcl-event": "^0.19.0",
29
- "@openeuropa/bcl-fact-figures": "^0.19.0",
30
- "@openeuropa/bcl-featured-media": "^0.19.0",
31
- "@openeuropa/bcl-file": "^0.19.0",
32
- "@openeuropa/bcl-footer": "^0.19.0",
33
- "@openeuropa/bcl-form": "^0.19.0",
34
- "@openeuropa/bcl-form-input": "^0.19.0",
35
- "@openeuropa/bcl-group": "^0.19.0",
36
- "@openeuropa/bcl-header": "^0.19.0",
37
- "@openeuropa/bcl-icon": "^0.19.0",
38
- "@openeuropa/bcl-inpage-navigation": "^0.19.0",
39
- "@openeuropa/bcl-landing-page": "^0.19.0",
40
- "@openeuropa/bcl-link": "^0.19.0",
41
- "@openeuropa/bcl-links-block": "^0.19.0",
42
- "@openeuropa/bcl-list-group": "^0.19.0",
43
- "@openeuropa/bcl-listing": "^0.19.0",
44
- "@openeuropa/bcl-modal": "^0.19.0",
45
- "@openeuropa/bcl-navbar": "^0.19.0",
46
- "@openeuropa/bcl-navigation": "^0.19.0",
47
- "@openeuropa/bcl-news": "^0.19.0",
48
- "@openeuropa/bcl-offcanvas": "^0.19.0",
49
- "@openeuropa/bcl-page": "^0.19.0",
50
- "@openeuropa/bcl-pagination": "^0.19.0",
51
- "@openeuropa/bcl-placeholder": "^0.19.0",
52
- "@openeuropa/bcl-progress": "^0.19.0",
53
- "@openeuropa/bcl-project": "^0.19.0",
54
- "@openeuropa/bcl-project-status": "^0.19.0",
55
- "@openeuropa/bcl-recent-activities": "^0.19.0",
56
- "@openeuropa/bcl-search": "^0.19.0",
57
- "@openeuropa/bcl-search-form": "^0.19.0",
58
- "@openeuropa/bcl-select": "^0.19.0",
59
- "@openeuropa/bcl-spinner": "^0.19.0",
60
- "@openeuropa/bcl-table": "^0.19.0",
61
- "@openeuropa/bcl-textarea": "^0.19.0",
62
- "@openeuropa/bcl-timeline": "^0.19.0",
63
- "@openeuropa/bcl-toast": "^0.19.0",
64
- "@openeuropa/bcl-user": "^0.19.0",
11
+ "@openeuropa/bcl-accordion": "^0.20.0",
12
+ "@openeuropa/bcl-alert": "^0.20.0",
13
+ "@openeuropa/bcl-badge": "^0.20.0",
14
+ "@openeuropa/bcl-banner": "^0.20.0",
15
+ "@openeuropa/bcl-base-templates": "^0.20.0",
16
+ "@openeuropa/bcl-blockquote": "^0.20.0",
17
+ "@openeuropa/bcl-breadcrumb": "^0.20.0",
18
+ "@openeuropa/bcl-button": "^0.20.0",
19
+ "@openeuropa/bcl-button-group": "^0.20.0",
20
+ "@openeuropa/bcl-card": "^0.20.0",
21
+ "@openeuropa/bcl-card-layout": "^0.20.0",
22
+ "@openeuropa/bcl-carousel": "^0.20.0",
23
+ "@openeuropa/bcl-contact-form": "^0.20.0",
24
+ "@openeuropa/bcl-content-banner": "^0.20.0",
25
+ "@openeuropa/bcl-date-block": "^0.20.0",
26
+ "@openeuropa/bcl-description-list": "^0.20.0",
27
+ "@openeuropa/bcl-dropdown": "^0.20.0",
28
+ "@openeuropa/bcl-event": "^0.20.0",
29
+ "@openeuropa/bcl-fact-figures": "^0.20.0",
30
+ "@openeuropa/bcl-featured-media": "^0.20.0",
31
+ "@openeuropa/bcl-file": "^0.20.0",
32
+ "@openeuropa/bcl-footer": "^0.20.0",
33
+ "@openeuropa/bcl-form": "^0.20.0",
34
+ "@openeuropa/bcl-form-input": "^0.20.0",
35
+ "@openeuropa/bcl-group": "^0.20.0",
36
+ "@openeuropa/bcl-header": "^0.20.0",
37
+ "@openeuropa/bcl-icon": "^0.20.0",
38
+ "@openeuropa/bcl-inpage-navigation": "^0.20.0",
39
+ "@openeuropa/bcl-landing-page": "^0.20.0",
40
+ "@openeuropa/bcl-language-list": "^0.20.0",
41
+ "@openeuropa/bcl-language-switcher": "^0.20.0",
42
+ "@openeuropa/bcl-link": "^0.20.0",
43
+ "@openeuropa/bcl-links-block": "^0.20.0",
44
+ "@openeuropa/bcl-list-group": "^0.20.0",
45
+ "@openeuropa/bcl-listing": "^0.20.0",
46
+ "@openeuropa/bcl-modal": "^0.20.0",
47
+ "@openeuropa/bcl-multilingual": "^0.20.0",
48
+ "@openeuropa/bcl-navbar": "^0.20.0",
49
+ "@openeuropa/bcl-navigation": "^0.20.0",
50
+ "@openeuropa/bcl-news": "^0.20.0",
51
+ "@openeuropa/bcl-offcanvas": "^0.20.0",
52
+ "@openeuropa/bcl-page": "^0.20.0",
53
+ "@openeuropa/bcl-pagination": "^0.20.0",
54
+ "@openeuropa/bcl-placeholder": "^0.20.0",
55
+ "@openeuropa/bcl-progress": "^0.20.0",
56
+ "@openeuropa/bcl-project": "^0.20.0",
57
+ "@openeuropa/bcl-project-status": "^0.20.0",
58
+ "@openeuropa/bcl-recent-activities": "^0.20.0",
59
+ "@openeuropa/bcl-search": "^0.20.0",
60
+ "@openeuropa/bcl-search-form": "^0.20.0",
61
+ "@openeuropa/bcl-select": "^0.20.0",
62
+ "@openeuropa/bcl-spinner": "^0.20.0",
63
+ "@openeuropa/bcl-subscription": "^0.20.0",
64
+ "@openeuropa/bcl-subscription-block": "^0.20.0",
65
+ "@openeuropa/bcl-table": "^0.20.0",
66
+ "@openeuropa/bcl-textarea": "^0.20.0",
67
+ "@openeuropa/bcl-timeline": "^0.20.0",
68
+ "@openeuropa/bcl-toast": "^0.20.0",
69
+ "@openeuropa/bcl-user": "^0.20.0",
65
70
  "copyfiles": "2.4.1",
66
71
  "rimraf": "3.0.2"
67
72
  },
@@ -84,5 +89,5 @@
84
89
  "design-system",
85
90
  "twig"
86
91
  ],
87
- "gitHead": "8bfce06400c8829a46578797f0126b4e9c02e725"
92
+ "gitHead": "ea13560489a089d0c198f781e75951a9160d2554"
88
93
  }
@@ -6,14 +6,14 @@
6
6
  - variant (string) (default: 'primary')
7
7
  - dismissible (boolean) (default: true)
8
8
  - animated_dismiss (boolean) (default: true)
9
- - icons_path (string) (default: '')
9
+ - icon_path (string) (default: '')
10
10
  - icon_name (string) (default: '')
11
11
  #}
12
12
 
13
13
  {% set _message = message|default('') %}
14
14
  {% set _variant = variant|default('primary') %}
15
15
  {% set _heading = heading|default('') %}
16
- {% set _icons_path = icons_path|default('') %}
16
+ {% set _icon_path = icon_path|default('') %}
17
17
  {% set _dismissible = dismissible ?? true %}
18
18
  {% set _animated_dismiss = animated_dismiss ?? true %}
19
19
  {% set _icon_name = icon_name|default('') %}
@@ -44,11 +44,11 @@
44
44
  {% set attributes = attributes.addClass(_classes).setAttribute('role', 'alert') %}
45
45
 
46
46
  <div {{ attributes }}>
47
- {% if _icons_path is not empty %}
47
+ {% if _icon_path is not empty %}
48
48
  {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
49
49
  name: _icon_name ?: _icon_names[_variant],
50
50
  size: 's',
51
- path: _icons_path,
51
+ path: _icon_path,
52
52
  attributes: create_attribute().addClass(['flex-shrink-0 me-3 mt-1 align-self-start']),
53
53
  } only %}
54
54
  {% endif %}
@@ -9,7 +9,7 @@
9
9
  - assistive_text (string) (default: '')
10
10
  - rounded_pill (boolean) (default: false)
11
11
  - outline (boolean) (default: false)
12
- - icons_path (string) (default: '')
12
+ - icon_path (string) (default: '')
13
13
  #}
14
14
 
15
15
  {% set _rounded_pill = rounded_pill|default(false) %}
@@ -18,7 +18,7 @@
18
18
  {% set _label = label|default('') %}
19
19
  {% set _classes = ['badge'] %}
20
20
  {% set _url = url|default('') %}
21
- {% set _icons_path = icons_path|default('') %}
21
+ {% set _icon_path = icon_path|default('') %}
22
22
  {% set _title = title|default(_label) %}
23
23
  {% set _dismissible = dismissible|default(false) %}
24
24
  {% set _assistive_text = assistive_text|default('') %}
@@ -58,8 +58,8 @@
58
58
  {%- if _dismissible -%}
59
59
  <span class="icon--close" aria-hidden="true">
60
60
  {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
61
- name: "x",
62
- path: _icons_path,
61
+ name: "x-lg",
62
+ path: _icon_path,
63
63
  } only %}
64
64
  </span>
65
65
  {%- endif -%}
@@ -6,7 +6,7 @@
6
6
 
7
7
  {% set _classes = 'breadcrumb' %}
8
8
  {% set _links = links|default([]) %}
9
- {% set _icons_path = icons_path|default('') %}
9
+ {% set _icon_path = icon_path|default('') %}
10
10
 
11
11
  {% if attributes is empty %}
12
12
  {% set attributes = create_attribute() %}
@@ -41,7 +41,7 @@
41
41
  icon_position: 'before',
42
42
  icon: {
43
43
  name: "arrow-left",
44
- path: _icons_path,
44
+ path: _icon_path,
45
45
  attributes: create_attribute().addClass(['d-md-none ms-0 me-2']),
46
46
  },
47
47
  }) %}
@@ -44,6 +44,10 @@
44
44
  - extra_classes_header (string) (default: '')
45
45
  - extra_classes_footer (string) (default: '')
46
46
  - badges (array of badge object) (default: [])
47
+
48
+ Blocks
49
+ - card_date
50
+ - card_badge
47
51
  #}
48
52
 
49
53
  {% set _title = title|default({}) %}
@@ -145,7 +149,9 @@
145
149
  <div class='{{ _horizontal_grid.left_col_classes }}'>
146
150
  {% endif %}
147
151
  {% if _date is not empty %}
148
- {% include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
152
+ {% block card_date %}
153
+ {% include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
154
+ {% endblock %}
149
155
  {% elseif _image is not empty and _image.position != "bottom" %}
150
156
  <img
151
157
  src="{{ _image.path }}"
@@ -210,7 +216,10 @@
210
216
  })
211
217
  %}
212
218
  {% endif %}
213
- {% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
219
+ {% block card_badge %}
220
+ {% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
221
+ {% endblock %}
222
+
214
223
  {% endfor %}
215
224
  </div>
216
225
  {%- endif -%}
@@ -14,6 +14,9 @@
14
14
  options: ['0', '1', '2', '3', '4', '5']
15
15
  - equal_height (boolean) (default: false)
16
16
  - cols_extra_classes (string) (default: '')
17
+
18
+ Blocks
19
+ - card_layout_card
17
20
  #}
18
21
 
19
22
  {% set _type = type|default('group') %}
@@ -69,7 +72,9 @@
69
72
  {% if _type == 'grid' or _type == 'masonry' %}
70
73
  <div class="{{ _cols_classes }}">
71
74
  {% endif %}
72
- {% include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
75
+ {% block card_layout_card %}
76
+ {% include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
77
+ {% endblock %}
73
78
  {% if _type == 'grid' or _type == 'masonry' %}
74
79
  </div>
75
80
  {% endif %}
@@ -45,34 +45,46 @@
45
45
  {% set attributes = create_attribute() %}
46
46
  {% endif %}
47
47
 
48
+ {% set _body_classes = 'pt-0 px-0 pb-0' %}
49
+ {% set _card_grid = 'col-12 col-md-10' %}
50
+
51
+ {% if _image is not empty %}
52
+ {% set _horizontal_classes = {
53
+ left_col_classes: 'col-md-4 col-lg-3',
54
+ right_col_classes: 'col-md-8 col-lg-9 col-xxl-8'
55
+ } %}
56
+ {% set _body_classes = 'pt-md-0 px-0 px-md-3 pb-0' %}
57
+
58
+ {% if _action_button is not empty %}
59
+ {% set _horizontal_classes = {
60
+ left_col_classes: 'col-md-4 col-lg-3',
61
+ right_col_classes: 'col-md-8 col-lg-9 col-xxl-9'
62
+ } %}
63
+ {% endif %}
64
+ {% else %}
65
+ {% set _horizontal_classes = {
66
+ right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
67
+ } %}
68
+
69
+ {% if _action_button is not empty %}
70
+ {% set _horizontal_classes = {
71
+ right_col_classes: 'col-12'
72
+ } %}
73
+ {% set _card_grid = 'col-12 col-md-8' %}
74
+ {% endif %}
75
+ {% endif %}
76
+
48
77
  {% set _card = {
49
78
  title: title|default({})|merge({
50
79
  tag: 'h2',
51
80
  attributes: create_attribute().addClass(['fw-bold']),
52
81
  }),
53
82
  horizontal: true,
54
- horizontal_grid: {
55
- right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
56
- },
83
+ horizontal_grid: _horizontal_classes,
57
84
  extra_classes_header: 'bg-transparent pt-0 pb-0 border-0',
58
- extra_classes_body: 'pt-0 px-0 pb-0',
85
+ extra_classes_body: _body_classes,
59
86
  } %}
60
87
 
61
- {% if _image is not empty %}
62
- {% set _card = _card|merge({
63
- horizontal_grid: _card.horizontal_grid|merge({
64
- left_col_classes: 'col-md-4 col-lg-3',
65
- }),
66
- extra_classes_body: 'pt-md-0 px-0 px-md-3 pb-0',
67
- }) %}
68
- {% else %}
69
- {% set _card = _card|merge({
70
- horizontal_grid: {
71
- right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
72
- },
73
- }) %}
74
- {% endif %}
75
-
76
88
  {% set _css_classes = _css_classes|merge([_modifiers[_background]]) %}
77
89
  {% set _attributes = attributes.addClass(['bg-transparent', 'border-0']) %}
78
90
 
@@ -83,10 +95,16 @@
83
95
  <div class="{{ _css_classes|join(' ') }}">
84
96
  <div class="container">
85
97
  <div class="row">
98
+ {% if _action_button is not empty %}
99
+ <div class="{{ _card_grid }}">
100
+ {% endif %}
86
101
  {% include '@oe-bcl/bcl-card/card.html.twig' with _card %}
102
+ {% if _action_button is not empty %}
103
+ </div>
104
+ {% endif %}
87
105
 
88
106
  {% if _action_button is not empty %}
89
- <div class="col-12 col-md-2 text-end">
107
+ <div class="col-12 col-md-2 text-end mt-3 mt-md-0">
90
108
  <div class="d-grid d-md-block">
91
109
  {% include '@oe-bcl/bcl-button/button.html.twig' with _action_button only %}
92
110
  </div>
@@ -63,10 +63,14 @@
63
63
  {% include '@oe-bcl/bcl-icon/icon.html.twig' with _term.icon|merge({
64
64
  attributes: create_attribute().addClass(_icon_classes)
65
65
  }) only %}
66
- <p class="mb-0 d-inline-block">{{ _term.label }}</p>
67
- {%- else -%}
68
- {{- _term.label -}}
69
- {%- endif -%}
66
+ <p class="mb-0 d-inline-block">{{ _term.label }}</p>
67
+ {%- elseif _term.color is not empty -%}
68
+ <div class="d-flex align-items-center">
69
+ <span class="p-2 me-2 d-inline-block rounded-1 {{ _term.color }}"></span>{{- _term.label -}}
70
+ </div>
71
+ {%- else -%}
72
+ {{- _term.label -}}
73
+ {%- endif -%}
70
74
  </dt>
71
75
  {% endfor %}
72
76
  {% if _variant == 'horizontal' %}
@@ -87,6 +91,10 @@
87
91
  attributes: create_attribute().addClass(_icon_classes)
88
92
  }) only -%}
89
93
  <p class="mb-0 d-inline-block">{{ _item.term.label }}</p>
94
+ {%- elseif _item.term.color is not empty -%}
95
+ <div class="d-flex align-items-center">
96
+ <span class="p-2 me-2 d-inline-block rounded-1 {{ _item.term.color }}"></span>{{- _item.term.label -}}
97
+ </div>
90
98
  {%- else -%}
91
99
  {{- _item.term.label -}}
92
100
  {%- endif -%}
@@ -96,10 +104,10 @@
96
104
  {% if _item.definition is not empty %}
97
105
  {% if _item.definition is iterable %}
98
106
  {% if _variant == 'horizontal' %}
99
- <div>
107
+ <dd>
100
108
  {% endif %}
101
109
  {% for _definition in _item.definition %}
102
- <dd>
110
+ {% if _variant == 'horizontal' %}<div>{% else %}<dd>{% endif %}
103
111
  {%- if _definition.button is defined -%}
104
112
  {% include '@oe-bcl/bcl-button/button.html.twig' with _definition.button only %}
105
113
  {%- elseif _definition.link is defined %}
@@ -115,10 +123,10 @@
115
123
  {{- _definition.label -}}
116
124
  {%- endif -%}
117
125
  {%- endif -%}
118
- </dd>
126
+ {% if _variant == 'horizontal' %}</div>{% else %}</dd>{% endif %}
119
127
  {% endfor %}
120
128
  {% if _variant == 'horizontal' %}
121
- </div>
129
+ </dd>
122
130
  {% endif %}
123
131
  {% else %}
124
132
  <dd>
@@ -18,7 +18,7 @@
18
18
  - "gutter" (int) (default: 4)
19
19
  - "equal_height" (boolean) (default: false)
20
20
  - "cols_extra_classes" (string) (default: '')
21
- - "icons_path" (string) (default: '')
21
+ - "icon_path" (string) (default: '')
22
22
  - "link_more" (object of type link) (default {})
23
23
  #}
24
24
 
@@ -37,7 +37,7 @@
37
37
  {% set _equal_height = equal_height|default(false) %}
38
38
  {% set _cols_extra_classes = cols_extra_classes|default('') %}
39
39
  {% set _cols_classes = 'col' %}
40
- {% set _icons_path = icons_path|default('') %}
40
+ {% set _icon_path = icon_path|default('') %}
41
41
  {% set _link_more = link_more|default({}) %}
42
42
  {% set _wrapper_classes = [] %}
43
43
 
@@ -83,7 +83,7 @@
83
83
  {% if _item.icon is defined and _item.icon is not empty and _display_icons %}
84
84
  {% set _item = _item|merge({
85
85
  icon: _item.icon|merge({
86
- path: _icons_path,
86
+ path: _icon_path,
87
87
  size: 'l',
88
88
  })
89
89
  }) %}
@@ -135,7 +135,7 @@
135
135
  },
136
136
  attributes: create_attribute()
137
137
  .setAttribute('download', _download.url)
138
- .addClass(['text-underline-hover', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0'])
138
+ .addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0'])
139
139
  }) %}
140
140
  {% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
141
141
  </div>
@@ -148,7 +148,7 @@
148
148
  {% include '@oe-bcl/bcl-link/link.html.twig' with _translation.label|merge({
149
149
  path: '#' ~ _id,
150
150
  attributes: create_attribute()
151
- .addClass(['text-underline-hover'])
151
+ .addClass(['standalone'])
152
152
  .setAttribute('aria-controls', _id)
153
153
  .setAttribute('data-bs-toggle', 'collapse')
154
154
  .setAttribute('aria-expanded', 'false')
@@ -194,7 +194,7 @@
194
194
  },
195
195
  attributes: create_attribute()
196
196
  .setAttribute("download", _item.download.url)
197
- .addClass(['d-block', 'text-underline-hover', 'mt-1'])
197
+ .addClass(['d-block', 'standalone', 'mt-1'])
198
198
  }) only %}
199
199
  </div>
200
200
  </div>
@@ -70,7 +70,7 @@
70
70
  {% if item.type == 'links' %}
71
71
  {% for link in item.links %}
72
72
  {% include '@oe-bcl/bcl-link/link.html.twig' with link|merge({
73
- attributes: create_attribute().addClass(['d-block', 'text-underline-hover', 'mb-1'])
73
+ attributes: create_attribute().addClass(['d-block', 'standalone', 'mb-1'])
74
74
  }) only %}
75
75
  {% endfor %}
76
76
  {% endif %}
@@ -10,19 +10,23 @@
10
10
  classes: ""
11
11
  }
12
12
  - site_name (string) (default: "")
13
+ - project_link (string) (default: "")
13
14
  - head (Navbar object) (default: {})
14
15
  - breadcrumbs (Breadcrumbs object) (default: {})
15
16
  - light (boolean) (default: false)
16
17
  - modals (Array of modal objects) (default: [])
18
+ - language_modal (object) (default: {})
17
19
  #}
18
20
 
19
21
  {% set _variant = variant|default('neutral') %}
20
22
  {% set _navbar = navbar|default({}) %}
21
23
  {% set _project_logo = project_logo|default({}) %}
24
+ {% set _project_link = project_link|default('') %}
22
25
  {% set _site_name = site_name|default('') %}
23
26
  {% set _site_name_classes = 'bcl-header__site-name' %}
24
27
  {% set _head = head|default({}) %}
25
28
  {% set _breadcrumbs = breadcrumbs|default({}) %}
29
+ {% set _language_modal = language_modal|default({}) %}
26
30
  {% set _modals = modals|default([]) %}
27
31
  {% set _light = light|default(false) %}
28
32
 
@@ -53,23 +57,31 @@
53
57
  {% if _project_logo is not empty or _site_name is not empty %}
54
58
  <div class="{{ _project_classes }}">
55
59
  <div class="container">
56
- {% if _project_logo is not empty %}
57
- <img
58
- {% if _project_logo.path is not empty %}
59
- src="{{ _project_logo.path }}"
60
- {% endif %}
61
- {% if _project_logo.alt is not empty %}
62
- alt="{{ _project_logo.alt }}"
60
+ {% if _project_link is not empty %}
61
+ <a
62
+ href="{{ _project_link }}"
63
+ >
64
+ {% endif %}
65
+ {% if _project_logo is not empty %}
66
+ <img
67
+ {% if _project_logo.path is not empty %}
68
+ src="{{ _project_logo.path }}"
69
+ {% endif %}
70
+ {% if _project_logo.alt is not empty %}
71
+ alt="{{ _project_logo.alt }}"
72
+ {% endif %}
73
+ {% if _project_logo.classes is not empty %}
74
+ class="{{ _project_logo.classes }}"
75
+ {% endif %}
76
+ />
63
77
  {% endif %}
64
- {% if _project_logo.classes is not empty %}
65
- class="{{ _project_logo.classes }}"
78
+ {% if _site_name is not empty %}
79
+ <span class="{{ _site_name_classes }}">
80
+ {{- _site_name -}}
81
+ </span>
66
82
  {% endif %}
67
- />
68
- {% endif %}
69
- {% if _site_name is not empty %}
70
- <div class="{{ _site_name_classes }}">
71
- {{- _site_name -}}
72
- </div>
83
+ {% if _project_link is not empty %}
84
+ </a>
73
85
  {% endif %}
74
86
  </div>
75
87
  </div>
@@ -92,4 +104,8 @@
92
104
  {% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
93
105
  {% endfor %}
94
106
 
107
+ {% if _language_modal is not empty %}
108
+ {% include '@oe-bcl/bcl-language-list/language-list.html.twig' with _language_modal only %}
109
+ {% endif %}
110
+
95
111
  {% endspaceless %}
@@ -0,0 +1,68 @@
1
+ {% spaceless %}
2
+
3
+ {#
4
+ Parameters:
5
+ - items (array) (default: []) format: [
6
+ {
7
+ lang (string)
8
+ label (string)
9
+ path (string)
10
+ active (boolean)
11
+ }
12
+ ]
13
+ - category (string) (default: '')
14
+ - icon_path (string) (default: '')
15
+ #}
16
+
17
+ {% set _items = items|default([]) %}
18
+ {% set _icon_path = icon_path|default('') %}
19
+ {% set _category = category|default('') %}
20
+
21
+ {% set _columns = [] %}
22
+ {% set _columns = _columns|merge([_items|slice(0, (items|length / 2)|round(0, 'ceil'))]) %}
23
+ {% set _columns = _columns|merge([_items|slice((items|length / 2)|round(0, 'ceil'), items|length)]) %}
24
+
25
+ <div class="pb-2">
26
+ {% if _category is not empty %}
27
+ <h5 class="mb-4">{{ _category }}</h5>
28
+ {% endif %}
29
+ {% if _columns is not empty and _columns is iterable %}
30
+ <div class="row">
31
+ {% for _column in _columns %}
32
+ <div class="col-12 col-md">
33
+ {% for _item in _column %}
34
+ {% if _item.attributes is empty %}
35
+ {% set _item = _item|merge({
36
+ attributes: create_attribute()
37
+ }) %}
38
+ {% endif %}
39
+ {% set _item = _item|merge({
40
+ attributes: _item.attributes.addClass(['w-100', 'mb-2-5', 'btn', 'w-100'])
41
+ }) %}
42
+ {% if _item.active %}
43
+ {% set _item = _item|merge({
44
+ icon: {
45
+ name: "check2",
46
+ path: _icon_path,
47
+ },
48
+ attributes: _item.attributes.addClass(['selected', 'justify-content-between'])
49
+ }) %}
50
+ {% else %}
51
+ {% set _item = _item|merge({
52
+ attributes: _item.attributes.addClass('justify-content-start')
53
+ }) %}
54
+ {% endif %}
55
+ {% if _item.lang is not empty %}
56
+ {% set _item = _item|merge({
57
+ attributes: _item.attributes.setAttribute('lang', _item.lang).setAttribute('hreflang', _item.lang)
58
+ }) %}
59
+ {% endif %}
60
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
61
+ {% endfor %}
62
+ </div>
63
+ {% endfor %}
64
+ </div>
65
+ {% endif %}
66
+ </div>
67
+
68
+ {% endspaceless %}