@openeuropa/bcl-base-templates 0.22.0 → 0.23.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.
@@ -116,6 +116,9 @@
116
116
  {% block related %}
117
117
  {{ related }}
118
118
  {% endblock %}
119
+ {% block share %}
120
+ {{ share }}
121
+ {% endblock %}
119
122
  </div>
120
123
  </div>
121
124
  </main>
@@ -123,9 +126,6 @@
123
126
  {% block feedback %}
124
127
  {{ feedback }}
125
128
  {% endblock %}
126
- {% block share %}
127
- {{ share }}
128
- {% endblock %}
129
129
 
130
130
  {% if _with_footer %}
131
131
  {% include '@oe-bcl/bcl-footer/footer.html.twig' with footer only %}
@@ -1,6 +1,7 @@
1
1
  import banner from "@openeuropa/bcl-content-banner/data/data";
2
2
  import pageBanner from "@openeuropa/bcl-banner/data/data--image";
3
3
  import simpleBanner from "@openeuropa/bcl-content-banner/data/data--simple";
4
+ import pageTitleBanner from "@openeuropa/bcl-content-banner/data/data--page-title";
4
5
  import fileThumbnail from "@openeuropa/bcl-file/data/data--card";
5
6
  import file from "@openeuropa/bcl-file/data/data";
6
7
  import blockquote from "@openeuropa/bcl-data-blockquote/data";
@@ -8,6 +9,7 @@ import featuredItem from "@openeuropa/bcl-featured-media/data/data--featured-ite
8
9
  import accordion from "@openeuropa/bcl-data-accordion/data";
9
10
  import timeline from "@openeuropa/bcl-timeline/data";
10
11
  import sidebar from "@openeuropa/bcl-inpage-navigation/data/data--simple";
12
+ import share from "@openeuropa/bcl-links-block/data/data--share";
11
13
 
12
14
  export {
13
15
  banner,
@@ -20,4 +22,6 @@ export {
20
22
  pageBanner,
21
23
  simpleBanner,
22
24
  sidebar,
25
+ pageTitleBanner,
26
+ share,
23
27
  };
package/data/layout.js CHANGED
@@ -1,5 +1,19 @@
1
1
  import headerSimple from "@openeuropa/bcl-data-header/data--simple";
2
2
  import headerNoForm from "@openeuropa/bcl-data-header/data--no-form";
3
- import footer from "@openeuropa/bcl-data-footer/data";
3
+ import footerData from "@openeuropa/bcl-data-footer/data";
4
+ import header_ucpkn from "@openeuropa/bcl-data-header/data--ucpkn";
5
+ import header_joinup from "@openeuropa/bcl-data-header/data--neutral";
6
+ import drupalAttribute from "drupal-attribute";
4
7
 
5
- export { headerSimple, headerNoForm, footer };
8
+ const footer = {
9
+ ...footerData,
10
+ attributes: new drupalAttribute().addClass(["mt-md-4-75", "mt-4"]),
11
+ };
12
+
13
+ export default {
14
+ headerSimple,
15
+ headerNoForm,
16
+ footer,
17
+ header_ucpkn,
18
+ header_joinup,
19
+ };
@@ -1,29 +1,39 @@
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 %}
18
26
  {% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
19
27
  <div class="row">
20
28
  <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>
29
+ {% if _title is not empty %}
30
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
31
+ title: _title ~ ' (' ~ listing.items.length ~ ')',
32
+ title_tag: _title_tag,
33
+ title_link: _title_link,
34
+ attributes: _title_attributes.addClass(['mb-0', 'text-capitalize']),
35
+ } only %}
36
+ {% endif %}
27
37
  </div>
28
38
  {% if badges is not empty and badges is iterable %}
29
39
  <div class="col-md-12 order-md-2 mt-3">
@@ -47,7 +57,7 @@
47
57
 
48
58
  {% block content %}
49
59
  {% if _listing is not empty %}
50
- {% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing %}
60
+ {% include '@oe-bcl/bcl-listing/listing.html.twig' with _listing only %}
51
61
  {% endif %}
52
62
  {% endblock %}
53
63
 
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.22.0",
5
+ "version": "0.23.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.22.0",
12
- "@openeuropa/bcl-button": "^0.22.0",
13
- "@openeuropa/bcl-content-banner": "^0.22.0",
14
- "@openeuropa/bcl-footer": "^0.22.0",
15
- "@openeuropa/bcl-header": "^0.22.0",
16
- "@openeuropa/bcl-listing": "^0.22.0",
17
- "@openeuropa/bcl-offcanvas": "^0.22.0",
18
- "@openeuropa/bcl-pagination": "^0.22.0",
19
- "@openeuropa/bcl-select": "^0.22.0"
11
+ "@openeuropa/bcl-badge": "^0.23.0",
12
+ "@openeuropa/bcl-button": "^0.23.0",
13
+ "@openeuropa/bcl-content-banner": "^0.23.0",
14
+ "@openeuropa/bcl-footer": "^0.23.0",
15
+ "@openeuropa/bcl-header": "^0.23.0",
16
+ "@openeuropa/bcl-listing": "^0.23.0",
17
+ "@openeuropa/bcl-offcanvas": "^0.23.0",
18
+ "@openeuropa/bcl-pagination": "^0.23.0",
19
+ "@openeuropa/bcl-select": "^0.23.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": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
35
+ "gitHead": "fa2097e14024989cddf6f9cd7a9115bed5886aeb"
36
36
  }