@openeuropa/bcl-twig-templates 0.22.0 → 0.25.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 (66) hide show
  1. package/package.json +65 -64
  2. package/templates/bcl-accordion/accordion.html.twig +21 -5
  3. package/templates/bcl-alert/alert.html.twig +5 -3
  4. package/templates/bcl-badge/badge.html.twig +20 -14
  5. package/templates/bcl-banner/banner.html.twig +9 -5
  6. package/templates/bcl-base-templates/content-type.html.twig +8 -3
  7. package/templates/bcl-base-templates/listing-page.html.twig +21 -9
  8. package/templates/bcl-blockquote/blockquote.html.twig +20 -1
  9. package/templates/bcl-breadcrumb/breadcrumb.html.twig +3 -1
  10. package/templates/bcl-button/button.html.twig +6 -4
  11. package/templates/bcl-button-group/button-group.html.twig +4 -3
  12. package/templates/bcl-card/card.html.twig +32 -31
  13. package/templates/bcl-card-layout/card-layout.html.twig +3 -1
  14. package/templates/bcl-carousel/carousel.html.twig +27 -9
  15. package/templates/bcl-content-banner/content-banner.html.twig +54 -45
  16. package/templates/bcl-description-list/description-list.html.twig +136 -94
  17. package/templates/bcl-dropdown/dropdown.html.twig +3 -1
  18. package/templates/bcl-event/event.html.twig +2 -2
  19. package/templates/bcl-fact-figures/fact-figures.html.twig +30 -26
  20. package/templates/bcl-featured-media/featured-media.html.twig +21 -9
  21. package/templates/bcl-file/file.html.twig +58 -47
  22. package/templates/bcl-footer/footer.html.twig +2 -2
  23. package/templates/bcl-form/form.html.twig +5 -4
  24. package/templates/bcl-form-input/form-input.html.twig +25 -21
  25. package/templates/bcl-gallery/gallery.html.twig +18 -17
  26. package/templates/bcl-glossary/glossary-detail.html.twig +43 -0
  27. package/templates/bcl-glossary/glossary-listing.html.twig +22 -0
  28. package/templates/bcl-group/group-landing.html.twig +7 -7
  29. package/templates/bcl-group/group.html.twig +1 -1
  30. package/templates/bcl-header/header.html.twig +11 -9
  31. package/templates/bcl-heading/heading.html.twig +9 -11
  32. package/templates/bcl-icon/icon.html.twig +3 -2
  33. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +25 -28
  34. package/templates/bcl-landing-page/landing-page.html.twig +2 -2
  35. package/templates/bcl-language-list/language-list-grid.html.twig +1 -1
  36. package/templates/bcl-link/link.html.twig +6 -4
  37. package/templates/bcl-links-block/links-block.html.twig +28 -19
  38. package/templates/bcl-list-group/list-group.html.twig +3 -1
  39. package/templates/bcl-listing/listing.html.twig +57 -58
  40. package/templates/bcl-modal/modal.html.twig +17 -5
  41. package/templates/bcl-navbar/navbar.html.twig +4 -1
  42. package/templates/bcl-navigation/navigation.html.twig +3 -1
  43. package/templates/bcl-offcanvas/offcanvas.html.twig +21 -23
  44. package/templates/bcl-page/page.html.twig +7 -26
  45. package/templates/bcl-pagination/pagination.html.twig +10 -4
  46. package/templates/bcl-person/person.html.twig +6 -19
  47. package/templates/bcl-placeholder/placeholder.html.twig +4 -3
  48. package/templates/bcl-progress/progress.html.twig +5 -0
  49. package/templates/bcl-project/project-lists.html.twig +8 -5
  50. package/templates/bcl-project/project.html.twig +11 -19
  51. package/templates/bcl-project-status/project-status.html.twig +2 -0
  52. package/templates/bcl-recent-activities/recent-activities.html.twig +9 -7
  53. package/templates/bcl-search/search.html.twig +9 -2
  54. package/templates/bcl-search-form/search-form.html.twig +6 -5
  55. package/templates/bcl-select/select.html.twig +18 -17
  56. package/templates/bcl-spinner/spinner.html.twig +2 -0
  57. package/templates/bcl-subscription-block/subscription-block.html.twig +4 -2
  58. package/templates/bcl-table/table.html.twig +3 -1
  59. package/templates/bcl-textarea/textarea.html.twig +22 -19
  60. package/templates/bcl-timeline/timeline.html.twig +24 -20
  61. package/templates/bcl-toast/toasts.html.twig +15 -15
  62. package/templates/bcl-user/{user-view-compact.html.twig → user-compact.html.twig} +3 -2
  63. package/templates/bcl-user/user-terms.html.twig +11 -0
  64. package/templates/bcl-user/user.html.twig +137 -0
  65. package/templates/bcl-user/user-edit.html.twig +0 -38
  66. package/templates/bcl-user/user-view.html.twig +0 -86
