@openeuropa/bcl-theme-default 1.10.0 → 1.10.2
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.
- package/css/oe-bcl-ckeditor5.min.css +1 -1
- package/css/oe-bcl-ckeditor5.min.css.map +1 -1
- package/css/oe-bcl-default.css +1034 -124
- package/css/oe-bcl-default.css.map +1 -1
- package/css/oe-bcl-default.min.css +1 -1
- package/css/oe-bcl-default.min.css.map +1 -1
- package/js/oe-bcl-default.bundle.js +124 -74
- package/js/oe-bcl-default.bundle.js.map +1 -1
- package/js/oe-bcl-default.bundle.min.js +1 -1
- package/js/oe-bcl-default.bundle.min.js.map +1 -1
- package/js/oe-bcl-default.esm.js +124 -74
- package/js/oe-bcl-default.esm.js.map +1 -1
- package/js/oe-bcl-default.esm.min.js +1 -1
- package/js/oe-bcl-default.esm.min.js.map +1 -1
- package/js/oe-bcl-default.umd.js +124 -74
- package/js/oe-bcl-default.umd.js.map +1 -1
- package/js/oe-bcl-default.umd.min.js +1 -1
- package/js/oe-bcl-default.umd.min.js.map +1 -1
- package/package.json +8 -7
- package/src/js/accessible-toggle/accessible-toggle.js +11 -3
- package/src/js/gallery/gallery.js +118 -62
- package/src/scss/_accordion.scss +4 -0
- package/src/scss/_inpage-navigation.scss +7 -0
- package/src/scss/_multiselect-2.scss +1 -1
- package/src/scss/_multiselect.scss +21 -0
- package/src/scss/_timeline.scss +2 -0
- package/src/scss/base/_layout.scss +6 -3
- package/src/scss/base/_variables.scss +2 -3
- package/templates/bcl-accordion/accordion.html.twig +8 -3
- package/templates/bcl-dropdown/dropdown.html.twig +1 -1
- package/templates/bcl-file/file-translations.html.twig +2 -2
- package/templates/bcl-gallery/gallery-item.html.twig +1 -0
- package/templates/bcl-gallery/gallery.html.twig +2 -2
- package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +14 -10
- package/templates/bcl-language-switcher/language-switcher.html.twig +2 -2
- package/templates/bcl-modal/modal.html.twig +2 -2
- package/templates/bcl-timeline/timeline.html.twig +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-theme-default",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.2",
|
|
6
6
|
"description": "OE - BCL theme default",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"align-templates": "lerna --scope \"@openeuropa/bcl-twig-templates\" run prepublish",
|
|
@@ -15,23 +15,24 @@
|
|
|
15
15
|
"clean": "rimraf css js templates logos icons",
|
|
16
16
|
"prepublish": "npm run build",
|
|
17
17
|
"update:styles": "npm run build:styles && npm run build:color-scheme && copyfiles -f css/*.min.css ../../../assets",
|
|
18
|
-
"update:scripts": "npm run build:scripts && copyfiles -f js
|
|
18
|
+
"update:scripts": "npm run build:scripts && copyfiles -f js/* ../../../assets",
|
|
19
19
|
"update:templates": "npm-run-all -s align-templates build:copy"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@ecl/resources-ec-logo": "3.7.1",
|
|
23
23
|
"@ecl/resources-eu-logo": "3.7.1",
|
|
24
24
|
"@ecl/resources-flag-icons": "3.7.1",
|
|
25
|
-
"@openeuropa/bcl-bootstrap": "^1.10.
|
|
26
|
-
"@openeuropa/bcl-builder": "^1.10.
|
|
27
|
-
"@openeuropa/bcl-twig-templates": "^1.10.
|
|
25
|
+
"@openeuropa/bcl-bootstrap": "^1.10.2",
|
|
26
|
+
"@openeuropa/bcl-builder": "^1.10.2",
|
|
27
|
+
"@openeuropa/bcl-twig-templates": "^1.10.2",
|
|
28
28
|
"@rollup/plugin-replace": "6.0.2",
|
|
29
29
|
"copyfiles": "2.4.1",
|
|
30
30
|
"cross-env": "7.0.3",
|
|
31
31
|
"flag-icons": "6.9.2",
|
|
32
32
|
"glob": "11.0.1",
|
|
33
33
|
"npm-run-all": "4.1.5",
|
|
34
|
-
"slim-select": "1.27.1"
|
|
34
|
+
"slim-select": "1.27.1",
|
|
35
|
+
"slim-select-2": "brianvoe/slim-select#e6239514875df954edd772fd146aed5657f0a498"
|
|
35
36
|
},
|
|
36
37
|
"publishConfig": {
|
|
37
38
|
"access": "public"
|
|
@@ -50,5 +51,5 @@
|
|
|
50
51
|
"design-system",
|
|
51
52
|
"twig"
|
|
52
53
|
],
|
|
53
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "d4bb50f58dd038748c618cc2f7bff2674f0b1f2a"
|
|
54
55
|
}
|
|
@@ -35,9 +35,17 @@ class AccessibleToggle {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
addAriaAttributes() {
|
|
38
|
-
if (this.
|
|
39
|
-
this.triggerElement
|
|
40
|
-
|
|
38
|
+
if (this.type === 'modal') {
|
|
39
|
+
if (this.triggerElement) {
|
|
40
|
+
this.triggerElement.setAttribute('aria-haspopup', 'dialog');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (this.type === 'offcanvas') {
|
|
45
|
+
if (this.triggerElement) {
|
|
46
|
+
this.triggerElement.setAttribute('aria-haspopup', 'dialog');
|
|
47
|
+
this.triggerElement.setAttribute('aria-expanded', 'false');
|
|
48
|
+
}
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* --------------------------------------------------------------------------
|
|
3
|
-
* Bootstrap (v5.1.3): gallery.js
|
|
3
|
+
* Bootstrap (v5.1.3): gallery.js (Refactored)
|
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
5
|
* --------------------------------------------------------------------------
|
|
6
6
|
*/
|
|
@@ -10,19 +10,13 @@ import EventHandler from '@openeuropa/bcl-bootstrap/js/src/dom/event-handler'
|
|
|
10
10
|
import BaseComponent from '@openeuropa/bcl-bootstrap/js/src/base-component'
|
|
11
11
|
import SelectorEngine from '@openeuropa/bcl-bootstrap/js/src/dom/selector-engine'
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* ------------------------------------------------------------------------
|
|
15
|
-
* Constants
|
|
16
|
-
* ------------------------------------------------------------------------
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
const Default = {}
|
|
20
|
-
|
|
21
13
|
const NAME = 'gallery'
|
|
22
14
|
const DATA_KEY = 'bs.gallery'
|
|
23
15
|
const EVENT_KEY = `.${DATA_KEY}`
|
|
24
16
|
const DATA_API_KEY = '.data-api'
|
|
25
17
|
|
|
18
|
+
const Default = {}
|
|
19
|
+
|
|
26
20
|
const CAROUSEL_SELECTOR = '.carousel'
|
|
27
21
|
const CAROUSEL_PAGER_SELECTOR = '.carousel-pager span'
|
|
28
22
|
const CAROUSEL_ACTIVE_SELECTOR = '.carousel-item.active'
|
|
@@ -32,25 +26,31 @@ const MODAL_SELECTOR = '.modal'
|
|
|
32
26
|
const EVENT_MODAL_HIDE = 'hide.bs.modal'
|
|
33
27
|
const CAROUSEL_EVENT = 'slide.bs.carousel'
|
|
34
28
|
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* ------------------------------------------------------------------------
|
|
38
|
-
* Class Definition
|
|
39
|
-
* ------------------------------------------------------------------------
|
|
40
|
-
*/
|
|
29
|
+
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
|
|
41
30
|
|
|
42
31
|
class Gallery extends BaseComponent {
|
|
43
32
|
constructor(element, config) {
|
|
44
33
|
super(element, config)
|
|
45
|
-
|
|
34
|
+
|
|
46
35
|
this.carousel = SelectorEngine.findOne(CAROUSEL_SELECTOR, this._element)
|
|
47
36
|
this.carouselPager = SelectorEngine.findOne(CAROUSEL_PAGER_SELECTOR, this._element)
|
|
48
|
-
this.carouselStartIndex = element.getAttribute('data-gallery-start')
|
|
49
|
-
this.carouselActiveItem = SelectorEngine.find(CAROUSEL_ITEM_SELECTOR, this.carousel)[this.carouselStartIndex]
|
|
50
|
-
this.carouselPager.textContent = Number(this.carouselStartIndex) + 1
|
|
51
37
|
this.modal = SelectorEngine.findOne(MODAL_SELECTOR, this._element)
|
|
52
|
-
|
|
53
|
-
this.
|
|
38
|
+
|
|
39
|
+
this.carouselStartIndex = element.getAttribute('data-gallery-start') || 0
|
|
40
|
+
const allCarouselItems = SelectorEngine.find(CAROUSEL_ITEM_SELECTOR, this.carousel)
|
|
41
|
+
|
|
42
|
+
const startIndexNum = Math.max(
|
|
43
|
+
0,
|
|
44
|
+
Math.min(Number(this.carouselStartIndex), allCarouselItems.length - 1)
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
this.carouselPager.textContent = startIndexNum + 1
|
|
48
|
+
this.carouselActiveItem = allCarouselItems[startIndexNum]
|
|
49
|
+
this._carouselLazyLoad(this.carouselActiveItem)
|
|
50
|
+
|
|
51
|
+
EventHandler.on(this.carousel, CAROUSEL_EVENT, event => this._handleCarouselSlide(event))
|
|
52
|
+
|
|
53
|
+
EventHandler.on(this.modal, EVENT_MODAL_HIDE, () => this._stopSlide())
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// Getters
|
|
@@ -58,61 +58,111 @@ class Gallery extends BaseComponent {
|
|
|
58
58
|
return NAME
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
static get Default() {
|
|
62
|
+
return Default
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Handle the carousel "slide.bs.carousel" event
|
|
67
|
+
* @param {Event} event
|
|
68
|
+
*/
|
|
69
|
+
_handleCarouselSlide(event) {
|
|
70
|
+
const previousSlide = SelectorEngine.findOne(CAROUSEL_ACTIVE_SELECTOR, this.carousel)
|
|
71
|
+
const currentSlide = event.relatedTarget
|
|
72
|
+
|
|
73
|
+
this._carouselLazyLoad(currentSlide)
|
|
74
|
+
|
|
66
75
|
this.carouselPager.textContent = event.to + 1
|
|
67
|
-
|
|
76
|
+
|
|
77
|
+
this._stopVideo(previousSlide)
|
|
68
78
|
}
|
|
69
79
|
|
|
70
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Stop the current carousel slide (when modal hides or component is disposed)
|
|
82
|
+
*/
|
|
83
|
+
_stopSlide() {
|
|
71
84
|
const currentSlide = SelectorEngine.findOne(CAROUSEL_ACTIVE_SELECTOR, this.carousel)
|
|
72
|
-
this.
|
|
85
|
+
this._stopVideo(currentSlide)
|
|
73
86
|
}
|
|
74
87
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Stop any video or iframe in the given slide
|
|
90
|
+
* @param {HTMLElement} slide
|
|
91
|
+
*/
|
|
92
|
+
_stopVideo(slide) {
|
|
93
|
+
if (!slide) {
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
const iframe = SelectorEngine.findOne('iframe', slide)
|
|
97
|
+
const video = SelectorEngine.findOne('video', slide)
|
|
98
|
+
|
|
99
|
+
if (iframe && iframe.dataset.src) {
|
|
100
|
+
iframe.src = iframe.dataset.src
|
|
80
101
|
} else if (video) {
|
|
81
|
-
video.pause()
|
|
102
|
+
video.pause()
|
|
82
103
|
}
|
|
83
104
|
}
|
|
84
105
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Lazy load media (img, iframe, video, etc.) by copying data-src into src
|
|
108
|
+
* @param {HTMLElement} slide
|
|
109
|
+
*/
|
|
110
|
+
_carouselLazyLoad(slide) {
|
|
111
|
+
if (!slide) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
const media = SelectorEngine.findOne('[data-src]', slide)
|
|
89
115
|
if (media && !media.src) {
|
|
90
|
-
media.src = media.dataset.src
|
|
116
|
+
media.src = media.dataset.src
|
|
91
117
|
}
|
|
92
118
|
}
|
|
93
119
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Internal helper to open the modal and jump to a specific slide
|
|
122
|
+
* @param {HTMLElement} gallery
|
|
123
|
+
* @param {HTMLElement} targetLink
|
|
124
|
+
*/
|
|
125
|
+
static _openModalAndShowSlide(gallery, targetLink) {
|
|
126
|
+
if (!gallery || !targetLink) {
|
|
127
|
+
return
|
|
128
|
+
}
|
|
98
129
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
130
|
+
const firstSlide = Number(targetLink.getAttribute('data-bs-slide-to') || 0)
|
|
131
|
+
gallery.dataset.galleryStart = firstSlide
|
|
132
|
+
|
|
133
|
+
const instance = Gallery.getOrCreateInstance(gallery)
|
|
134
|
+
|
|
135
|
+
const overlay = SelectorEngine.findOne('.bcl-gallery__item-overlay', targetLink)
|
|
136
|
+
if (overlay) {
|
|
137
|
+
const modalId = overlay.getAttribute('data-bs-target')
|
|
138
|
+
const modalElement = document.querySelector(modalId)
|
|
139
|
+
if (modalElement) {
|
|
140
|
+
const modal = bootstrap.Modal.getOrCreateInstance(modalElement)
|
|
141
|
+
modal.show()
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
setTimeout(() => {
|
|
146
|
+
const carousel = SelectorEngine.findOne(CAROUSEL_SELECTOR, instance._element)
|
|
147
|
+
const carouselInstance = bootstrap.Carousel.getOrCreateInstance(carousel)
|
|
148
|
+
carouselInstance.to(firstSlide)
|
|
149
|
+
|
|
150
|
+
const pager = SelectorEngine.findOne(CAROUSEL_PAGER_SELECTOR, instance._element)
|
|
151
|
+
if (pager) {
|
|
152
|
+
pager.textContent = firstSlide + 1
|
|
153
|
+
}
|
|
154
|
+
}, 50)
|
|
102
155
|
}
|
|
103
156
|
|
|
104
157
|
static jQueryInterface(config) {
|
|
105
|
-
return this.each(function
|
|
158
|
+
return this.each(function () {
|
|
106
159
|
const data = Gallery.getOrCreateInstance(this)
|
|
107
|
-
|
|
108
160
|
if (typeof config !== 'string') {
|
|
109
161
|
return
|
|
110
162
|
}
|
|
111
|
-
|
|
112
163
|
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
|
|
113
164
|
throw new TypeError(`No method named "${config}"`)
|
|
114
165
|
}
|
|
115
|
-
|
|
116
166
|
data[config](this)
|
|
117
167
|
})
|
|
118
168
|
}
|
|
@@ -120,24 +170,30 @@ class Gallery extends BaseComponent {
|
|
|
120
170
|
|
|
121
171
|
/**
|
|
122
172
|
* ------------------------------------------------------------------------
|
|
123
|
-
* Data
|
|
173
|
+
* Data API implementation
|
|
124
174
|
* ------------------------------------------------------------------------
|
|
125
175
|
*/
|
|
126
176
|
|
|
177
|
+
const isEnterOrSpace = (event) => {
|
|
178
|
+
return event.key === 'Enter' || event.key === ' '
|
|
179
|
+
}
|
|
180
|
+
|
|
127
181
|
EventHandler.on(document, EVENT_CLICK_DATA_API, THUMBNAIL_SELECTOR, (event) => {
|
|
182
|
+
event.preventDefault()
|
|
183
|
+
const targetLink = event.target.closest('a')
|
|
128
184
|
const gallery = event.target.closest('div.bcl-gallery')
|
|
129
|
-
|
|
130
|
-
gallery.dataset.galleryStart = firstSlide;
|
|
131
|
-
|
|
132
|
-
Gallery.getOrCreateInstance(gallery);
|
|
185
|
+
Gallery._openModalAndShowSlide(gallery, targetLink)
|
|
133
186
|
})
|
|
134
187
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
188
|
+
EventHandler.on(document, EVENT_KEYDOWN_DATA_API, THUMBNAIL_SELECTOR, (event) => {
|
|
189
|
+
if (!isEnterOrSpace(event)) {
|
|
190
|
+
return
|
|
191
|
+
}
|
|
192
|
+
event.preventDefault()
|
|
193
|
+
const targetLink = event.target.closest('a')
|
|
194
|
+
const gallery = event.target.closest('div.bcl-gallery')
|
|
195
|
+
Gallery._openModalAndShowSlide(gallery, targetLink)
|
|
196
|
+
})
|
|
141
197
|
|
|
142
198
|
defineJQueryPlugin(Gallery)
|
|
143
199
|
|
package/src/scss/_accordion.scss
CHANGED
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
justify-content: space-between;
|
|
14
14
|
align-items: center;
|
|
15
15
|
white-space: normal;
|
|
16
|
+
border-left: none;
|
|
17
|
+
border-top: none;
|
|
18
|
+
border-right: none;
|
|
19
|
+
background: transparent;
|
|
16
20
|
border-bottom: 1px solid $gray-300;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: map-get($spacers, "3-5");
|
|
17
23
|
&:after {
|
|
18
24
|
display: none;
|
|
19
25
|
}
|
|
@@ -40,6 +46,7 @@
|
|
|
40
46
|
.bcl-heading {
|
|
41
47
|
margin-bottom: 0;
|
|
42
48
|
padding: map-get($spacers, "3-5");
|
|
49
|
+
border-bottom: 1px solid $gray-300;
|
|
43
50
|
}
|
|
44
51
|
ul {
|
|
45
52
|
padding: map-get($spacers, "2-5");
|
|
@@ -108,6 +108,27 @@ select.multi-select {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
.ss-main.ss-1 {
|
|
112
|
+
&.form-select.is-invalid,
|
|
113
|
+
&.form-select.is-valid {
|
|
114
|
+
background: none;
|
|
115
|
+
padding: 0;
|
|
116
|
+
}
|
|
117
|
+
&.form-select {
|
|
118
|
+
border: none;
|
|
119
|
+
background: none;
|
|
120
|
+
padding: 0.075rem 0 0.075rem 0.3rem;
|
|
121
|
+
}
|
|
122
|
+
.ss-single-selected {
|
|
123
|
+
min-height: 37px;
|
|
124
|
+
.placeholder {
|
|
125
|
+
background: none;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
111
132
|
.ss-main.multi-select.is-invalid,
|
|
112
133
|
.ss-main.multi-select.is-valid,
|
|
113
134
|
.was-validated .multi-select:invalid + .ss-main.multi-select,
|
package/src/scss/_timeline.scss
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
$enable-negative-margins: true;
|
|
2
|
-
$negative-spacers: negativify-map($spacers);
|
|
3
|
-
|
|
4
1
|
// Colors variables
|
|
5
2
|
$lighter: $gray-100;
|
|
6
3
|
$date: #1698af;
|
|
@@ -67,6 +64,8 @@ $spacers-extended: (
|
|
|
67
64
|
|
|
68
65
|
$spacers: map-merge($spacers, $spacers-extended);
|
|
69
66
|
$gutters: $spacers;
|
|
67
|
+
$enable-negative-margins: true;
|
|
68
|
+
$negative-spacers: negativify-map($spacers);
|
|
70
69
|
|
|
71
70
|
// accordion
|
|
72
71
|
$accordion-button-active-color: $accordion-button-color;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- title_tag (string) (default: 'h2')
|
|
7
7
|
- title_link: (link object) (default: {})
|
|
8
8
|
- title_attributes: (drupal attrs)
|
|
9
|
-
- id (int) (default: random(
|
|
9
|
+
- id (int) (default: random(10000))
|
|
10
10
|
- flush (boolean) (default: false)
|
|
11
11
|
- items (array) (default: []): format: [
|
|
12
12
|
{
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{% set _title_tag = title_tag|default('h2') %}
|
|
27
27
|
{% set _title_link = title_link|default({}) %}
|
|
28
28
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
29
|
-
{% set _id = id|default(random(
|
|
29
|
+
{% set _id = id|default(random(10000)) %}
|
|
30
30
|
{% set _flush = flush ?? false %}
|
|
31
31
|
{% set _items = items|default([]) %}
|
|
32
32
|
{% set _expand_button = expand_button|default({}) %}
|
|
@@ -110,8 +110,13 @@
|
|
|
110
110
|
.setAttribute('aria-controls', 'collapse-' ~ _id ~ '-' ~ loop.index)
|
|
111
111
|
.setAttribute('aria-expanded', open_item ? 'true' : 'false')
|
|
112
112
|
%}
|
|
113
|
+
{% set item_title %}
|
|
114
|
+
<span>
|
|
115
|
+
{{- _item.title -}}
|
|
116
|
+
</span>
|
|
117
|
+
{% endset %}
|
|
113
118
|
{% include '@oe-bcl/bcl-button/button.html.twig' with {
|
|
114
|
-
label:
|
|
119
|
+
label: item_title,
|
|
115
120
|
clean_class: true,
|
|
116
121
|
attributes: button_attributes
|
|
117
122
|
} only %}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% apply spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- id (string) (default: language-dropdown-random(
|
|
4
|
+
- id (string) (default: language-dropdown-random(10000))
|
|
5
5
|
- label (string) (default: '')
|
|
6
6
|
- icon_path (string) (default: '')
|
|
7
7
|
- items (string) (default: [])
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
]
|
|
16
16
|
#}
|
|
17
17
|
|
|
18
|
-
{% set _id = id|default('language-dropdown' ~ random(
|
|
18
|
+
{% set _id = id|default('language-dropdown' ~ random(10000)) %}
|
|
19
19
|
{% set _label = label|default('') %}
|
|
20
20
|
{% set _icon_path = icon_path|default('') %}
|
|
21
21
|
{% set _items = items|default([]) %}
|
|
@@ -30,6 +30,7 @@ Parameters:
|
|
|
30
30
|
{% set attributes = attributes.addClass(['bcl-gallery__item', 'd-block', 'w-100', 'img-fluid'])
|
|
31
31
|
.setAttribute('data-bs-target', '#' ~ _carousel_id)
|
|
32
32
|
.setAttribute('data-bs-slide-to', _carousel_anchor)
|
|
33
|
+
.setAttribute('tabindex', '0')
|
|
33
34
|
%}
|
|
34
35
|
|
|
35
36
|
<a
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{#
|
|
4
4
|
Parameters:
|
|
5
|
-
- id (string) (default: gallery-random(
|
|
5
|
+
- id (string) (default: gallery-random(10000))
|
|
6
6
|
- title (string) (default: '')
|
|
7
7
|
- title_tag (string) (default: 'h2')
|
|
8
8
|
- title_link: (link object) (default: {})
|
|
@@ -28,7 +28,7 @@ Parameters:
|
|
|
28
28
|
carousel
|
|
29
29
|
#}
|
|
30
30
|
|
|
31
|
-
{% set _id = id|default('gallery-' ~ random(
|
|
31
|
+
{% set _id = id|default('gallery-' ~ random(10000)) %}
|
|
32
32
|
{% set _title = title|default('') %}
|
|
33
33
|
{% set _title_tag = title_tag|default('h2') %}
|
|
34
34
|
{% set _title_link = title_link|default({}) %}
|
|
@@ -7,8 +7,8 @@ Parameters:
|
|
|
7
7
|
- title_link: (link object) (default: {})
|
|
8
8
|
- title_attributes (drupal attrs)
|
|
9
9
|
- links: (link[]) (default: [])
|
|
10
|
-
- id (string) (default: bcl-inpage-navigation-random(
|
|
11
|
-
- dropdown_id (string) (default: bcl-inpage-navigation-dropdown-random(
|
|
10
|
+
- id (string) (default: bcl-inpage-navigation-random(10000))
|
|
11
|
+
- dropdown_id (string) (default: bcl-inpage-navigation-dropdown-random(10000))
|
|
12
12
|
- dynamic_active: (boolean) (default: false)
|
|
13
13
|
- icon_path (string) (default: '')
|
|
14
14
|
- attributes (drupal attrs)
|
|
@@ -19,9 +19,9 @@ Parameters:
|
|
|
19
19
|
{% set _title_link = title_link|default({}) %}
|
|
20
20
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
21
21
|
{% set _links = links|default([]) %}
|
|
22
|
-
{% set _id = id|default('bcl-inpage-navigation-' ~ random(
|
|
22
|
+
{% set _id = id|default('bcl-inpage-navigation-' ~ random(10000)) %}
|
|
23
23
|
{% set _icon_path = icon_path|default('') %}
|
|
24
|
-
{% set _dropdown_id = dropdown_id|default('bcl-inpage-navigation-dropdown' ~ random(
|
|
24
|
+
{% set _dropdown_id = dropdown_id|default('bcl-inpage-navigation-dropdown' ~ random(10000)) %}
|
|
25
25
|
{% set _dyanmic_active = dynamic_active|default(false) %}
|
|
26
26
|
|
|
27
27
|
{% if attributes is empty %}
|
|
@@ -29,8 +29,8 @@ Parameters:
|
|
|
29
29
|
{% endif %}
|
|
30
30
|
|
|
31
31
|
{% set attributes = attributes.addClass(['bcl-inpage-navigation', 'position-sticky']).setAttribute('id', _id) %}
|
|
32
|
-
{% set title_attributes = _title_attributes.addClass('mb-0') %}
|
|
33
|
-
{% set
|
|
32
|
+
{% set title_attributes = _title_attributes.addClass(['mb-0', 'd-none', 'd-md-block']) %}
|
|
33
|
+
{% set _button_content %}
|
|
34
34
|
{{ _title }}
|
|
35
35
|
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
36
36
|
name: 'chevron-down',
|
|
@@ -51,13 +51,17 @@ Parameters:
|
|
|
51
51
|
.setAttribute('type', 'button')
|
|
52
52
|
.setAttribute('id', _dropdown_id)
|
|
53
53
|
.setAttribute('data-bs-toggle', 'dropdown')
|
|
54
|
-
.addClass(['dropdown-toggle']) %}
|
|
54
|
+
.addClass(['dropdown-toggle', 'h2', 'd-md-none']) %}
|
|
55
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with {
|
|
56
|
+
label: _button_content,
|
|
57
|
+
clean_class: true,
|
|
58
|
+
attributes: trigger_attributes,
|
|
59
|
+
} only %}
|
|
55
60
|
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
56
|
-
title:
|
|
61
|
+
title: _title,
|
|
57
62
|
title_tag: _title_tag,
|
|
58
63
|
title_link: _title_link,
|
|
59
|
-
attributes: _title_attributes
|
|
60
|
-
.merge(trigger_attributes),
|
|
64
|
+
attributes: _title_attributes,
|
|
61
65
|
} only %}
|
|
62
66
|
<div class="dropdown-menu" aria-labelledby="{{ _dropdown_id }}">
|
|
63
67
|
{% include '@oe-bcl/bcl-navigation/navigation.html.twig' with {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{% apply spaceless %}
|
|
2
2
|
|
|
3
3
|
{# Parameters:
|
|
4
|
-
- id (string) (default: collapse-random(
|
|
4
|
+
- id (string) (default: collapse-random(10000), optional)
|
|
5
5
|
- message (alert object) (default: {})
|
|
6
6
|
- expandable (button object) (default: {})
|
|
7
7
|
- languages (link[]) (default: [])
|
|
8
8
|
#}
|
|
9
9
|
|
|
10
|
-
{% set _id = id|default('collapse-' ~ random(
|
|
10
|
+
{% set _id = id|default('collapse-' ~ random(10000)) %}
|
|
11
11
|
{% set _message = message|default({}) %}
|
|
12
12
|
{% set _expandable = expandable|default({}) %}
|
|
13
13
|
{% set _languages = languages|default([]) %}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{# Parameters:
|
|
4
4
|
- size (string) default('')
|
|
5
5
|
options: sm, lg, xl, fullscreen
|
|
6
|
-
- id (boolean) (default: modal-random(
|
|
6
|
+
- id (boolean) (default: modal-random(10000))
|
|
7
7
|
- fullscreen_responsive (string) (default: '')
|
|
8
8
|
options: sm, md, lg, xl, xxl
|
|
9
9
|
- static_backdrop (boolean) (default: false)
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
#}
|
|
24
24
|
|
|
25
25
|
{% set _size = size|default('') %}
|
|
26
|
-
{% set _id = id|default('modal-' ~ random(
|
|
26
|
+
{% set _id = id|default('modal-' ~ random(10000)) %}
|
|
27
27
|
{% set _fullscreen_responsive = fullscreen_responsive|default('') %}
|
|
28
28
|
{% set _static_backdrop = static_backdrop ?? false %}
|
|
29
29
|
{% set _verticaly_centered = verticaly_centered ?? false %}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{#
|
|
4
4
|
Parameters:
|
|
5
|
-
- id: (integer) (default: random(
|
|
5
|
+
- id: (integer) (default: random(10000))
|
|
6
6
|
- title: (string) (default: '')
|
|
7
7
|
- title_tag: (string) (default: 'h2')
|
|
8
8
|
- title_link: (link object) (default: {})
|
|
@@ -25,7 +25,7 @@ Parameters:
|
|
|
25
25
|
- icon_path (string) (default: ''): file containing the svg icons
|
|
26
26
|
#}
|
|
27
27
|
|
|
28
|
-
{% set _id = id|default(random(
|
|
28
|
+
{% set _id = id|default(random(10000)) %}
|
|
29
29
|
{% set _title = title|default('') %}
|
|
30
30
|
{% set _title_tag = title_tag|default('h2') %}
|
|
31
31
|
{% set _title_link = title_link|default({}) %}
|