@bebranded/bb-contents 1.1.16 → 1.1.18
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/bb-contents.js +10 -6
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BeBranded Contents
|
|
3
3
|
* Contenus additionnels français pour Webflow
|
|
4
|
-
* @version 1.1.
|
|
4
|
+
* @version 1.1.18
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
// Version du script
|
|
13
|
-
const BB_CONTENTS_VERSION = '1.1.
|
|
13
|
+
const BB_CONTENTS_VERSION = '1.1.18';
|
|
14
14
|
|
|
15
15
|
// Créer l'objet temporaire pour la configuration si il n'existe pas
|
|
16
16
|
if (!window._bbContentsConfig) {
|
|
@@ -297,8 +297,7 @@
|
|
|
297
297
|
block.querySelector('[class*="dropdown"]') !== null;
|
|
298
298
|
},
|
|
299
299
|
|
|
300
|
-
//
|
|
301
|
-
// Respecte le design Webflow : position au-dessus du logo, pas de surcharge de styles, pas de latence.
|
|
300
|
+
// Dropdown en portal (fixed) au-dessus du toggle, aligné en haut à droite, pour éviter le clipping du marquee
|
|
302
301
|
_enableMarqueeDropdowns: function(block) {
|
|
303
302
|
if (!block || !block.querySelectorAll) return;
|
|
304
303
|
const items = block.querySelectorAll('.bb-marquee_item, [role="listitem"]');
|
|
@@ -326,7 +325,9 @@
|
|
|
326
325
|
const rect = toggle.getBoundingClientRect();
|
|
327
326
|
portalWrapper = document.createElement('div');
|
|
328
327
|
portalWrapper.setAttribute('data-bb-marquee-dropdown-portal', 'true');
|
|
329
|
-
portalWrapper.style.cssText =
|
|
328
|
+
portalWrapper.style.cssText =
|
|
329
|
+
'position:fixed;right:' + (window.innerWidth - rect.right) + 'px;top:' + rect.top + 'px;' +
|
|
330
|
+
'transform:translateY(-100%);margin-top:-4px;z-index:9999;background:transparent;';
|
|
330
331
|
const clone = list.cloneNode(true);
|
|
331
332
|
clone.style.display = 'block';
|
|
332
333
|
portalWrapper.appendChild(clone);
|
|
@@ -419,7 +420,10 @@
|
|
|
419
420
|
const mainBlock = document.createElement('div');
|
|
420
421
|
mainBlock.innerHTML = originalHTML;
|
|
421
422
|
const hasDropdowns = this._hasDropdownInBlock(mainBlock);
|
|
422
|
-
if (hasDropdowns)
|
|
423
|
+
if (hasDropdowns) {
|
|
424
|
+
mainContainer.style.overflow = 'visible';
|
|
425
|
+
scrollContainer.style.overflow = 'visible';
|
|
426
|
+
}
|
|
423
427
|
|
|
424
428
|
// Précharger toutes les images avant clonage
|
|
425
429
|
const preloadAllImagesFirst = function(block) {
|