package/package.json CHANGED
@@ -2,74 +2,75 @@
2
2
  "name": "@openeuropa/bcl-twig-templates",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.22.0",
5
+ "version": "0.25.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.22.0",
12
- "@openeuropa/bcl-alert": "^0.22.0",
13
- "@openeuropa/bcl-badge": "^0.22.0",
14
- "@openeuropa/bcl-banner": "^0.22.0",
15
- "@openeuropa/bcl-base-templates": "^0.22.0",
16
- "@openeuropa/bcl-blockquote": "^0.22.0",
17
- "@openeuropa/bcl-breadcrumb": "^0.22.0",
18
- "@openeuropa/bcl-button": "^0.22.0",
19
- "@openeuropa/bcl-button-group": "^0.22.0",
20
- "@openeuropa/bcl-card": "^0.22.0",
21
- "@openeuropa/bcl-card-layout": "^0.22.0",
22
- "@openeuropa/bcl-carousel": "^0.22.0",
23
- "@openeuropa/bcl-contact-form": "^0.22.0",
24
- "@openeuropa/bcl-content-banner": "^0.22.0",
25
- "@openeuropa/bcl-date-block": "^0.22.0",
26
- "@openeuropa/bcl-description-list": "^0.22.0",
27
- "@openeuropa/bcl-dropdown": "^0.22.0",
28
- "@openeuropa/bcl-event": "^0.22.0",
29
- "@openeuropa/bcl-fact-figures": "^0.22.0",
30
- "@openeuropa/bcl-featured-media": "^0.22.0",
31
- "@openeuropa/bcl-file": "^0.22.0",
32
- "@openeuropa/bcl-footer": "^0.22.0",
33
- "@openeuropa/bcl-form": "^0.22.0",
34
- "@openeuropa/bcl-form-input": "^0.22.0",
35
- "@openeuropa/bcl-gallery": "^0.22.0",
36
- "@openeuropa/bcl-group": "^0.22.0",
37
- "@openeuropa/bcl-header": "^0.22.0",
38
- "@openeuropa/bcl-heading": "^0.22.0",
39
- "@openeuropa/bcl-icon": "^0.22.0",
40
- "@openeuropa/bcl-inpage-navigation": "^0.22.0",
41
- "@openeuropa/bcl-landing-page": "^0.22.0",
42
- "@openeuropa/bcl-language-list": "^0.22.0",
43
- "@openeuropa/bcl-language-switcher": "^0.22.0",
44
- "@openeuropa/bcl-link": "^0.22.0",
45
- "@openeuropa/bcl-links-block": "^0.22.0",
46
- "@openeuropa/bcl-list-group": "^0.22.0",
47
- "@openeuropa/bcl-listing": "^0.22.0",
48
- "@openeuropa/bcl-modal": "^0.22.0",
49
- "@openeuropa/bcl-multilingual": "^0.22.0",
50
- "@openeuropa/bcl-navbar": "^0.22.0",
51
- "@openeuropa/bcl-navigation": "^0.22.0",
52
- "@openeuropa/bcl-news": "^0.22.0",
53
- "@openeuropa/bcl-offcanvas": "^0.22.0",
54
- "@openeuropa/bcl-page": "^0.22.0",
55
- "@openeuropa/bcl-pagination": "^0.22.0",
56
- "@openeuropa/bcl-person": "^0.22.0",
57
- "@openeuropa/bcl-placeholder": "^0.22.0",
58
- "@openeuropa/bcl-progress": "^0.22.0",
59
- "@openeuropa/bcl-project": "^0.22.0",
60
- "@openeuropa/bcl-project-status": "^0.22.0",
61
- "@openeuropa/bcl-recent-activities": "^0.22.0",
62
- "@openeuropa/bcl-search": "^0.22.0",
63
- "@openeuropa/bcl-search-form": "^0.22.0",
64
- "@openeuropa/bcl-select": "^0.22.0",
65
- "@openeuropa/bcl-spinner": "^0.22.0",
66
- "@openeuropa/bcl-subscription": "^0.22.0",
67
- "@openeuropa/bcl-subscription-block": "^0.22.0",
68
- "@openeuropa/bcl-table": "^0.22.0",
69
- "@openeuropa/bcl-textarea": "^0.22.0",
70
- "@openeuropa/bcl-timeline": "^0.22.0",
71
- "@openeuropa/bcl-toast": "^0.22.0",
72
- "@openeuropa/bcl-user": "^0.22.0",
11
+ "@openeuropa/bcl-accordion": "^0.25.0",
12
+ "@openeuropa/bcl-alert": "^0.25.0",
13
+ "@openeuropa/bcl-badge": "^0.25.0",
14
+ "@openeuropa/bcl-banner": "^0.25.0",
15
+ "@openeuropa/bcl-base-templates": "^0.25.0",
16
+ "@openeuropa/bcl-blockquote": "^0.25.0",
17
+ "@openeuropa/bcl-breadcrumb": "^0.25.0",
18
+ "@openeuropa/bcl-button": "^0.25.0",
19
+ "@openeuropa/bcl-button-group": "^0.25.0",
20
+ "@openeuropa/bcl-card": "^0.25.0",
21
+ "@openeuropa/bcl-card-layout": "^0.25.0",
22
+ "@openeuropa/bcl-carousel": "^0.25.0",
23
+ "@openeuropa/bcl-contact-form": "^0.25.0",
24
+ "@openeuropa/bcl-content-banner": "^0.25.0",
25
+ "@openeuropa/bcl-date-block": "^0.25.0",
26
+ "@openeuropa/bcl-description-list": "^0.25.0",
27
+ "@openeuropa/bcl-dropdown": "^0.25.0",
28
+ "@openeuropa/bcl-event": "^0.25.0",
29
+ "@openeuropa/bcl-fact-figures": "^0.25.0",
30
+ "@openeuropa/bcl-featured-media": "^0.25.0",
31
+ "@openeuropa/bcl-file": "^0.25.0",
32
+ "@openeuropa/bcl-footer": "^0.25.0",
33
+ "@openeuropa/bcl-form": "^0.25.0",
34
+ "@openeuropa/bcl-form-input": "^0.25.0",
35
+ "@openeuropa/bcl-gallery": "^0.25.0",
36
+ "@openeuropa/bcl-glossary": "^0.25.0",
37
+ "@openeuropa/bcl-group": "^0.25.0",
38
+ "@openeuropa/bcl-header": "^0.25.0",
39
+ "@openeuropa/bcl-heading": "^0.25.0",
40
+ "@openeuropa/bcl-icon": "^0.25.0",
41
+ "@openeuropa/bcl-inpage-navigation": "^0.25.0",
42
+ "@openeuropa/bcl-landing-page": "^0.25.0",
43
+ "@openeuropa/bcl-language-list": "^0.25.0",
44
+ "@openeuropa/bcl-language-switcher": "^0.25.0",
45
+ "@openeuropa/bcl-link": "^0.25.0",
46
+ "@openeuropa/bcl-links-block": "^0.25.0",
47
+ "@openeuropa/bcl-list-group": "^0.25.0",
48
+ "@openeuropa/bcl-listing": "^0.25.0",
49
+ "@openeuropa/bcl-modal": "^0.25.0",
50
+ "@openeuropa/bcl-multilingual": "^0.25.0",
51
+ "@openeuropa/bcl-navbar": "^0.25.0",
52
+ "@openeuropa/bcl-navigation": "^0.25.0",
53
+ "@openeuropa/bcl-news": "^0.25.0",
54
+ "@openeuropa/bcl-offcanvas": "^0.25.0",
55
+ "@openeuropa/bcl-page": "^0.25.0",
56
+ "@openeuropa/bcl-pagination": "^0.25.0",
57
+ "@openeuropa/bcl-person": "^0.25.0",
58
+ "@openeuropa/bcl-placeholder": "^0.25.0",
59
+ "@openeuropa/bcl-progress": "^0.25.0",
60
+ "@openeuropa/bcl-project": "^0.25.0",
61
+ "@openeuropa/bcl-project-status": "^0.25.0",
62
+ "@openeuropa/bcl-recent-activities": "^0.25.0",
63
+ "@openeuropa/bcl-search": "^0.25.0",
64
+ "@openeuropa/bcl-search-form": "^0.25.0",
65
+ "@openeuropa/bcl-select": "^0.25.0",
66
+ "@openeuropa/bcl-spinner": "^0.25.0",
67
+ "@openeuropa/bcl-subscription": "^0.25.0",
68
+ "@openeuropa/bcl-subscription-block": "^0.25.0",
69
+ "@openeuropa/bcl-table": "^0.25.0",
70
+ "@openeuropa/bcl-textarea": "^0.25.0",
71
+ "@openeuropa/bcl-timeline": "^0.25.0",
72
+ "@openeuropa/bcl-toast": "^0.25.0",
73
+ "@openeuropa/bcl-user": "^0.25.0",
73
74
  "copyfiles": "2.4.1",
