@openeuropa/bcl-base-templates 0.21.0 → 0.24.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.
@@ -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 %}
@@ -0,0 +1,27 @@
1
+ import banner from "@openeuropa/bcl-content-banner/data/data";
2
+ import pageBanner from "@openeuropa/bcl-banner/data/data--image";
3
+ import simpleBanner from "@openeuropa/bcl-content-banner/data/data--simple";
4
+ import pageTitleBanner from "@openeuropa/bcl-content-banner/data/data--page-title";
5
+ import fileThumbnail from "@openeuropa/bcl-file/data/data--card";
6
+ import file from "@openeuropa/bcl-file/data/data";
7
+ import blockquote from "@openeuropa/bcl-data-blockquote/data";
8
+ import featuredItem from "@openeuropa/bcl-featured-media/data/data--featured-item";
9
+ import accordion from "@openeuropa/bcl-data-accordion/data";
10
+ import timeline from "@openeuropa/bcl-timeline/data";
11
+ import sidebar from "@openeuropa/bcl-inpage-navigation/data/data--simple";
12
+ import share from "@openeuropa/bcl-links-block/data/data--share";
13
+
14
+ export {
15
+ banner,
16
+ fileThumbnail,
17
+ file,
18
+ blockquote,
19
+ featuredItem,
20
+ accordion,
21
+ timeline,
22
+ pageBanner,
23
+ simpleBanner,
24
+ sidebar,
25
+ pageTitleBanner,
26
+ share,
27
+ };
package/data/layout.js ADDED
@@ -0,0 +1,19 @@
1
+ import headerSimple from "@openeuropa/bcl-data-header/data--simple";
2
+ import headerNoForm from "@openeuropa/bcl-data-header/data--no-form";
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";
7
+
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
+ };
@@ -0,0 +1,7 @@
1
+ import filterButton from "@openeuropa/bcl-data-button/data--filter";
2
+ import pagination from "@openeuropa/bcl-data-pagination/data--listing";
3
+ import sortSelect from "@openeuropa/bcl-data-select/data--sort";
4
+ import listingDate from "@openeuropa/bcl-listing/data/listing--date";
5
+ import listingProfiles from "@openeuropa/bcl-listing/data/listing--profiles";
6
+
7
+ export { filterButton, pagination, sortSelect, listingDate, listingProfiles };
@@ -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
 
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.21.0",
5
+ "version": "0.24.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.21.0",
12
- "@openeuropa/bcl-button": "^0.21.0",
13
- "@openeuropa/bcl-content-banner": "^0.21.0",
14
- "@openeuropa/bcl-footer": "^0.21.0",
15
- "@openeuropa/bcl-header": "^0.21.0",
16
- "@openeuropa/bcl-listing": "^0.21.0",
17
- "@openeuropa/bcl-offcanvas": "^0.21.0",
18
- "@openeuropa/bcl-pagination": "^0.21.0",
19
- "@openeuropa/bcl-select": "^0.21.0"
11
+ "@openeuropa/bcl-badge": "^0.24.0",
12
+ "@openeuropa/bcl-button": "^0.24.0",
13
+ "@openeuropa/bcl-content-banner": "^0.24.0",
14
+ "@openeuropa/bcl-footer": "^0.24.0",
15
+ "@openeuropa/bcl-header": "^0.24.0",
16
+ "@openeuropa/bcl-listing": "^0.24.0",
17
+ "@openeuropa/bcl-offcanvas": "^0.24.0",
18
+ "@openeuropa/bcl-pagination": "^0.24.0",
19
+ "@openeuropa/bcl-select": "^0.24.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": "18c01b34ca76780f480c692c566dfe507d961ccf"
35
+ "gitHead": "a46bb6bc12771da4667516dc7b0665b00504ade2"
36
36
  }