@openeuropa/bcl-base-templates 0.15.0 → 0.16.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.
@@ -6,7 +6,9 @@
6
6
  - with_footer (boolean) (default: false)
7
7
  - with_banner (boolean) (default: false)
8
8
  - with_sidebar (boolean) (default: false)
9
- - columns (string) (default: 3-9 )
9
+ - sidebar_size (string) (default: 'normal')
10
+ options: ['normal', 'large']
11
+ - landing (boolean) (default: false)
10
12
  - content_type (string) (default: '')
11
13
  - attributes (drupal attrs)
12
14
 
@@ -25,15 +27,34 @@
25
27
  {% set _with_footer = footer|default(false) %}
26
28
  {% set _with_banner = banner|default(false) %}
27
29
  {% set _with_sidebar = sidebar|default(false) %}
28
- {% set _columns = columns|default('3-9') %}
30
+ {% set _sidebar_size = sidebar_size|default('normal') %}
31
+ {% set _landing = landing|default(false) %}
29
32
  {% set _content_type = content_type|default('') %}
30
33
  {% set _classes = ['bcl-node-type'] %}
31
- {% set _col_classes = { left: 'col-md-3', right: 'col-12 col-md-9' } %}
32
34
 
33
- {% if _columns == '4-8' %}
34
- {% set _col_classes = { left: 'col-md-4', right: 'col-12 col-md-8' } %}
35
- {% elseif _columns == '2-10' %}
36
- {% set _col_classes = { left: 'col-md-2', right: 'col-12 col-md-10' } %}
35
+ {% if _with_sidebar %}
36
+ {% set _col_classes = {
37
+ left: [
38
+ 'col-12',
39
+ ],
40
+ right: [
41
+ 'col-12',
42
+ ],
43
+ } %}
44
+
45
+ {% if _sidebar_size == 'normal' %}
46
+ {% set _col_classes = _col_classes|merge({
47
+ left: _col_classes.left|merge(['col-lg-3']),
48
+ right: _col_classes.right|merge(['col-lg-9', 'col-xxl-8']),
49
+ }) %}
50
+ {% endif %}
51
+
52
+ {% if _sidebar_size == 'large' %}
53
+ {% set _col_classes = _col_classes|merge({
54
+ left: _col_classes.left|merge(['col-lg-4']),
55
+ right: _col_classes.right|merge(['col-lg-8']),
56
+ }) %}
57
+ {% endif %}
37
58
  {% endif %}
38
59
 
39
60
  {% if _content_type is not empty %}
@@ -54,12 +75,16 @@
54
75
  <div class="container mt-md-4-75 mt-4">
55
76
  <div class="row">
56
77
  {% if _with_sidebar %}
57
- <div class="{{ _col_classes.left }}">
78
+ <div class="{{ _col_classes.left|join(' ') }}">
58
79
  {% block sidebar %}{% endblock %}
59
80
  </div>
60
- <div class="{{ _col_classes.right }}">
81
+ <div class="{{ _col_classes.right|join(' ') }}">
61
82
  {% else %}
62
- <div class="col-md-12">
83
+ {% if _landing %}
84
+ <div class="col-12">
85
+ {% else %}
86
+ <div class="col-12 col-lg-10 col-xl-9 col-xxl-8">
87
+ {% endif %}
63
88
  {% endif %}
64
89
  {% block content_top %}
65
90
  {{ content_top }}
@@ -16,30 +16,33 @@
16
16
 
17
17
  {% block content_top %}
18
18
  {% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
19
- <div class="mb-3 clearfix">
20
- <div class="float-end d-none d-md-flex align-items-center">
21
- {% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
22
- attributes: create_attribute().addClass(['ms-2 mb-2']),
23
- }) only %}
19
+ <div class="row">
20
+ <div class="col-md-6 col-lg-8">
21
+ <h4>
22
+ <span class="text-capitalize">
23
+ {{- _page_title -}}
24
+ </span>
25
+ ({{ listing.items.length }})
26
+ </h4>
27
+ </div>
28
+ <div class="col-md-12 order-md-2 mt-3 mt-md-1">
29
+ {% if badges is not empty and badges is iterable %}
30
+ {% for badge in badges %}
31
+ {% include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
32
+ attributes: create_attribute().addClass(["mb-2", "me-2"])
33
+ }) only %}
34
+ {% endfor %}
35
+ {% endif %}
36
+ </div>
37
+ <div class="col-md-6 col-lg-4 mt-3 mt-md-0">
38
+ <div class="float-md-end d-md-flex align-items-center mb-4 mb-md-0">
39
+ {% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
40
+ attributes: create_attribute().addClass(['ms-md-2 mb-2']),
41
+ }) only %}
42
+ </div>
24
43
  </div>
25
- <h4 class="mb-4">
26
- <span class="text-capitalize">
27
- {{- _page_title -}}
28
- </span>
29
- ({{ listing.items.length }})
30
- </h4>
31
- {% if badges is not empty and badges is iterable %}
32
- {% for badge in badges %}
33
- {% include '@oe-bcl/bcl-badge/badge.html.twig' with badge only %}
34
- {% endfor %}
35
- {% endif %}
36
44
  </div>
37
45
  <hr class="d-none d-md-block mb-4"/>
38
- <div class="d-md-none">
39
- {% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
40
- extra_classes: 'mb-4',
41
- }) only %}
42
- </div>
43
46
  {% endblock %}
44
47
 
45
48
  {% block content %}
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": "0.15.0",
5
+ "version": "0.16.0",
6
6
  "description": "OE - BCL base templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-badge": "^0.15.0",
12
- "@openeuropa/bcl-button": "^0.15.0",
13
- "@openeuropa/bcl-content-banner": "^0.15.0",
14
- "@openeuropa/bcl-footer": "^0.15.0",
15
- "@openeuropa/bcl-header": "^0.15.0",
16
- "@openeuropa/bcl-listing": "^0.15.0",
17
- "@openeuropa/bcl-offcanvas": "^0.15.0",
18
- "@openeuropa/bcl-pagination": "^0.15.0",
19
- "@openeuropa/bcl-select": "^0.15.0"
11
+ "@openeuropa/bcl-badge": "^0.16.0",
12
+ "@openeuropa/bcl-button": "^0.16.0",
13
+ "@openeuropa/bcl-content-banner": "^0.16.0",
14
+ "@openeuropa/bcl-footer": "^0.16.0",
15
+ "@openeuropa/bcl-header": "^0.16.0",
16
+ "@openeuropa/bcl-listing": "^0.16.0",
17
+ "@openeuropa/bcl-offcanvas": "^0.16.0",
18
+ "@openeuropa/bcl-pagination": "^0.16.0",
19
+ "@openeuropa/bcl-select": "^0.16.0"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",
@@ -32,5 +32,5 @@
32
32
  "design-system",
33
33
  "twig"
34
34
  ],
35
- "gitHead": "97a9f0822ee0d4d800e40aa17bf87dc698c5906c"
35
+ "gitHead": "39a52d25c36789a0c4712b0f6e55cbc5cbbedcb5"
36
36
  }