74
75
  "rimraf": "3.0.2"
75
76
  },
@@ -92,5 +93,5 @@
92
93
  "design-system",
93
94
  "twig"
94
95
  ],
95
- "gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
96
+ "gitHead": "f50c7dfeab8695bbb5c18d5f7d5304509512268a"
96
97
  }
@@ -2,21 +2,28 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
+ - title (string) (default: '')
6
+ - title_tag (string) (default: 'h2')
7
+ - title_link: (link object) (default: {})
8
+ - title_attributes: (drupal attrs)
5
9
  - id (int) (default: random(1000))
6
- - flush (boolean) (default: false) flush variant of the accordion
10
+ - flush (boolean) (default: false)
7
11
  - items (array) (default: []): format: [
8
12
  {
9
13
  title: (string),
10
14
  title_tag: (string),
11
15
  content: (block),
12
- stay_open (boolean) (default: false) stay open after another selected
16
+ stay_open (boolean) (default: false)
13
17
  },
14
- ...
15
18
  ]
16
- - open_item_id (int) (default: 0) index value of the item to open (starting from 1),
17
- all closed by default (0)
19
+ - open_item_id (int) (default: 0)
20
+ - attributes (drupal attrs)
18
21
  #}
19
22
 
23
+ {% set _title = title|default('') %}
24
+ {% set _title_tag = title_tag|default('h2') %}
25
+ {% set _title_link = title_link|default({}) %}
26
+ {% set _title_attributes = title_attributes ?: create_attribute() %}
20
27
  {% set _id = id|default(random(1000)) %}
