@total_onion/onion-library 2.0.149 → 2.0.151
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/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3/post-link-widget.vue +4 -1
- package/components/block-raw-html-v3/raw-html-v3.js +7 -0
- package/components/block-raw-html-v3/raw-html-v3.scss +2 -0
- package/createDynamicBlockScss-v3.js +0 -1
- package/package.json +1 -1
- package/public/assetList.mjs +1 -1
- package/public/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +11 -11
- package/public/dynamicBlockScss-v3.scss +1 -0
- package/public/jsAssets.mjs +1 -1
- package/public/block-video-content-v3/video-content-v3.js +0 -11
- package/public/components/block-accent-image-v3/accent-image-v3.css +0 -0
- package/public/components/block-accent-image-v3/accent-image-v3.js +0 -7
- package/public/components/block-accordion-v3/accordion-v3.css +0 -474
- package/public/components/block-accordion-v3/accordion-v3.js +0 -117
- package/public/components/block-back-to-top-button-v3/back-to-top-button-v3.css +0 -62
- package/public/components/block-back-to-top-button-v3/back-to-top-button-v3.js +0 -12
- package/public/components/block-betterreviews-display-v3/betterreviews-display-v3.css +0 -96
- package/public/components/block-betterreviews-display-v3/betterreviews-display-v3.js +0 -7
- package/public/components/block-block-interactions-v3/block-interactions-v3.css +0 -34
- package/public/components/block-block-interactions-v3/block-interactions-v3.js +0 -44
- package/public/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.css +0 -928
- package/public/components/block-carousel-multi-layout-v3/carousel-multi-layout-v3.js +0 -169
- package/public/components/block-cocktail-recipe-v3/cocktail-recipe-v3.css +0 -317
- package/public/components/block-cocktail-recipe-v3/cocktail-recipe-v3.js +0 -93
- package/public/components/block-cover-link-v3/cover-link-v3.css +0 -0
- package/public/components/block-cover-link-v3/cover-link-v3.js +0 -7
- package/public/components/block-divider-v3/divider-v3.css +0 -74
- package/public/components/block-divider-v3/divider-v3.js +0 -7
- package/public/components/block-featured-image-gallery-v3/featured-image-gallery-v3.css +0 -102
- package/public/components/block-featured-image-gallery-v3/featured-image-gallery-v3.js +0 -44
- package/public/components/block-form-selection-v3/form-selection-v3.css +0 -32
- package/public/components/block-form-selection-v3/form-selection-v3.js +0 -61
- package/public/components/block-gradient-layer-v3/gradient-layer-v3.css +0 -52
- package/public/components/block-gradient-layer-v3/gradient-layer-v3.js +0 -7
- package/public/components/block-group-container-v3/group-container-v3.css +0 -323
- package/public/components/block-group-container-v3/group-container-v3.js +0 -7
- package/public/components/block-lottie-content-v3/lottie-content-v3.css +0 -0
- package/public/components/block-lottie-content-v3/lottie-content-v3.js +0 -25
- package/public/components/block-market-selector-v3/market-selector-v3.css +0 -139
- package/public/components/block-market-selector-v3/market-selector-v3.js +0 -7
- package/public/components/block-modal-form-v3/modal-form-v3.css +0 -0
- package/public/components/block-modal-form-v3/modal-form-v3.js +0 -44
- package/public/components/block-modal-form-v3/modal-form-v3.scss.css +0 -0
- package/public/components/block-nav-menu-container-v3/nav-menu-container-v3.css +0 -3
- package/public/components/block-nav-menu-container-v3/nav-menu-container-v3.js +0 -7
- package/public/components/block-post-info-v3/post-info-v3.css +0 -1310
- package/public/components/block-post-info-v3/post-info-v3.js +0 -7
- package/public/components/block-post-info-v3/post-info-v3.scss.css +0 -1310
- package/public/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.css +0 -859
- package/public/components/block-post-type-filter-grid-v3/post-type-filter-grid-v3.js +0 -13
- package/public/components/block-product-info-v3/product-info-v3.css +0 -993
- package/public/components/block-product-info-v3/product-info-v3.js +0 -7
- package/public/components/block-product-info-v3/product-info-v3.scss.css +0 -993
- package/public/components/block-responsive-table-v3/responsive-table-v3.css +0 -48
- package/public/components/block-responsive-table-v3/responsive-table-v3.js +0 -7
- package/public/components/block-scrolling-banner-v3/scrolling-banner-v3.css +0 -85
- package/public/components/block-scrolling-banner-v3/scrolling-banner-v3.js +0 -106
- package/public/components/block-section-separator-v3/section-separator-v3.css +0 -43
- package/public/components/block-section-separator-v3/section-separator-v3.js +0 -7
- package/public/components/block-single-column-container-v3/single-column-container-v3.css +0 -14
- package/public/components/block-single-column-container-v3/single-column-container-v3.js +0 -7
- package/public/components/block-single-responsive-image-v3/single-responsive-image-v3.css +0 -60
- package/public/components/block-single-responsive-image-v3/single-responsive-image-v3.js +0 -7
- package/public/components/block-site-copyright-notice-v3/site-copyright-notice-v3.css +0 -0
- package/public/components/block-site-copyright-notice-v3/site-copyright-notice-v3.js +0 -7
- package/public/components/block-site-logo-container-v3/site-logo-container-v3.css +0 -18
- package/public/components/block-site-logo-container-v3/site-logo-container-v3.js +0 -7
- package/public/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.css +0 -14
- package/public/components/block-site-title-and-tagline-v3/site-title-and-tagline-v3.js +0 -7
- package/public/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.css +0 -25
- package/public/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +0 -8
- package/public/components/block-social-networks-v3/social-networks-v3.css +0 -74
- package/public/components/block-social-networks-v3/social-networks-v3.js +0 -7
- package/public/components/block-spacer-v3/spacer-v3.css +0 -16
- package/public/components/block-spacer-v3/spacer-v3.js +0 -2
- package/public/components/block-spacer-v3/spacer-v3.scss.css +0 -16
- package/public/components/block-spotify-embed-v3/spotify-embed-v3.css +0 -7
- package/public/components/block-spotify-embed-v3/spotify-embed-v3.js +0 -7
- package/public/components/block-standard-content-v3/standard-content-v3.css +0 -529
- package/public/components/block-standard-content-v3/standard-content-v3.js +0 -7
- package/public/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.css +0 -0
- package/public/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +0 -7
- package/public/components/block-sub-group-container-v3/sub-group-container-v3.css +0 -308
- package/public/components/block-sub-group-container-v3/sub-group-container-v3.js +0 -2
- package/public/components/block-video-content-v3/video-content-v3.css +0 -105
- package/public/components/block-video-content-v3/video-content-v3.js +0 -11
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
export default function accordionv3Js(options = {}) {
|
|
2
|
-
try {
|
|
3
|
-
const { block } = options;
|
|
4
|
-
const blockClassName = block.dataset.assetkey;
|
|
5
|
-
const sections = block.querySelectorAll(
|
|
6
|
-
`.${blockClassName}-content`
|
|
7
|
-
);
|
|
8
|
-
const closeAccordionSections = () => {
|
|
9
|
-
sections.forEach((section) => {
|
|
10
|
-
if (section.classList.contains("active")) {
|
|
11
|
-
const question = section.querySelector(
|
|
12
|
-
`.${blockClassName}-question-wrapper`
|
|
13
|
-
);
|
|
14
|
-
const answer = section.querySelector(
|
|
15
|
-
`.${blockClassName}-answer-wrapper`
|
|
16
|
-
);
|
|
17
|
-
const svg = section.querySelector(
|
|
18
|
-
`.${blockClassName}-icon`
|
|
19
|
-
);
|
|
20
|
-
const iconImage = section.querySelector(
|
|
21
|
-
`.${blockClassName}-image-wrapper`
|
|
22
|
-
);
|
|
23
|
-
const sectionHeight = answer.scrollHeight;
|
|
24
|
-
answer.animate(
|
|
25
|
-
[
|
|
26
|
-
{
|
|
27
|
-
height: sectionHeight + "px"
|
|
28
|
-
},
|
|
29
|
-
{ height: "0px" }
|
|
30
|
-
],
|
|
31
|
-
{
|
|
32
|
-
fill: "forwards",
|
|
33
|
-
duration: 200,
|
|
34
|
-
easing: "ease-out"
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
answer.setAttribute("aria-hidden", "true");
|
|
38
|
-
question.classList.remove("active");
|
|
39
|
-
section.classList.remove("active");
|
|
40
|
-
if (svg) {
|
|
41
|
-
svg.classList.remove("active");
|
|
42
|
-
}
|
|
43
|
-
if (iconImage) {
|
|
44
|
-
iconImage.classList.remove("image-icon-active");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
sections.forEach((section) => {
|
|
50
|
-
const question = section.querySelector(
|
|
51
|
-
`.${blockClassName}-question-wrapper`
|
|
52
|
-
);
|
|
53
|
-
const answer = section.querySelector(
|
|
54
|
-
`.${blockClassName}-answer-wrapper`
|
|
55
|
-
);
|
|
56
|
-
const svg = section.querySelector(`.${blockClassName}-icon`);
|
|
57
|
-
const iconImage = section.querySelector(
|
|
58
|
-
`.${blockClassName}-image-wrapper`
|
|
59
|
-
);
|
|
60
|
-
question.addEventListener("click", () => {
|
|
61
|
-
const isCollapsed = answer.getAttribute("aria-hidden") === "true";
|
|
62
|
-
closeAccordionSections();
|
|
63
|
-
if (isCollapsed) {
|
|
64
|
-
const sectionHeight = answer.scrollHeight;
|
|
65
|
-
answer.animate(
|
|
66
|
-
[
|
|
67
|
-
{ height: "0px" },
|
|
68
|
-
{
|
|
69
|
-
height: sectionHeight + "px"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
{
|
|
73
|
-
fill: "forwards",
|
|
74
|
-
duration: 200,
|
|
75
|
-
easing: "ease-out"
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
section.classList.add("active");
|
|
79
|
-
answer.classList.add("active");
|
|
80
|
-
answer.setAttribute("aria-hidden", "false");
|
|
81
|
-
if (svg) {
|
|
82
|
-
svg.classList.add("active");
|
|
83
|
-
}
|
|
84
|
-
if (iconImage) {
|
|
85
|
-
iconImage.classList.add("image-icon-active");
|
|
86
|
-
}
|
|
87
|
-
} else {
|
|
88
|
-
const sectionHeight = answer.scrollHeight;
|
|
89
|
-
section.classList.remove("active");
|
|
90
|
-
answer.animate(
|
|
91
|
-
[
|
|
92
|
-
{
|
|
93
|
-
height: sectionHeight + "px"
|
|
94
|
-
},
|
|
95
|
-
{ height: "0px" }
|
|
96
|
-
],
|
|
97
|
-
{
|
|
98
|
-
fill: "forwards",
|
|
99
|
-
duration: 200,
|
|
100
|
-
easing: "ease-out"
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
answer.classList.remove("active");
|
|
104
|
-
answer.setAttribute("aria-hidden", "true");
|
|
105
|
-
if (svg) {
|
|
106
|
-
svg.classList.remove("active");
|
|
107
|
-
}
|
|
108
|
-
if (iconImage) {
|
|
109
|
-
iconImage.classList.remove("image-icon-active");
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
} catch (error) {
|
|
115
|
-
console.error(error);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
.back-to-top-button {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
z-index: 50;
|
|
5
|
-
overflow: visible;
|
|
6
|
-
overflow: initial;
|
|
7
|
-
}
|
|
8
|
-
.back-to-top-button__arrow {
|
|
9
|
-
--arrow-colour: black;
|
|
10
|
-
position: absolute;
|
|
11
|
-
border-style: solid;
|
|
12
|
-
border-color: black;
|
|
13
|
-
border-color: var(--arrow-colour);
|
|
14
|
-
border-width: 0 2px 2px 0;
|
|
15
|
-
display: inline-block;
|
|
16
|
-
transform: rotate(-135deg);
|
|
17
|
-
height: 20%;
|
|
18
|
-
width: 20%;
|
|
19
|
-
}
|
|
20
|
-
.back-to-top-button__button {
|
|
21
|
-
--bg-colour: white;
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
align-items: center;
|
|
25
|
-
position: fixed;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
height: calc(50 / var(--desktop-design-reference) * var(--screen-width-static));
|
|
28
|
-
width: calc(50 / var(--desktop-design-reference) * var(--screen-width-static));
|
|
29
|
-
border: none;
|
|
30
|
-
border-radius: 50px;
|
|
31
|
-
padding: calc(18 / var(--desktop-design-reference) * var(--screen-width-static));
|
|
32
|
-
background-color: white;
|
|
33
|
-
background-color: var(--bg-colour);
|
|
34
|
-
right: calc(10 / var(--design-reference) * var(--screen-width));
|
|
35
|
-
border-radius: var(--button-border-radius);
|
|
36
|
-
}
|
|
37
|
-
@media screen and (min-width: 768px) {
|
|
38
|
-
.back-to-top-button__button {
|
|
39
|
-
right: calc(30 / var(--design-reference) * var(--screen-width));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
@media screen and (min-width: 1024px) {
|
|
43
|
-
.back-to-top-button__button {
|
|
44
|
-
right: calc(60 / var(--design-reference) * var(--screen-width));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.back-to-top-button__button--fixed {
|
|
48
|
-
position: fixed;
|
|
49
|
-
bottom: calc(60 / var(--desktop-design-reference) * var(--screen-width-static));
|
|
50
|
-
}
|
|
51
|
-
.back-to-top-button__button--absolute {
|
|
52
|
-
position: absolute;
|
|
53
|
-
translate: 0 -50%;
|
|
54
|
-
}
|
|
55
|
-
.wp-admin .back-to-top-button__button {
|
|
56
|
-
position: absolute;
|
|
57
|
-
translate: 0 0;
|
|
58
|
-
bottom: 0;
|
|
59
|
-
}
|
|
60
|
-
.back-to-top-button__image {
|
|
61
|
-
width: calc(var(--image-size) / var(--desktop-design-reference) * var(--screen-width-static));
|
|
62
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default function backtotopbuttonJs(options = {}) {
|
|
2
|
-
try {
|
|
3
|
-
const { block } = options;
|
|
4
|
-
const button = block.querySelector(".back-to-top-button__button");
|
|
5
|
-
button.addEventListener(
|
|
6
|
-
"click",
|
|
7
|
-
() => window.scrollTo({ top: 0, behavior: "smooth" })
|
|
8
|
-
);
|
|
9
|
-
} catch (error) {
|
|
10
|
-
console.error(error);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
.betterreviews-display-v3.loaded .better-reviews__criteria-stars {
|
|
2
|
-
animation: slide-reveal-right 1s 2s ease-out forwards;
|
|
3
|
-
}
|
|
4
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars {
|
|
5
|
-
--star-count: 5;
|
|
6
|
-
--star-size: 16px;
|
|
7
|
-
--better-reviews-star-width: calc( var(--star-count) * var(--star-size) + (var(--star-count) - 1) * 0px );
|
|
8
|
-
opacity: 0;
|
|
9
|
-
position: relative;
|
|
10
|
-
width: calc(5 * 16px + (5 - 1) * 0px);
|
|
11
|
-
width: var(--better-reviews-star-width);
|
|
12
|
-
height: 16px;
|
|
13
|
-
height: var(--star-size);
|
|
14
|
-
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27.86 26'><path d='M27.86,10.12l-7.24,6.46,1.99,9.42-8.68-4.71-8.68,4.54,1.99-9.43L0,9.95l9.77-1.22L13.93,0l4.16,8.73,9.77,1.4Z'/></svg>");
|
|
15
|
-
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27.86 26'><path d='M27.86,10.12l-7.24,6.46,1.99,9.42-8.68-4.71-8.68,4.54,1.99-9.43L0,9.95l9.77-1.22L13.93,0l4.16,8.73,9.77,1.4Z'/></svg>");
|
|
16
|
-
-webkit-mask-repeat: repeat-x;
|
|
17
|
-
mask-repeat: repeat-x;
|
|
18
|
-
-webkit-mask-size: 16px auto;
|
|
19
|
-
mask-size: 16px auto;
|
|
20
|
-
-webkit-mask-size: var(--star-size) auto;
|
|
21
|
-
mask-size: var(--star-size) auto;
|
|
22
|
-
-webkit-mask-position: left 33%;
|
|
23
|
-
mask-position: left 33%;
|
|
24
|
-
background: transparent;
|
|
25
|
-
}
|
|
26
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars::before {
|
|
27
|
-
content: "";
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
bottom: 0;
|
|
32
|
-
left: 0;
|
|
33
|
-
background:
|
|
34
|
-
linear-gradient(
|
|
35
|
-
90deg,
|
|
36
|
-
#44271c 0%,
|
|
37
|
-
#dabb9c 32%,
|
|
38
|
-
#e5c29d 38%,
|
|
39
|
-
#ebc79f 45%,
|
|
40
|
-
#7a4a36 74%,
|
|
41
|
-
#89563e 81%,
|
|
42
|
-
#9d6749 92%,
|
|
43
|
-
#a56d4e 100%);
|
|
44
|
-
background-clip: content-box;
|
|
45
|
-
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27.86 26'><path d='M27.86,10.12l-7.24,6.46,1.99,9.42-8.68-4.71-8.68,4.54,1.99-9.43L0,9.95l9.77-1.22L13.93,0l4.16,8.73,9.77,1.4Z'/></svg>");
|
|
46
|
-
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27.86 26'><path d='M27.86,10.12l-7.24,6.46,1.99,9.42-8.68-4.71-8.68,4.54,1.99-9.43L0,9.95l9.77-1.22L13.93,0l4.16,8.73,9.77,1.4Z'/></svg>");
|
|
47
|
-
-webkit-mask-repeat: repeat-x;
|
|
48
|
-
mask-repeat: repeat-x;
|
|
49
|
-
-webkit-mask-size: var(--star-size) auto;
|
|
50
|
-
mask-size: var(--star-size) auto;
|
|
51
|
-
-webkit-mask-position: left 33%;
|
|
52
|
-
mask-position: left 33%;
|
|
53
|
-
}
|
|
54
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_05::before {
|
|
55
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.911);
|
|
56
|
-
}
|
|
57
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_10::before {
|
|
58
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.8);
|
|
59
|
-
}
|
|
60
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_15::before {
|
|
61
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.702);
|
|
62
|
-
}
|
|
63
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_20::before {
|
|
64
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.6);
|
|
65
|
-
}
|
|
66
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_25::before {
|
|
67
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.5);
|
|
68
|
-
}
|
|
69
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_30::before {
|
|
70
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.4);
|
|
71
|
-
}
|
|
72
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_35::before {
|
|
73
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.298);
|
|
74
|
-
}
|
|
75
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_40::before {
|
|
76
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.2);
|
|
77
|
-
}
|
|
78
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_45::before {
|
|
79
|
-
padding-right: calc(var(--better-reviews-star-width) * 0.1);
|
|
80
|
-
}
|
|
81
|
-
.betterreviews-display-v3 .better-reviews__average .better-reviews__criteria-stars.better-reviews__star_50::before {
|
|
82
|
-
padding-right: 0;
|
|
83
|
-
}
|
|
84
|
-
@keyframes slide-reveal-right {
|
|
85
|
-
from {
|
|
86
|
-
clip-path: inset(0 100% 0 0);
|
|
87
|
-
opacity: 0;
|
|
88
|
-
}
|
|
89
|
-
25% {
|
|
90
|
-
opacity: 1;
|
|
91
|
-
}
|
|
92
|
-
100% {
|
|
93
|
-
clip-path: inset(0 0 0 0);
|
|
94
|
-
opacity: 1;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.block-interactions-v3__block-close-button {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
border: medium none currentcolor;
|
|
4
|
-
border: initial;
|
|
5
|
-
background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
|
|
6
|
-
background: initial;
|
|
7
|
-
}
|
|
8
|
-
.block-interactions-v3__popup-trigger {
|
|
9
|
-
-webkit-appearance: none;
|
|
10
|
-
-moz-appearance: none;
|
|
11
|
-
appearance: none;
|
|
12
|
-
border: medium none currentcolor;
|
|
13
|
-
border: initial;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
background-color: initial;
|
|
16
|
-
display: flex;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
.block-interactions-v3 svg {
|
|
20
|
-
width: calc(30 / var(--design-reference) * var(--screen-width));
|
|
21
|
-
height: calc(30 / var(--design-reference) * var(--screen-width));
|
|
22
|
-
}
|
|
23
|
-
@media screen and (min-width: 768px) {
|
|
24
|
-
.block-interactions-v3 svg {
|
|
25
|
-
width: calc(30 / var(--design-reference) * var(--screen-width));
|
|
26
|
-
height: calc(30 / var(--design-reference) * var(--screen-width));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
@media screen and (min-width: 1024px) {
|
|
30
|
-
.block-interactions-v3 svg {
|
|
31
|
-
width: calc(30 / var(--design-reference) * var(--screen-width));
|
|
32
|
-
height: calc(30 / var(--design-reference) * var(--screen-width));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export default function blockinteractionsv3Js(options = {}) {
|
|
2
|
-
try {
|
|
3
|
-
let setCookie = function(name, value, days) {
|
|
4
|
-
const expires = new Date(Date.now() + days * 864e5).toUTCString();
|
|
5
|
-
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/`;
|
|
6
|
-
}, getCookie = function(name) {
|
|
7
|
-
return document.cookie.split("; ").reduce((result, cookieString) => {
|
|
8
|
-
const [key, val] = cookieString.split("=");
|
|
9
|
-
return key === name ? decodeURIComponent(val) : result;
|
|
10
|
-
}, "");
|
|
11
|
-
};
|
|
12
|
-
const { block } = options;
|
|
13
|
-
const blockId = block.dataset.blockid;
|
|
14
|
-
const parentBlockId = block.dataset.parentblockid;
|
|
15
|
-
const blockCloseButtons = block.querySelectorAll(".block-interactions-v3__block-close-button");
|
|
16
|
-
if (!blockCloseButtons.length) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
blockCloseButtons.forEach((button) => {
|
|
20
|
-
const shouldStoreCookie = button?.dataset?.storeCookie === "true";
|
|
21
|
-
const cookieKey = `blockClosed_${parentBlockId}`;
|
|
22
|
-
const wrappingSection = document.querySelector(`[data-blockid="${parentBlockId}"]`);
|
|
23
|
-
if (getCookie(cookieKey) === "true") {
|
|
24
|
-
wrappingSection.style.animation = "none";
|
|
25
|
-
wrappingSection.style.display = "none";
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
button.addEventListener("click", (e) => {
|
|
29
|
-
console.log(e.currentTarget.dataset);
|
|
30
|
-
wrappingSection.style.animation = "none";
|
|
31
|
-
wrappingSection.offsetHeight;
|
|
32
|
-
wrappingSection.style.animation = `${e.currentTarget.dataset.animationname} ${e.currentTarget.dataset.animationduration}s forwards reverse`;
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
wrappingSection.style.display = "none";
|
|
35
|
-
}, e.currentTarget.dataset.animationduration * 1e3);
|
|
36
|
-
if (shouldStoreCookie) {
|
|
37
|
-
setCookie(cookieKey, "true", 7);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.error("Error in blockinteractionsv3Js:", error);
|
|
43
|
-
}
|
|
44
|
-
}
|