zz-shopify-components 0.32.0 → 0.32.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.
- package/blocks/zz-flex-layout-bg-block.liquid +6 -0
- package/blocks/zz-flex-layout-block.liquid +37 -6
- package/blocks/zz-responsive-width-image.liquid +47 -0
- package/blocks/zz-scroll-animate-bg-text.liquid +30 -4
- package/blocks/zz-swiper-title-in-item.liquid +156 -0
- package/blocks/zz-video-preview-btn.liquid +192 -0
- package/blocks/zz-video-swiper-right.liquid +450 -0
- package/package.json +1 -1
- package/sections/zz-navigation-tab-v3.liquid +13 -5
- package/sections/zz-swiper-gallery-center.liquid +549 -0
- package/sections/zz-video-collapse-swiper.liquid +87 -37
- package/sections/zz-video-progress-swiper.liquid +625 -0
- package/sections/zz-video-tab-swiper.liquid +39 -11
- package/snippets/zz-img.liquid +8 -2
- package/snippets/zz-video.liquid +7 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
| reject: 'type', 'video'
|
|
3
3
|
%}
|
|
4
4
|
{% assign swiper_blocks = section.blocks | where: 'type', 'video' %}
|
|
5
|
+
{% assign block_size = swiper_blocks.size %}
|
|
5
6
|
{% assign video_loop = false %}
|
|
6
7
|
{% if section.settings.loop_swiper %}
|
|
7
8
|
{% assign video_loop = true %}
|
|
@@ -20,6 +21,15 @@
|
|
|
20
21
|
padding-top: {{ section.settings.pc_padding_top }}px;
|
|
21
22
|
padding-bottom: {{ section.settings.pc_padding_bottom }}px;
|
|
22
23
|
}
|
|
24
|
+
#shopify-section-{{ section.id }} .title-text-content {
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
{% if section.settings.is_left_right == true %}
|
|
27
|
+
flex-direction: row !important;
|
|
28
|
+
justify-content: space-between !important;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 25px;
|
|
31
|
+
{% endif %}
|
|
32
|
+
}
|
|
23
33
|
}
|
|
24
34
|
#shopify-section-{{ section.id }} .zz-video-tab-swiper {
|
|
25
35
|
width: 100%;
|
|
@@ -110,6 +120,7 @@
|
|
|
110
120
|
}
|
|
111
121
|
@media screen and (min-width: 1024px) {
|
|
112
122
|
#shopify-section-{{ section.id }} .zz-banner-tab-swiper {
|
|
123
|
+
overflow: visible;
|
|
113
124
|
width: 90vw;
|
|
114
125
|
}
|
|
115
126
|
#shopify-section-{{ section.id }} .zz-banner-tab-swiper .swiper-slide {
|
|
@@ -136,7 +147,7 @@
|
|
|
136
147
|
margin: 0;
|
|
137
148
|
white-space: nowrap;
|
|
138
149
|
width: auto;
|
|
139
|
-
padding: 0
|
|
150
|
+
padding: 0 12px;
|
|
140
151
|
height: 47px;
|
|
141
152
|
line-height: 47px;
|
|
142
153
|
border-radius: 0;
|
|
@@ -171,6 +182,9 @@
|
|
|
171
182
|
#shopify-section-{{ section.id }} .zz-banner-tab-swiper .swiper-pagination-bullets {
|
|
172
183
|
width: auto;
|
|
173
184
|
}
|
|
185
|
+
#shopify-section-{{ section.id }} .zz-banner-tab-swiper .swiper-pagination-bullets .swiper-pagination-bullet {
|
|
186
|
+
padding: 0 28px;
|
|
187
|
+
}
|
|
174
188
|
}
|
|
175
189
|
|
|
176
190
|
</style>
|
|
@@ -185,7 +199,7 @@
|
|
|
185
199
|
{% endif %}
|
|
186
200
|
{% if section.settings.module_name != blank %}data-zz-module-name="{{ section.settings.module_name }}"{% endif %}
|
|
187
201
|
>
|
|
188
|
-
<div class='fade-in-box tw-flex tw-flex-col tw-justify-center'>
|
|
202
|
+
<div class='title-text-content fade-in-box tw-flex tw-flex-col tw-justify-center lg:tw-w-[90vw] xl:tw-w-[1080px]'>
|
|
189
203
|
{% for block in non_collapsible_blocks %}
|
|
190
204
|
{% case block.type %}
|
|
191
205
|
{% when 'title' %}
|
|
@@ -193,15 +207,19 @@
|
|
|
193
207
|
title: block.settings.pc_title,
|
|
194
208
|
title_mb: block.settings.mb_title,
|
|
195
209
|
title_color: block.settings.text_color,
|
|
196
|
-
class_name: 'content-title tw-text-center'
|
|
210
|
+
class_name: 'tab-content-title tw-text-center'
|
|
197
211
|
%}
|
|
198
212
|
<style>
|
|
199
|
-
#shopify-section-{{section.id}} .content-title {
|
|
213
|
+
#shopify-section-{{section.id}} .tab-content-title {
|
|
200
214
|
margin-bottom: {{ block.settings.mobile_margin_bottom }}px;
|
|
201
215
|
}
|
|
202
216
|
@media screen and (min-width: 1024px) {
|
|
203
|
-
#shopify-section-{{section.id}} .content-title {
|
|
217
|
+
#shopify-section-{{section.id}} .tab-content-title {
|
|
204
218
|
margin-bottom: {{ block.settings.pc_margin_bottom }}px;
|
|
219
|
+
{% if section.settings.is_left_right == true %}
|
|
220
|
+
text-align: left !important;
|
|
221
|
+
font-size: 40px;
|
|
222
|
+
{% endif %}
|
|
205
223
|
}
|
|
206
224
|
}
|
|
207
225
|
</style>
|
|
@@ -210,15 +228,19 @@
|
|
|
210
228
|
text: block.settings.pc_text,
|
|
211
229
|
mb_text: block.settings.mb_text,
|
|
212
230
|
text_color: block.settings.text_color,
|
|
213
|
-
class_name: 'content-text tw-text-center'
|
|
231
|
+
class_name: 'tab-content-text tw-text-center'
|
|
214
232
|
%}
|
|
215
233
|
<style>
|
|
216
|
-
#shopify-section-{{section.id}} .content-text {
|
|
234
|
+
#shopify-section-{{section.id}} .tab-content-text {
|
|
217
235
|
margin-bottom: {{ block.settings.mobile_margin_bottom }}px;
|
|
218
236
|
}
|
|
219
237
|
@media screen and (min-width: 1024px) {
|
|
220
|
-
#shopify-section-{{section.id}} .content-text {
|
|
238
|
+
#shopify-section-{{section.id}} .tab-content-text {
|
|
221
239
|
margin-bottom: {{ block.settings.pc_margin_bottom }}px;
|
|
240
|
+
{% if section.settings.is_left_right == true %}
|
|
241
|
+
text-align: left !important;
|
|
242
|
+
flex: 1;
|
|
243
|
+
{% endif %}
|
|
222
244
|
}
|
|
223
245
|
}
|
|
224
246
|
</style>
|
|
@@ -228,7 +250,7 @@
|
|
|
228
250
|
|
|
229
251
|
<div class='zz-swiper-container'>
|
|
230
252
|
<div
|
|
231
|
-
class='swiper zz-banner-tab-swiper zz-banner-tab-swiper-{{ section.id }} lg:tw-w-[90vw] xl:tw-w-[
|
|
253
|
+
class='swiper zz-banner-tab-swiper zz-banner-tab-swiper-{{ section.id }} lg:tw-w-[90vw] xl:tw-w-[1080px]'
|
|
232
254
|
>
|
|
233
255
|
<div class='swiper-wrapper'>
|
|
234
256
|
{% for banner in swiper_blocks %}
|
|
@@ -307,7 +329,8 @@
|
|
|
307
329
|
clickable: true,
|
|
308
330
|
renderBullet: function (index, className) {
|
|
309
331
|
const title = slideTitles[index % slideTitles.length];
|
|
310
|
-
return
|
|
332
|
+
return `<span class="${className}"
|
|
333
|
+
{% if section.settings.module_id != blank %} data-track-zz-element="{{ section.settings.module_id }}_change" {% endif %}>${title}</span>`;
|
|
311
334
|
}
|
|
312
335
|
},
|
|
313
336
|
effect: 'fade',
|
|
@@ -520,7 +543,12 @@
|
|
|
520
543
|
"label": "mb Tab栏激活划线颜色",
|
|
521
544
|
"default": "#2B2B2A"
|
|
522
545
|
},
|
|
523
|
-
|
|
546
|
+
{
|
|
547
|
+
"type": "checkbox",
|
|
548
|
+
"id": "is_left_right",
|
|
549
|
+
"label": "标题与描述是否左右布局",
|
|
550
|
+
"default": false,
|
|
551
|
+
},
|
|
524
552
|
{
|
|
525
553
|
"type": "number",
|
|
526
554
|
"id": "pc_padding_top",
|
package/snippets/zz-img.liquid
CHANGED
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
widths: '1000, 1500, 2000, 3000, 4000, 5000',
|
|
30
30
|
loading: lazy_load,
|
|
31
31
|
sizes: '8000px',
|
|
32
|
-
fetchpriority:"high"
|
|
32
|
+
fetchpriority:"high",
|
|
33
|
+
data-zz-modal-target: modal_target,
|
|
34
|
+
data-zz-module-target: module_target,
|
|
35
|
+
data-track-zz-element: id
|
|
33
36
|
}}
|
|
34
37
|
{%- endif -%}
|
|
35
38
|
{%- if mb_image -%}
|
|
@@ -42,6 +45,9 @@
|
|
|
42
45
|
widths: '400, 800, 1200, 1500',
|
|
43
46
|
loading: lazy_load,
|
|
44
47
|
sizes: '1500px',
|
|
45
|
-
fetchpriority:"high"
|
|
48
|
+
fetchpriority:"high",
|
|
49
|
+
data-zz-modal-target: modal_target,
|
|
50
|
+
data-zz-module-target: module_target,
|
|
51
|
+
data-track-zz-element: id
|
|
46
52
|
}}
|
|
47
53
|
{%- endif -%}
|
package/snippets/zz-video.liquid
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
loop: 是否循环播放
|
|
12
12
|
muted: 是否静音
|
|
13
13
|
separate_display: 区分显示pc还是mb, true时 没有配置PC与mb将不会显示。不会使用PC的配置来配置mb
|
|
14
|
+
module_id: module_id
|
|
14
15
|
{% endcomment %}
|
|
15
16
|
|
|
16
17
|
{% if separate_display == true %}
|
|
@@ -49,6 +50,9 @@
|
|
|
49
50
|
{% if controls %}
|
|
50
51
|
controls
|
|
51
52
|
{% endif %}
|
|
53
|
+
{% if module_id %}
|
|
54
|
+
data-track-zz-video='{{ module_id }}'
|
|
55
|
+
{% endif %}
|
|
52
56
|
{% if lazy %}
|
|
53
57
|
data-poster='{{video_poster | default: ''}}'
|
|
54
58
|
{% else %}
|
|
@@ -94,6 +98,9 @@
|
|
|
94
98
|
{% if loop %}
|
|
95
99
|
loop
|
|
96
100
|
{% endif %}
|
|
101
|
+
{% if module_id %}
|
|
102
|
+
data-track-zz-video='{{ module_id }}'
|
|
103
|
+
{% endif %}
|
|
97
104
|
{% if muted %}
|
|
98
105
|
muted
|
|
99
106
|
{% endif %}
|