21
28
  {% set _flush = flush|default(false) %}
22
29
  {% set _items = items|default([]) %}
@@ -36,6 +43,15 @@
36
43
  <div
37
44
  {{ attributes }}
38
45
  >
46
+ {%- if _title is not empty -%}
47
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
48
+ title: _title,
49
+ title_tag: _title_tag,
50
+ title_link: _title_link,
51
+ attributes: _title_attributes,
52
+ } only %}
53
+ {%- endif -%}
54
+
39
55
  {% for _item in _items %}
40
56
  {% set _open_item = _open_item_id == loop.index %}
41
57
  {% set _button_classes = ['accordion-button'] %}
@@ -8,15 +8,17 @@
8
8
  - animated_dismiss (boolean) (default: true)
9
9
  - icon_path (string) (default: '')
10
10
  - icon_name (string) (default: '')
11
+ - attributes (drupal attrs)
11
12
  #}
12
13
 
13
14
  {% set _message = message|default('') %}
14
- {% set _variant = variant|default('primary') %}
15
15
  {% set _heading = heading|default('') %}
16
- {% set _icon_path = icon_path|default('') %}
16
+ {% set _variant = variant|default('primary') %}
17
17
  {% set _dismissible = dismissible ?? true %}
18
18
  {% set _animated_dismiss = animated_dismiss ?? true %}
19
+ {% set _icon_path = icon_path|default('') %}
19
20
  {% set _icon_name = icon_name|default('') %}
21
+
20
22
  {% set _classes = ['alert', 'alert-' ~ _variant|e('html_attr'), 'd-flex', 'align-items-center'] %}
