@total_onion/onion-library 1.0.192 → 1.0.194
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-smash-balloon-social-media-v3/group_6890a2ab0e0a9.json +25 -2
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.js +108 -2
- package/components/block-smash-balloon-social-media-v3/smash-balloon-social-media-v3.twig +2 -4
- package/components/block-sub-group-container-v3/group_686ceba7d6066.json +1 -98
- package/components/{block-sticky-buy-cta-v3 → fields-sticky-buy-cta-v3}/group_68a4564d89574.json +43 -127
- package/package.json +1 -1
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3-extra.scss +0 -5
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.js +0 -7
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.php +0 -14
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.scss +0 -16
- package/components/block-sticky-buy-cta-v3/sticky-buy-cta-v3.twig +0 -84
|
@@ -88,6 +88,29 @@
|
|
|
88
88
|
"other_choice": 0,
|
|
89
89
|
"layout": "vertical",
|
|
90
90
|
"save_other_choice": 0
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"key": "field_68a5b4f80677b",
|
|
94
|
+
"label": "Transform to marquee carousel",
|
|
95
|
+
"name": "marquee",
|
|
96
|
+
"aria-label": "",
|
|
97
|
+
"type": "true_false",
|
|
98
|
+
"instructions": "",
|
|
99
|
+
"required": 0,
|
|
100
|
+
"conditional_logic": 0,
|
|
101
|
+
"wrapper": {
|
|
102
|
+
"width": "",
|
|
103
|
+
"class": "",
|
|
104
|
+
"id": ""
|
|
105
|
+
},
|
|
106
|
+
"wpml_cf_preferences": 0,
|
|
107
|
+
"message": "Make carousel to scroll without delays and pauses.",
|
|
108
|
+
"default_value": 0,
|
|
109
|
+
"style": "",
|
|
110
|
+
"allow_in_bindings": 0,
|
|
111
|
+
"ui": 0,
|
|
112
|
+
"ui_on_text": "",
|
|
113
|
+
"ui_off_text": ""
|
|
91
114
|
}
|
|
92
115
|
],
|
|
93
116
|
"location": [
|
|
@@ -116,5 +139,5 @@
|
|
|
116
139
|
"acfe_display_title": "",
|
|
117
140
|
"acfe_meta": "",
|
|
118
141
|
"acfe_note": "",
|
|
119
|
-
"modified":
|
|
120
|
-
}
|
|
142
|
+
"modified": 1755690314
|
|
143
|
+
}
|
|
@@ -1,7 +1,113 @@
|
|
|
1
|
-
export default function smashballoonsocialmediav3Js
|
|
1
|
+
export default function smashballoonsocialmediav3Js(options = {}) {
|
|
2
2
|
try {
|
|
3
3
|
const {block} = options;
|
|
4
|
-
|
|
4
|
+
if (!block) return;
|
|
5
|
+
|
|
6
|
+
// Avoid double init per block
|
|
7
|
+
if (block.dataset.marquee) {
|
|
8
|
+
if (block.dataset.sbiMarqueeInit === '1') return;
|
|
9
|
+
block.dataset.sbiMarqueeInit = '1';
|
|
10
|
+
|
|
11
|
+
const outer = block.querySelector(
|
|
12
|
+
'.sbi-owl-stage-outer, .owl-stage-outer'
|
|
13
|
+
);
|
|
14
|
+
const stage = block.querySelector('.sbi-owl-stage, .owl-stage');
|
|
15
|
+
if (!outer || !stage) return;
|
|
16
|
+
|
|
17
|
+
// --- Config ---
|
|
18
|
+
const PX_PER_SEC = 50; // adjust speed as needed
|
|
19
|
+
|
|
20
|
+
// --- Scoped CSS (only affects this block) ---
|
|
21
|
+
const uid = `sbi-marquee-${Math.random().toString(36).slice(2)}`;
|
|
22
|
+
block.setAttribute('data-sbi-marquee-id', uid);
|
|
23
|
+
|
|
24
|
+
const style = document.createElement('style');
|
|
25
|
+
style.textContent = `
|
|
26
|
+
[data-sbi-marquee-id="${uid}"] .sbi-owl-stage,
|
|
27
|
+
[data-sbi-marquee-id="${uid}"] .owl-stage {
|
|
28
|
+
transition: none !important;
|
|
29
|
+
animation: none !important;
|
|
30
|
+
will-change: transform;
|
|
31
|
+
}
|
|
32
|
+
[data-sbi-marquee-id="${uid}"] .owl-nav,
|
|
33
|
+
[data-sbi-marquee-id="${uid}"] .owl-dots {
|
|
34
|
+
display: none !important;
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
block.appendChild(style);
|
|
38
|
+
|
|
39
|
+
// --- Helpers ---
|
|
40
|
+
const nonClonedItems = () =>
|
|
41
|
+
Array.from(
|
|
42
|
+
stage.querySelectorAll(
|
|
43
|
+
'.sbi-owl-item:not(.cloned), .owl-item:not(.cloned)'
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const getLoopWidth = () => {
|
|
48
|
+
const items = nonClonedItems();
|
|
49
|
+
if (!items.length)
|
|
50
|
+
return stage.scrollWidth / 2 || stage.scrollWidth || 0;
|
|
51
|
+
let w = 0;
|
|
52
|
+
for (const el of items) w += el.getBoundingClientRect().width;
|
|
53
|
+
return w;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// --- Animation state ---
|
|
57
|
+
let loopW = getLoopWidth();
|
|
58
|
+
let x = 0;
|
|
59
|
+
let last = performance.now();
|
|
60
|
+
let raf = null;
|
|
61
|
+
|
|
62
|
+
function tick(now) {
|
|
63
|
+
const dt = (now - last) / 1000;
|
|
64
|
+
last = now;
|
|
65
|
+
|
|
66
|
+
x -= PX_PER_SEC * dt;
|
|
67
|
+
|
|
68
|
+
// Wrap seamlessly after the width of the original (non-cloned) set
|
|
69
|
+
if (-x >= loopW) x += loopW;
|
|
70
|
+
|
|
71
|
+
stage.style.setProperty(
|
|
72
|
+
'transform',
|
|
73
|
+
`translate3d(${x}px,0,0)`,
|
|
74
|
+
'important'
|
|
75
|
+
);
|
|
76
|
+
raf = requestAnimationFrame(tick);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Resize-aware (e.g., responsive cols/images)
|
|
80
|
+
const ro = new ResizeObserver(() => {
|
|
81
|
+
loopW = getLoopWidth();
|
|
82
|
+
});
|
|
83
|
+
ro.observe(stage);
|
|
84
|
+
|
|
85
|
+
// Optional: pause on hover
|
|
86
|
+
outer.addEventListener('mouseenter', () => {
|
|
87
|
+
if (raf) cancelAnimationFrame(raf);
|
|
88
|
+
raf = null;
|
|
89
|
+
});
|
|
90
|
+
outer.addEventListener('mouseleave', () => {
|
|
91
|
+
if (!raf) {
|
|
92
|
+
last = performance.now();
|
|
93
|
+
raf = requestAnimationFrame(tick);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// Kick off
|
|
98
|
+
last = performance.now();
|
|
99
|
+
raf = requestAnimationFrame(tick);
|
|
100
|
+
|
|
101
|
+
// Optional cleanup handle if you ever need it later
|
|
102
|
+
block._sbiMarqueeDestroy = () => {
|
|
103
|
+
if (raf) cancelAnimationFrame(raf);
|
|
104
|
+
ro.disconnect();
|
|
105
|
+
style.remove();
|
|
106
|
+
stage.style.removeProperty('transform');
|
|
107
|
+
delete block.dataset.sbiMarqueeInit;
|
|
108
|
+
delete block._sbiMarqueeDestroy;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
5
111
|
} catch (error) {
|
|
6
112
|
console.error(error);
|
|
7
113
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% set blockClassName = "
|
|
1
|
+
{% set blockClassName = "smash-balloon-social-media-v3" %}
|
|
2
2
|
{% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields: fields, block: block }, with_context = false) %}
|
|
3
3
|
{% set htmlEntryPoint = include('entry-points/entry-point-html.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
|
|
4
4
|
{% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
{% set sectionStyles = styleEntryPoint %}
|
|
9
9
|
|
|
10
10
|
{{previewEntryPoint}}
|
|
11
|
-
|
|
12
|
-
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}}" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
|
|
11
|
+
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}}" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}" {% if fields.marquee %} data-marquee="true" {% endif %}>
|
|
13
12
|
{% if fields.social_media_type == 'instagram' %}
|
|
14
13
|
{{ function('do_shortcode', '[instagram-feed feed=' ~ fields.feed_id ~ ']') }}
|
|
15
14
|
{% endif %}
|
|
16
|
-
|
|
17
15
|
{{htmlEntryPoint}}
|
|
18
16
|
</section>
|
|
@@ -1385,103 +1385,6 @@
|
|
|
1385
1385
|
"acfe_layout_col": "auto",
|
|
1386
1386
|
"acfe_layout_allowed_col": false
|
|
1387
1387
|
},
|
|
1388
|
-
"layout_68a4ea3abadb7": {
|
|
1389
|
-
"key": "layout_68a4ea3abadb7",
|
|
1390
|
-
"name": "sticky_buy_cta_v3",
|
|
1391
|
-
"label": "Sticky buy cta v3",
|
|
1392
|
-
"display": "block",
|
|
1393
|
-
"sub_fields": [
|
|
1394
|
-
{
|
|
1395
|
-
"key": "field_68a4ea3abadba",
|
|
1396
|
-
"label": "Grid Layout",
|
|
1397
|
-
"name": "",
|
|
1398
|
-
"aria-label": "",
|
|
1399
|
-
"type": "tab",
|
|
1400
|
-
"instructions": "",
|
|
1401
|
-
"required": 0,
|
|
1402
|
-
"conditional_logic": 0,
|
|
1403
|
-
"wrapper": {
|
|
1404
|
-
"width": "",
|
|
1405
|
-
"class": "",
|
|
1406
|
-
"id": ""
|
|
1407
|
-
},
|
|
1408
|
-
"wpml_cf_preferences": 3,
|
|
1409
|
-
"placement": "top",
|
|
1410
|
-
"endpoint": 0,
|
|
1411
|
-
"no_preference": 0,
|
|
1412
|
-
"selected": 0
|
|
1413
|
-
},
|
|
1414
|
-
{
|
|
1415
|
-
"key": "field_68a4ea3abadbb",
|
|
1416
|
-
"label": "grid layout",
|
|
1417
|
-
"name": "grid_layout_copy",
|
|
1418
|
-
"aria-label": "",
|
|
1419
|
-
"type": "clone",
|
|
1420
|
-
"instructions": "",
|
|
1421
|
-
"required": 0,
|
|
1422
|
-
"conditional_logic": 0,
|
|
1423
|
-
"wrapper": {
|
|
1424
|
-
"width": "",
|
|
1425
|
-
"class": "",
|
|
1426
|
-
"id": ""
|
|
1427
|
-
},
|
|
1428
|
-
"wpml_cf_preferences": 3,
|
|
1429
|
-
"clone": [
|
|
1430
|
-
"group_68822860bda9f"
|
|
1431
|
-
],
|
|
1432
|
-
"display": "seamless",
|
|
1433
|
-
"layout": "block",
|
|
1434
|
-
"prefix_label": 0,
|
|
1435
|
-
"prefix_name": 0,
|
|
1436
|
-
"acfe_seamless_style": 0,
|
|
1437
|
-
"acfe_clone_modal": 0,
|
|
1438
|
-
"acfe_clone_modal_close": 0,
|
|
1439
|
-
"acfe_clone_modal_button": "",
|
|
1440
|
-
"acfe_clone_modal_size": "large"
|
|
1441
|
-
},
|
|
1442
|
-
{
|
|
1443
|
-
"key": "field_68a4ea3abadbc",
|
|
1444
|
-
"label": "sticky buy cta fields",
|
|
1445
|
-
"name": "sticky_buy_cta_fields",
|
|
1446
|
-
"aria-label": "",
|
|
1447
|
-
"type": "clone",
|
|
1448
|
-
"instructions": "",
|
|
1449
|
-
"required": 0,
|
|
1450
|
-
"conditional_logic": 0,
|
|
1451
|
-
"wrapper": {
|
|
1452
|
-
"width": "",
|
|
1453
|
-
"class": "",
|
|
1454
|
-
"id": ""
|
|
1455
|
-
},
|
|
1456
|
-
"wpml_cf_preferences": 3,
|
|
1457
|
-
"clone": [
|
|
1458
|
-
"group_68a4564d89574"
|
|
1459
|
-
],
|
|
1460
|
-
"display": "seamless",
|
|
1461
|
-
"layout": "block",
|
|
1462
|
-
"prefix_label": 0,
|
|
1463
|
-
"prefix_name": 0,
|
|
1464
|
-
"acfe_seamless_style": 0,
|
|
1465
|
-
"acfe_clone_modal": 0,
|
|
1466
|
-
"acfe_clone_modal_close": 0,
|
|
1467
|
-
"acfe_clone_modal_button": "",
|
|
1468
|
-
"acfe_clone_modal_size": "large"
|
|
1469
|
-
}
|
|
1470
|
-
],
|
|
1471
|
-
"min": "",
|
|
1472
|
-
"max": "",
|
|
1473
|
-
"acfe_flexible_render_template": false,
|
|
1474
|
-
"acfe_flexible_render_style": false,
|
|
1475
|
-
"acfe_flexible_render_script": false,
|
|
1476
|
-
"acfe_flexible_thumbnail": false,
|
|
1477
|
-
"acfe_flexible_settings": false,
|
|
1478
|
-
"acfe_flexible_settings_size": "medium",
|
|
1479
|
-
"acfe_layout_locations": [],
|
|
1480
|
-
"acfe_flexible_modal_edit_size": false,
|
|
1481
|
-
"acfe_flexible_category": false,
|
|
1482
|
-
"acfe_layout_col": "auto",
|
|
1483
|
-
"acfe_layout_allowed_col": false
|
|
1484
|
-
},
|
|
1485
1388
|
"layout_68920fded9d71": {
|
|
1486
1389
|
"key": "layout_68920fded9d71",
|
|
1487
1390
|
"name": "social_networks_v3",
|
|
@@ -2266,5 +2169,5 @@
|
|
|
2266
2169
|
"acfe_display_title": "",
|
|
2267
2170
|
"acfe_meta": "",
|
|
2268
2171
|
"acfe_note": "",
|
|
2269
|
-
"modified":
|
|
2172
|
+
"modified": 1755691803
|
|
2270
2173
|
}
|
package/components/{block-sticky-buy-cta-v3 → fields-sticky-buy-cta-v3}/group_68a4564d89574.json
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"key": "group_68a4564d89574",
|
|
3
|
-
"title": "
|
|
3
|
+
"title": "Fields: Sticky buy CTA v3",
|
|
4
4
|
"fields": [
|
|
5
5
|
{
|
|
6
|
-
"key": "
|
|
7
|
-
"label": "
|
|
8
|
-
"name": "",
|
|
6
|
+
"key": "field_68a456b5de3ef",
|
|
7
|
+
"label": "Enable buy button",
|
|
8
|
+
"name": "enable_buy_button",
|
|
9
9
|
"aria-label": "",
|
|
10
|
-
"type": "
|
|
10
|
+
"type": "true_false",
|
|
11
11
|
"instructions": "",
|
|
12
12
|
"required": 0,
|
|
13
13
|
"conditional_logic": 0,
|
|
@@ -17,48 +17,55 @@
|
|
|
17
17
|
"id": ""
|
|
18
18
|
},
|
|
19
19
|
"wpml_cf_preferences": 3,
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
20
|
+
"message": "",
|
|
21
|
+
"default_value": 0,
|
|
22
|
+
"ui_on_text": "",
|
|
23
|
+
"ui_off_text": "",
|
|
24
|
+
"ui": 1,
|
|
25
|
+
"style": ""
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
|
-
"key": "
|
|
27
|
-
"label": "
|
|
28
|
-
"name": "
|
|
28
|
+
"key": "field_68a4570072567",
|
|
29
|
+
"label": "Product CTA Button",
|
|
30
|
+
"name": "buy_now_cta",
|
|
29
31
|
"aria-label": "",
|
|
30
|
-
"type": "
|
|
32
|
+
"type": "select",
|
|
31
33
|
"instructions": "",
|
|
32
34
|
"required": 0,
|
|
33
|
-
"conditional_logic":
|
|
35
|
+
"conditional_logic": [
|
|
36
|
+
[
|
|
37
|
+
{
|
|
38
|
+
"field": "field_68a456b5de3ef",
|
|
39
|
+
"operator": "==",
|
|
40
|
+
"value": "1"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
],
|
|
34
44
|
"wrapper": {
|
|
35
45
|
"width": "",
|
|
36
46
|
"class": "",
|
|
37
47
|
"id": ""
|
|
38
48
|
},
|
|
39
49
|
"wpml_cf_preferences": 3,
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
50
|
+
"choices": {
|
|
51
|
+
"__none": "None",
|
|
52
|
+
"__shopify": "Shopify",
|
|
53
|
+
"__prctb": "Click to Buy",
|
|
54
|
+
"__direct_link": "Direct Link",
|
|
55
|
+
"__pr_usa_widget": "PR USA Widget v1 (Reservebar)"
|
|
56
|
+
},
|
|
57
|
+
"default_value": "__none",
|
|
58
|
+
"return_format": "value",
|
|
48
59
|
"multiple": 0,
|
|
49
60
|
"max": "",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"acfe_add_post": 0,
|
|
53
|
-
"acfe_edit_post": 0,
|
|
54
|
-
"acfe_bidirectional": {
|
|
55
|
-
"acfe_bidirectional_enabled": "0"
|
|
56
|
-
},
|
|
61
|
+
"prepend": "",
|
|
62
|
+
"append": "",
|
|
57
63
|
"allow_null": 0,
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
64
|
+
"ui": 0,
|
|
65
|
+
"ajax": 0,
|
|
66
|
+
"placeholder": "",
|
|
67
|
+
"allow_custom": 0,
|
|
68
|
+
"search_placeholder": "",
|
|
62
69
|
"min": ""
|
|
63
70
|
},
|
|
64
71
|
{
|
|
@@ -145,49 +152,6 @@
|
|
|
145
152
|
"prepend": "",
|
|
146
153
|
"append": ""
|
|
147
154
|
},
|
|
148
|
-
{
|
|
149
|
-
"key": "field_68a4570072567",
|
|
150
|
-
"label": "Product CTA Button",
|
|
151
|
-
"name": "buy_now_cta",
|
|
152
|
-
"aria-label": "",
|
|
153
|
-
"type": "select",
|
|
154
|
-
"instructions": "",
|
|
155
|
-
"required": 0,
|
|
156
|
-
"conditional_logic": [
|
|
157
|
-
[
|
|
158
|
-
{
|
|
159
|
-
"field": "field_68a456b5de3ef",
|
|
160
|
-
"operator": "!=empty"
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
],
|
|
164
|
-
"wrapper": {
|
|
165
|
-
"width": "",
|
|
166
|
-
"class": "",
|
|
167
|
-
"id": ""
|
|
168
|
-
},
|
|
169
|
-
"wpml_cf_preferences": 3,
|
|
170
|
-
"choices": {
|
|
171
|
-
"__none": "None",
|
|
172
|
-
"__shopify": "Shopify",
|
|
173
|
-
"__prctb": "Click to Buy",
|
|
174
|
-
"__direct_link": "Direct Link",
|
|
175
|
-
"__pr_usa_widget": "PR USA Widget v1 (Reservebar)"
|
|
176
|
-
},
|
|
177
|
-
"default_value": "__none",
|
|
178
|
-
"return_format": "value",
|
|
179
|
-
"multiple": 0,
|
|
180
|
-
"max": "",
|
|
181
|
-
"prepend": "",
|
|
182
|
-
"append": "",
|
|
183
|
-
"allow_null": 0,
|
|
184
|
-
"ui": 0,
|
|
185
|
-
"ajax": 0,
|
|
186
|
-
"placeholder": "",
|
|
187
|
-
"allow_custom": 0,
|
|
188
|
-
"search_placeholder": "",
|
|
189
|
-
"min": ""
|
|
190
|
-
},
|
|
191
155
|
{
|
|
192
156
|
"key": "field_68a45802662c2",
|
|
193
157
|
"label": "CTA Button Text",
|
|
@@ -741,62 +705,14 @@
|
|
|
741
705
|
"placeholder": "",
|
|
742
706
|
"prepend": "",
|
|
743
707
|
"append": ""
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
"key": "field_68a459fb96dcb",
|
|
747
|
-
"label": "Block padding",
|
|
748
|
-
"name": "",
|
|
749
|
-
"aria-label": "",
|
|
750
|
-
"type": "tab",
|
|
751
|
-
"instructions": "",
|
|
752
|
-
"required": 0,
|
|
753
|
-
"conditional_logic": 0,
|
|
754
|
-
"wrapper": {
|
|
755
|
-
"width": "",
|
|
756
|
-
"class": "",
|
|
757
|
-
"id": ""
|
|
758
|
-
},
|
|
759
|
-
"wpml_cf_preferences": 3,
|
|
760
|
-
"placement": "top",
|
|
761
|
-
"endpoint": 0,
|
|
762
|
-
"no_preference": 0,
|
|
763
|
-
"selected": 0
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
"key": "field_68a45a0696dcc",
|
|
767
|
-
"label": "Block padding fields",
|
|
768
|
-
"name": "block_padding_fields",
|
|
769
|
-
"aria-label": "",
|
|
770
|
-
"type": "clone",
|
|
771
|
-
"instructions": "",
|
|
772
|
-
"required": 0,
|
|
773
|
-
"conditional_logic": 0,
|
|
774
|
-
"wrapper": {
|
|
775
|
-
"width": "",
|
|
776
|
-
"class": "",
|
|
777
|
-
"id": ""
|
|
778
|
-
},
|
|
779
|
-
"wpml_cf_preferences": 3,
|
|
780
|
-
"clone": [
|
|
781
|
-
"group_638f4148bc10b"
|
|
782
|
-
],
|
|
783
|
-
"display": "seamless",
|
|
784
|
-
"layout": "block",
|
|
785
|
-
"prefix_label": 0,
|
|
786
|
-
"prefix_name": 0,
|
|
787
|
-
"acfe_seamless_style": 0,
|
|
788
|
-
"acfe_clone_modal": 0,
|
|
789
|
-
"acfe_clone_modal_close": 0,
|
|
790
|
-
"acfe_clone_modal_button": "",
|
|
791
|
-
"acfe_clone_modal_size": "large"
|
|
792
708
|
}
|
|
793
709
|
],
|
|
794
710
|
"location": [
|
|
795
711
|
[
|
|
796
712
|
{
|
|
797
|
-
"param": "
|
|
713
|
+
"param": "post_type",
|
|
798
714
|
"operator": "==",
|
|
799
|
-
"value": "
|
|
715
|
+
"value": "product"
|
|
800
716
|
}
|
|
801
717
|
]
|
|
802
718
|
],
|
|
@@ -817,5 +733,5 @@
|
|
|
817
733
|
"acfe_display_title": "",
|
|
818
734
|
"acfe_meta": "",
|
|
819
735
|
"acfe_note": "",
|
|
820
|
-
"modified":
|
|
736
|
+
"modified": 1755684289
|
|
821
737
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
acf_register_block_type(
|
|
4
|
-
array(
|
|
5
|
-
'name' => 'sticky-buy-cta-v3',
|
|
6
|
-
'title' => __( 'Sticky buy cta v3', 'Global-theme Admin' ),
|
|
7
|
-
'render_callback' => 'athena_block_render_post_object',
|
|
8
|
-
'category' => 'common',
|
|
9
|
-
'icon' => get_svg_icon_content('brick.svg'),
|
|
10
|
-
'keywords' => array('content', 'text' ),
|
|
11
|
-
'mode' => 'preview',
|
|
12
|
-
'supports' => array( 'align' => false, 'anchor' => true ),
|
|
13
|
-
)
|
|
14
|
-
);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@use 'Assets/scss/modules/library-modules/core-mixins-v3/core-mixins-v3';
|
|
2
|
-
@use 'Assets/scss/modules/library-modules/core-functions-v3/core-functions-v3';
|
|
3
|
-
@use 'Assets/scss/theme/breakpoints';
|
|
4
|
-
@use 'Assets/scss/blocks/sticky-buy-cta-v3/sticky-buy-cta-v3-extra';
|
|
5
|
-
.sticky-buy-cta-v3 {
|
|
6
|
-
pointer-events: all;
|
|
7
|
-
width: 100%;
|
|
8
|
-
position: fixed;
|
|
9
|
-
bottom: core-functions-v3.fluidSize(60);
|
|
10
|
-
|
|
11
|
-
@include core-mixins-v3.device(breakpoints.$tabPortrait) {
|
|
12
|
-
bottom: core-functions-v3.fluidSize(30);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@include sticky-buy-cta-v3-extra.additionalStyles();
|
|
16
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
{% set blockClassName = "sticky-buy-cta-v3" %}
|
|
3
|
-
{% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields: fields, block: block }, with_context = false) %}
|
|
4
|
-
{% set htmlEntryPoint = include('entry-points/entry-point-html-v3.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
|
|
5
|
-
{% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
|
|
6
|
-
{% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields: fields, block: block, is_preview }, with_context = false) %}
|
|
7
|
-
{% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
|
|
8
|
-
|
|
9
|
-
{% set sectionStyles = styleEntryPoint %}
|
|
10
|
-
|
|
11
|
-
{{previewEntryPoint}}
|
|
12
|
-
<style>
|
|
13
|
-
.{{blockClassName}}.{{block.id}}{
|
|
14
|
-
{{sectionStyles}}
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} {{block.id}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
|
|
18
|
-
|
|
19
|
-
{% if item.cta_style|ru matches '/^\\d+$/' %}
|
|
20
|
-
{% set ctaData = attribute(cta_styles['theme_cta_styles'], item.cta_style|ru - 1) %}
|
|
21
|
-
{% set enableCtaAnimation = ctaData.cta_settings.enable_cta_animation %}
|
|
22
|
-
{% set enableCtaIcon = ctaData.cta_settings.include_cta_icon %}
|
|
23
|
-
{% set ctaAnimationStyle = ctaData.cta_settings.cta_animation_style %}
|
|
24
|
-
{% endif %}
|
|
25
|
-
|
|
26
|
-
{% if fields.buy_now_cta is defined and fields.buy_now_cta|remove_underscore == 'prctb' %}
|
|
27
|
-
|
|
28
|
-
{% if fields.select_product.ID is defined and fields.select_product.ID is not empty %}
|
|
29
|
-
<div class="{{ blockClassName }}__cta-wrapper">
|
|
30
|
-
{% apply shortcodes %}
|
|
31
|
-
[clicktobuy class="{{ blockClassName }}__cta-button cmpl-cta-style-{{fields.cta_style}} cmpl-cta-animation-style-{{enableCtaAnimation ? fields.ctaAnimationStyle : '1'}} cream-hover has-shop shop-ctb" lang="{{ fields.buy_now_ctb.language }}" variant="{{ fields.select_product.ID }}" country="{{ fields.buy_now_ctb.country }}" customQueryString="{{ fields.buy_now_ctb.custom_query_string }}"]
|
|
32
|
-
<span class="cmpl-cta-span">{{ fields.cta_text }}</span>
|
|
33
|
-
[/clicktobuy]
|
|
34
|
-
{% endapply %}
|
|
35
|
-
</div>
|
|
36
|
-
{% endif %}
|
|
37
|
-
|
|
38
|
-
{% elseif fields.buy_now_cta is defined and fields.buy_now_cta|remove_underscore == 'shopify' %}
|
|
39
|
-
|
|
40
|
-
<div class="{{ blockClassName }}__cta-wrapper">
|
|
41
|
-
{% if fields.buy_now_shopify.pim is defined %}
|
|
42
|
-
{% set label = (fields.cta_button_text is defined and fields.cta_button_text|remove_underscore == 'pre-order')
|
|
43
|
-
? __( 'Pre-Order', 'The Glenlivet Theme' )
|
|
44
|
-
: __( 'Add To Cart', 'The Glenlivet Theme' )
|
|
45
|
-
%}
|
|
46
|
-
|
|
47
|
-
<div class="buy-now-wrapper shopify-integration has-shop shop-shopify has-price" data-pim="{{ fields.buy_now_shopify.pim }}" data-label="{{ label }}"
|
|
48
|
-
{% if fields.buy_now_price is defined and fields.buy_now_price is not empty %}
|
|
49
|
-
data-price="{{ fields.buy_now_price }} {{ fields.currency }}"
|
|
50
|
-
{% endif %}>
|
|
51
|
-
</div>
|
|
52
|
-
{% endif %}
|
|
53
|
-
|
|
54
|
-
{% if fields.buy_now_shopify.engraved_bottle == true and fields.buy_now_shopify.engraved_pim is not empty %}
|
|
55
|
-
|
|
56
|
-
<div class="buy-now-wrapper shopify-integration has-shop shop-shopify has-price engraved" data-pim="{{ fields.buy_now_shopify__engraved_pim }}" data-engraved="{{true}}" data-label="{{ __( 'Buy Engraved', 'The Glenlivet Theme' ) }}"
|
|
57
|
-
{% if fields.buy_now_shopify.engraved_price is defined and fields.buy_now_shopify.engraved_price is not empty %}
|
|
58
|
-
data-price="{{ fields.buy_now_shopify.engraved_price }} {{ fields.currency }}"
|
|
59
|
-
{% endif %}>
|
|
60
|
-
</div>
|
|
61
|
-
{% endif %}
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
{% elseif fields.buy_now_cta is defined and fields.buy_now_cta|remove_underscore == 'direct_link' %}
|
|
65
|
-
<div class="{{ blockClassName }}__cta-wrapper">
|
|
66
|
-
<a href={{ fields.direct_link_url }} class="{{ blockClassName }}__direct-link cmpl-cta-style-{{fields.cta_style}} cmpl-cta-animation-style-{{enableCtaAnimation ? fields.ctaAnimationStyle : '1'}}"
|
|
67
|
-
{% if fields.open_in_a_new_tab is defined and fields.open_in_a_new_tab|remove_underscore == 'true' %} target="_blank" {% endif %}>
|
|
68
|
-
<span class="cmpl-cta-span">{{ fields.cta_text }}</span>
|
|
69
|
-
</a>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
{% elseif gtp_language_code() == 'en-us' and fields.buy_now_cta|remove_underscore == 'pr_usa_reservebar' %}
|
|
73
|
-
<div class="{{ blockClassName }}__rb-wrapper">
|
|
74
|
-
<h3 class="{{ blockClassName }}__rb-title">{{ __( 'Enter delivery address to check online availability', 'The Glenlivet Theme' ) }}</h3>
|
|
75
|
-
<div liquid-address-typeahead></div>
|
|
76
|
-
<div liquid-id="GROUPING-{{ postObject.meta.pr_usa_reservebar_grouping_id }}">
|
|
77
|
-
<div class="{{ blockClassName }}__rb-fulfillment" liquid-fulfillment-method-selector></div>
|
|
78
|
-
<div class="{{ blockClassName }}__rb-button" liquid-atc onclick="liquidSDK.cart.toggle();"></div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
{% endif %}
|
|
82
|
-
|
|
83
|
-
{{htmlEntryPoint}}
|
|
84
|
-
</section>
|