zz-shopify-components 0.27.0 → 0.28.1-beta.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.
|
@@ -56,9 +56,13 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
<a
|
|
58
58
|
{% if block.settings.btn_id != blank %}data-track-zz-element="{{ block.settings.btn_id }}"{% endif %}
|
|
59
|
-
class='tw-block {{ btn_class }} tw-mx-auto tw-mt-[30px] tw-px-[28px] lg:tw-px-[12px] tw-w-fit tw-h-[42px] lg:tw-h-[28px] tw-rounded-[3px] tw-cursor-pointer tw-text-white tw-font-medium tw-text-[16px] lg:tw-text-[14px] tw-leading-[42px] lg:tw-leading-[28px] tw-bg-black tw-transition hover:tw-bg-black/80'
|
|
59
|
+
class='tw-block tw-cursor-pointer {{ btn_class }} tw-mx-auto tw-mt-[30px] tw-px-[28px] lg:tw-px-[12px] tw-w-fit tw-h-[42px] lg:tw-h-[28px] tw-rounded-[3px] tw-cursor-pointer tw-text-white tw-font-medium tw-text-[16px] lg:tw-text-[14px] tw-leading-[42px] lg:tw-leading-[28px] tw-bg-black tw-transition hover:tw-bg-black/80'
|
|
60
60
|
style='background: {{ block.settings.btn_bg_color }}; color: {{ block.settings.btn_text_color }};hover: color: {{ block.settings.btn_hover_color }};'
|
|
61
|
-
|
|
61
|
+
{% if block.settings.function_type == 'link' and block.settings.url != blank %}
|
|
62
|
+
href="{{ block.settings.url }}"
|
|
63
|
+
{% else %}
|
|
64
|
+
href="javascript:void(0);"
|
|
65
|
+
{% endif %}
|
|
62
66
|
>
|
|
63
67
|
{{ block.settings.btn_text }}
|
|
64
68
|
</a>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
%}
|
|
25
25
|
<div class="tw-absolute lg:tw-bottom-[35px] tw-left-[24px] tw-right-[24px] tw-bottom-[16px] lg:tw-left-[30px] lg:tw-right-[30px]">
|
|
26
26
|
<div class="tw-w-full">
|
|
27
|
-
<p class="tw-font-bold tw-text-[
|
|
27
|
+
<p class="tw-font-bold tw-text-[16px] lg:tw-text-[24px] tw-leading-1 tw-text-white">{{ block.settings.heading }}</p>
|
|
28
28
|
{% if block.settings.price_type == 'hand' %}
|
|
29
29
|
<p class='tw-font-bold tw-text-left tw-italic tw-leading-[1.2] tw-text-[28px] lg:tw-text-[40px] tw-text-white'>
|
|
30
30
|
{{ block.settings.price | times: 100 | money_without_trailing_zeros }}
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
SAVE {{ discount_value | money_without_trailing_zeros }}
|
|
53
53
|
</span>
|
|
54
54
|
{% else %}
|
|
55
|
-
<span class='tw-
|
|
56
|
-
|
|
55
|
+
<span class='tw-border-white tw-text-white tw-ml-[8px] tw-border-[1px] tw-py-[4px] tw-pr-[6px] tw-pl-[6px] tw-text-[10px] lg:tw-text-[14px] tw-leading-[1.3] tw-border-solid tw-rounded-[4px]'>
|
|
56
|
+
SAVE {{ discount_value | money_without_trailing_zeros }}
|
|
57
57
|
</span>
|
|
58
58
|
{% endif %}
|
|
59
59
|
</div>
|
package/package.json
CHANGED
|
@@ -33,6 +33,16 @@
|
|
|
33
33
|
"label": "可折叠文字颜色",
|
|
34
34
|
"default": "#B2B2B2"
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"type": "select",
|
|
38
|
+
"id": "pc_video_position",
|
|
39
|
+
"label": "PC端视频位置",
|
|
40
|
+
"options": [
|
|
41
|
+
{ "value": "left", "label": "Left" },
|
|
42
|
+
{ "value": "right", "label": "Right" },
|
|
43
|
+
],
|
|
44
|
+
"default": "left"
|
|
45
|
+
},
|
|
36
46
|
{
|
|
37
47
|
"type": "select",
|
|
38
48
|
"id": "mobile_style",
|
|
@@ -294,7 +304,7 @@
|
|
|
294
304
|
</div>
|
|
295
305
|
{% comment %} PC端布局 {% endcomment %}
|
|
296
306
|
<div class="max-lg:tw-hidden tw-w-[90vw] xl:tw-w-[1220px] tw-mx-auto">
|
|
297
|
-
<div class="collaspse-div
|
|
307
|
+
<div class="collaspse-div tw-w-full tw-flex tw-items-center tw-justify-between {% if section.settings.pc_video_position == 'right' %}tw-flex-row-reverse{% endif %}">
|
|
298
308
|
<div class="tw-w-[68%]">
|
|
299
309
|
{% assign swiper_blocks = section.blocks | where: 'type', 'collapsible_row' %}
|
|
300
310
|
{% for collapsible_row in swiper_blocks %}
|
|
@@ -305,7 +315,7 @@
|
|
|
305
315
|
pc_video: collapsible_row.settings.video_pc,
|
|
306
316
|
pc_poster: collapsible_row.settings.poster_pc,
|
|
307
317
|
lazy: true,
|
|
308
|
-
class: 'tw-w-full tw-h-
|
|
318
|
+
class: 'tw-w-full tw-h-full tw-rounded-[16px] ',
|
|
309
319
|
autoplay: true,
|
|
310
320
|
loop: true,
|
|
311
321
|
muted: true,
|
|
@@ -316,7 +326,7 @@
|
|
|
316
326
|
{% render 'zz-img',
|
|
317
327
|
pc_image: collapsible_row.settings.poster_pc,
|
|
318
328
|
image_alt: collapsible_row.settings.heading | escape,
|
|
319
|
-
class_name: 'ratio-image',
|
|
329
|
+
class_name: 'ratio-image tw-w-full tw-h-full',
|
|
320
330
|
%}
|
|
321
331
|
{% endif %}
|
|
322
332
|
{% endif %}
|
|
@@ -360,7 +370,7 @@
|
|
|
360
370
|
mb_video: collapsible_row.settings.video_mb,
|
|
361
371
|
mb_poster: collapsible_row.settings.poster_mb,
|
|
362
372
|
lazy: true,
|
|
363
|
-
class: 'image-video-box tw-w-full tw-h-
|
|
373
|
+
class: 'image-video-box tw-w-full tw-h-full ',
|
|
364
374
|
autoplay: true,
|
|
365
375
|
loop: true,
|
|
366
376
|
muted: true,
|
|
@@ -371,7 +381,7 @@
|
|
|
371
381
|
render 'zz-img',
|
|
372
382
|
mb_image: collapsible_row.settings.poster_mb,
|
|
373
383
|
image_alt: collapsible_row.settings.heading | escape,
|
|
374
|
-
class_name: 'image-video-box',
|
|
384
|
+
class_name: 'image-video-box tw-w-full tw-h-full',
|
|
375
385
|
%}
|
|
376
386
|
{% endif %}
|
|
377
387
|
</div>
|
|
@@ -498,6 +508,10 @@
|
|
|
498
508
|
padding-bottom: 40px;
|
|
499
509
|
{% endif %}
|
|
500
510
|
|
|
511
|
+
}
|
|
512
|
+
#shopify-section-{{section.id}} .media-box {
|
|
513
|
+
aspect-ratio: 335 / 252;
|
|
514
|
+
|
|
501
515
|
}
|
|
502
516
|
|
|
503
517
|
#shopify-section-{{section.id}} .swiper-button-next,
|
|
@@ -587,6 +601,10 @@
|
|
|
587
601
|
padding-top: {{ section.settings.pc_padding_top }}px;
|
|
588
602
|
padding-bottom: {{ section.settings.pc_padding_bottom }}px;
|
|
589
603
|
}
|
|
604
|
+
#shopify-section-{{section.id}} .collasps-video-box {
|
|
605
|
+
aspect-ratio: 16 / 9;
|
|
606
|
+
|
|
607
|
+
}
|
|
590
608
|
}
|
|
591
609
|
</style>
|
|
592
610
|
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
{% endschema %}
|
|
133
133
|
|
|
134
134
|
<div class='user-spokes-section lg:tw-w-[85.3906vw] xl:tw-w-[1093px] lg:tw-mx-auto'>
|
|
135
|
-
<div class='max-lg:tw-px-[20px] tw-flex lg:tw-justify-between max-lg:tw-overflow-x-auto tw-gap-[20px] slow-reveal'>
|
|
135
|
+
<div class='max-lg:tw-px-[20px] tw-flex lg:tw-justify-between max-lg:tw-overflow-x-auto tw-gap-[8px] lg:tw-gap-[20px] slow-reveal'>
|
|
136
136
|
{% for block in section.blocks %}
|
|
137
137
|
<div class='comment-box lg:tw-w-[351px] tw-flex tw-flex-col'>
|
|
138
138
|
<div class='comment-item lg:tw-w-[351px] lg:tw-h-[468px]'>
|
|
@@ -13,7 +13,18 @@
|
|
|
13
13
|
{% endif %}
|
|
14
14
|
{% endif %}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
{% assign is_available = true %}
|
|
17
|
+
{% if product.selected_or_first_available_variant.available == false %}
|
|
18
|
+
{% assign is_available = false %}
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% comment %} btn Text {% endcomment %}
|
|
21
|
+
{% if is_available %}
|
|
22
|
+
{% assign btn_text = btn %}
|
|
23
|
+
{% else %}
|
|
24
|
+
{% assign btn_text = btn_out_of_stock | default: 'OUT OF STOCK' %}
|
|
25
|
+
{% endif %}
|
|
26
|
+
|
|
27
|
+
<button {% unless is_available %}disabled{% endunless %} class='tw-flex tw-items-center tw-justify-center tw-text-white tw-border-none tw-h-full tw-px-6 tw-py-4 tw-bg-[#FC6C0F] tw-rounded-full tw-font-semibold tw-text-[16px] {{ button_class }}'>
|
|
17
28
|
<span
|
|
18
29
|
class='buy-loading tw-hidden tw-daisy-loading tw-daisy-loading-spinner '
|
|
19
30
|
></span>
|
|
@@ -21,7 +32,7 @@
|
|
|
21
32
|
{% if is_edu_product %}
|
|
22
33
|
{% if is_logged_in %}
|
|
23
34
|
{% if is_edu_verified %}
|
|
24
|
-
{{
|
|
35
|
+
{{ btn_text }}
|
|
25
36
|
{% else %}
|
|
26
37
|
{{ bar_btn_edu_not_verified }}
|
|
27
38
|
{% endif %}
|
|
@@ -29,7 +40,7 @@
|
|
|
29
40
|
{{ bar_btn_edu_not_logged_in }}
|
|
30
41
|
{% endif %}
|
|
31
42
|
{% else %}
|
|
32
|
-
{{
|
|
43
|
+
{{ btn_text }}
|
|
33
44
|
{% endif %}
|
|
34
45
|
</span>
|
|
35
46
|
</button>
|