21
23
  {% set _icon_names = {
22
24
  primary: "info-circle-fill",
@@ -62,7 +64,7 @@
62
64
  {% endif %}
63
65
  <div class="alert-content flex-grow-1">
64
66
  {%- if _heading is not empty -%}
65
- <h4 class="alert-heading">{{ _heading }}</h4>
67
+ <div class="alert-heading h4">{{ _heading }}</div>
66
68
  {%- endif -%}
67
69
  {%- if _message is not empty -%}
68
70
  {{- _message -}}
@@ -10,18 +10,20 @@
10
10
  - rounded_pill (boolean) (default: false)
11
11
  - outline (boolean) (default: false)
12
12
  - icon_path (string) (default: '')
13
+ - attributes (drupal attrs)
13
14
  #}
14
15
 
15
- {% set _rounded_pill = rounded_pill|default(false) %}
16
- {% set _outline = outline|default(false) %}
17
- {% set _background = background|default('primary') %}
18
16
  {% set _label = label|default('') %}
19
- {% set _classes = ['badge'] %}
17
+ {% set _background = background|default('primary') %}
20
18
  {% set _url = url|default('') %}
21
- {% set _icon_path = icon_path|default('') %}
22
19
  {% set _title = title|default(_label) %}
23
20
  {% set _dismissible = dismissible|default(false) %}
24
21
  {% set _assistive_text = assistive_text|default('') %}
22
+ {% set _rounded_pill = rounded_pill|default(false) %}
23
+ {% set _outline = outline|default(false) %}
24
+ {% set _icon_path = icon_path|default('') %}
25
+
26
+ {% set _classes = ['badge'] %}
25
27
 
26
28
  {% if _rounded_pill %}
27
29
  {% set _classes = _classes|merge(['rounded-pill']) %}
@@ -33,22 +35,25 @@
33
35
  {% set _classes = _classes|merge([ 'bg-' ~ _background]) %}
34
36
  {% endif %}
35
37
 
36
- {% if _background in ['light', 'warning'] %}
37
- {% set _classes = _classes|merge(['text-dark']) %}
38
- {% endif %}
39
-
40
38
  {% if attributes is empty %}
41
39
  {% set attributes = create_attribute() %}
42
40
  {% endif %}
43
41
 
42
+ {%- if _url is not empty -%}
43
+ {% set attributes = attributes.setAttribute('title', _title).setAttribute('href', _url) %}
44
+ {%- endif -%}
45
+
44
46
  {% set attributes = attributes.addClass(_classes) %}
45
47
 
46
48
  {%- if _url is not empty -%}
47
- <a href="{{ _url }}" title="{{ _title }}">
49
+ <a
50
+ {{ attributes }}
51
+ >
52
+ {%- else -%}
53
+ <span
54
+ {{ attributes }}
55
+ >
48
56
  {%- endif -%}
49
- <span
50
- {{ attributes }}
51
- >
52
57
  {%- if _assistive_text is not empty -%}
53
58
  <span class="visually-hidden">
54
59
  {{- _assistive_text -}}
@@ -63,9 +68,10 @@
63
68
  } only %}
64
69
  </span>
65
70
  {%- endif -%}
66
- </span>
67
71
  {%- if _url is not empty -%}
68
72
  </a>
73
+ {%- else -%}
74
+ </span>
69
75
  {%- endif -%}
70
76
 
71
77
  {% endspaceless %}
@@ -1,19 +1,23 @@
1
1
  {% spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - title: (string) (default: "")
5
- - title_tag: (string) (default: "div")
6
- - description: (string) (default: "")
4
+ - title: (string) (default: '')
5
+ - title_tag: (string) (default: 'div')
6
+ - title_link: (link object) (default: {})
7
+ - title_attributes (drupal attrs)
8
+ - description: (string) (default: '')
7
9
  - link: (link object) (default: {}): predefined structure for Link component
8
10
  - image: (string) <img> tag
9
11
  - shade: (boolean) (default: false)
10
12
  - hero: (boolean) (default: false)
11
13
  - full_width: (boolean) (default: false)
12
- - content_classes: (string) (default: "")
14
+ - content_classes: (string) (default: '')
15
+ - attributes (drupal attrs)
13
16
  #}
14
17
 
15
18
  {% set _title = title|default('') %}
16
19
  {% set _title_tag = title_tag|default('div') %}
20
+ {% set _title_link = title_link|default({}) %}
17
21
  {% set _title_attributes = title_attributes ?: create_attribute() %}
18
22
  {% set _description = description|default('') %}
19
23
  {% set _link = link|default({}) %}
@@ -23,7 +27,6 @@
23
27
  {% set _full_width = full_width|default(false) %}
24
28
  {% set _content_classes = content_classes|default('') %}
25
29
 
26
-
27
30
  {% set _content_class = 'bcl-banner__content' %}
28
31
  {% if _content_classes is not empty %}
29
32
  {% set _content_class = _content_class ~ " " ~ _content_classes %}
@@ -60,6 +63,7 @@
60
63
  {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
61
64
  title: _title,
62
65
  title_tag: _title_tag,
66
+ title_link: _title_link,
63
67
  attributes: _title_attributes,
64
68
  } only %}
65
69
  {% endif %}
@@ -16,6 +16,7 @@
16
16
  - header
17
17
  - footer
18
18
  - content
19
+ - content_row
19
20
  - sidebar
20
21
  - banner
21
22
  - feedback
@@ -37,6 +38,7 @@
37
38
  {% set _col_classes = {
38
39
  left: [
39
40
  'col-12',
41
+ 'bcl-sidebar',
40
42
  ],
41
43
  right: [
42
44
  'col-12',
@@ -92,6 +94,9 @@
92
94
 
93
95
  <div class="container mt-md-4-75 mt-4">
94
96
  <div class="row">
97
+ {% block content_row %}
98
+ {{ content_row }}
99
+ {% endblock %}
95
100
  {% if _with_sidebar %}
96
101
  <div class="{{ _col_classes.left|join(' ') }}">
97
102
  {% block sidebar %}{% endblock %}
@@ -116,6 +121,9 @@
116
121
  {% block related %}
117
122
  {{ related }}
118
123
  {% endblock %}
124
+ {% block share %}
125
+ {{ share }}
126
+ {% endblock %}
119
127
  </div>
120
128
  </div>
121
129
  </main>
@@ -123,9 +131,6 @@
123
131
  {% block feedback %}
124
132
  {{ feedback }}
125
133
  {% endblock %}
126
- {% block share %}
127
- {{ share }}
128
- {% endblock %}
129
134
 
130
135
  {% if _with_footer %}
131
136
  {% include '@oe-bcl/bcl-footer/footer.html.twig' with footer only %}
@@ -1,29 +1,41 @@
1
1
  {#
2
2
  Parameters:
3
+ - title: (string) (default: '')
4
+ - title_tag: (string) (default: 'h2')
5
+ - title_link: (link object) (default: {})
6
+ - title_attributes (drupal attrs)
3
7
  - listing (object) (default: {})
4
8
  - pagination (object) (default: {})
5
9
  - sidebar (object) (default: '')
6
- - page_title (string) (default: '')
7
10
  #}
8
11
 
9
12
  {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" %}
10
13
 
14
+ {% set _title = title|default('') %}
15
+ {% set _title_tag = title_tag|default('h2') %}
16
+ {% set _title_link = title_link|default({}) %}
17
+ {% set _title_attributes = title_attributes ?: create_attribute() %}
11
18
  {% set _listing = listing|default({}) %}
12
19
  {% set _pagination = pagination|default({}) %}
13
20
  {% set _search = search|default({}) %}
14
21
  {% set _sidebar = sidebar|default({}) %}
15
- {% set _page_title = page_title|default({}) %}
22
+
23
+ {% set _title_attributes = _title_attributes ?: create_attribute() %}
16
24
 
17
25
  {% block content_top %}
26
+ {% if filter_button %}
18
27
  {% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
28
+ {% endif %}
19
29
  <div class="row">
20
30
  <div class="col-md-6 col-lg-8 align-self-center">
21
- <h4 class="mb-0">
22
- <span class="text-capitalize">
23
- {{- _page_title -}}
24
- </span>
25
- ({{ listing.items.length }})
26
- </h4>
31
+ {% if _title is not empty %}
32
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
33
+ title: _title ~ ' (' ~ listing.items.length ~ ')',
34
+ title_tag: _title_tag,
35
+ title_link: _title_link,
36
+ attributes: _title_attributes.addClass(['mb-0', 'text-capitalize']),
37
+ } only %}
38
+ {% endif %}
27
39
  </div>
28
40
  {% if badges is not empty and badges is iterable %}
29
41
  <div class="col-md-12 order-md-2 mt-3">
@@ -47,7 +59,7 @@
47
59
 
48
60
  {% block content %}
49
61
  {% if _listing is not empty %}
50
- {% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing %}
62
+ {% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing only %}
51
63
  {% endif %}
52
64
  {% endblock %}
53
65
 
@@ -1,17 +1,27 @@
1
1
  {% spaceless %}
2
2
 
3
3
  {# Parameters:
4
+ - title (string) (default: '')
5
+ - title_tag (string) (default: 'h2')
6
+ - title_link: (link object) (default: {})
7
+ - title_attributes: (drupal attrs)
4
8
  - quote (string) (default: '')
5
9
  - attribution (string) (default: '')
6
10
  - cite (string) (default: '')
7
11
  - alignment (string) (default: 'left')
8
- - options ["left", "center", "end"]
12
+ - options ['left', 'center', 'end']
13
+ - attributes (drupal attrs)
9
14
  #}
10
15
 
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() %}
11
20
  {% set _quote = quote|default('') %}
12
21
  {% set _attribution = attribution|default('') %}
13
22
  {% set _cite = cite|default('') %}
14
23
  {% set _alignment = alignment|default('left') %}
24
+
15
25
  {% set _classes = [
16
26
  'text-' ~ _alignment,
17
27
  "bg-lighter",
@@ -35,6 +45,15 @@
35
45
 
36
46
  {% set attributes = attributes.addClass(_classes) %}
37
47
 
48
+ {%- if _title is not empty -%}
49
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
50
+ title: _title,
51
+ title_tag: _title_tag,
52
+ title_link: _title_link,
53
+ attributes: _title_attributes,
54
+ } only %}
55
+ {%- endif -%}
56
+
38
57
  <figure
39
58
  {{ attributes }}
40
59
  >
@@ -1,7 +1,9 @@
1
1
  {% spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - links (array of objects of type link)
4
+ - links (array of objects of type link) (default: [])
5
+ - icon_path (string) (default: '')
6
+ - attributes (drupal attrs)
5
7
  #}
6
8
 
7
9
  {% set _classes = 'breadcrumb' %}
@@ -5,7 +5,7 @@
5
5
  - label (string) (default: '')
6
6
  - variant (string) (default: 'primary')
7
7
  - size (string) (default: 'md')
8
- - options ["sm", "md", "lg"]
8
+ - options ['sm', 'md', 'lg']
9
9
  - type (string) (default: 'button')
10
10
  - outline (boolean) (default: false)
11
11
  - disabled (boolean) (default: false)
@@ -14,12 +14,13 @@
14
14
  - id (string) (default: '')
15
15
  - icon (icon object) (default: {}): predefined structure for Icon component
16
16
  - icon_position (string) (default: after)
17
- - options ["after", "before"]
17
+ - options ['after', 'before']
18
18
  - icon_spacing (string) (default: '')
19
- - options ["sm", "md", "lg"]
20
- - clean_class (boolean) (default: false)
19
+ - options ['sm', 'md', 'lg']
21
20
  - spinner (spinner object) (default: {})
22
21
  - show_spinner (boolean) (default: false)
22
+ - clean_class (boolean) (default: false)
23
+ - attributes (drupal attrs)
23
24
  #}
24
25
 
25
26
  {% set _label = label|default('') %}
@@ -37,6 +38,7 @@
37
38
  {% set _show_spinner = show_spinner|default(false) %}
38
39
  {% set _spinner = spinner|default({}) %}
39
40
  {% set _clean_class = clean_class|default(false) %}
41
+
40
42
  {% set _classes = [] %}
41
43
  {% if _clean_class == false %}
42
44
  {% set _classes = _classes|merge(['btn', 'btn-' ~ (_outline ? 'outline-' : '') ~ _variant|e('html_attr')]) %}
@@ -3,11 +3,12 @@
3
3
  {# Parameters:
4
4
  - vertical (boolean) (default: false)
5
5
  - size (string) (default: 'md')
6
- - options ["sm", "md", "lg"]
7
- - toolbar (boolean) (default: 'false')
6
+ - options ['sm', 'md', 'lg']
8
7
  - aria_label (string) (default: '')
8
+ - toolbar (boolean) (default: 'false')
9
9
  - toolbar_aria_label (string) (default: '')
10
- - items (array of arrays with objects of type button or form-input (input key mandatory when the object is a form-input))
10
+ - items (array of arrays with objects of type button or form-input (input key mandatory when the object is a form-input)) (default: [])
11
+ - attributes (drupal attrs)
11
12
  #}
12
13
 
13
14
  {% set _vertical = vertical|default(false) %}