zz-shopify-components 0.29.1-beta.0 → 0.29.1-beta.2

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.
@@ -1,200 +1,383 @@
1
1
  {% assign block_size = block.blocks.size %}
2
2
 
3
3
  <style>
4
- #shopify-block-{{block.id}} {
5
- background: {{ block.settings.bg_color }};
6
- width: 100%;
7
- box-sizing: border-box;
8
- overflow: hidden;
9
- position: relative;
10
- --zz-autoplay-delay: {{ block.settings.autoplay_delay | default: 4000 }}ms;
11
- --zz-pagination-offset-y: {{ block.settings.pagination_offset_y | default: 0 }}px;
12
- }
13
- #shopify-block-{{block.id}} .zz-normal-swiper {
14
- box-sizing: border-box;
15
- overflow: hidden;
16
- position: relative;
17
- letter-spacing: 0;
18
- padding-bottom: 48px;
19
- }
20
- {% if block.settings.right_to_edge == true %}
21
- @media (min-width: 1280px) {
22
- #shopify-block-{{block.id}} .zz-normal-swiper {
23
- padding: 0 calc((100% - {{ block.settings.pc_xl_width }}px) / 2);
4
+ #shopify-block-{{block.id}} {
5
+ background: {{ block.settings.bg_color }};
6
+ width: 100%;
7
+ box-sizing: border-box;
8
+ overflow: hidden;
9
+ position: relative;
10
+ --zz-autoplay-delay: {{ block.settings.autoplay_delay | default: 4000 }}ms;
11
+ --zz-pagination-offset-y: {{ block.settings.pagination_offset_y | default: 0 }}px;
24
12
  }
25
- }
26
-
27
- @media (min-width: 1024px) and (max-width: 1279px) {
28
13
  #shopify-block-{{block.id}} .zz-normal-swiper {
29
- padding: 0 calc((100% - {{ block.settings.pc_lg_width }}vw) / 2);
14
+ box-sizing: border-box;
15
+ overflow: hidden;
16
+ position: relative;
17
+ letter-spacing: 0;
18
+ padding-bottom: 48px;
30
19
  }
31
- }
32
- @media (max-width: 1024px) {
33
- #shopify-block-{{block.id}} .zz-normal-swiper {
34
- padding-left: 20px;
20
+ {% if block.settings.right_to_edge == true %}
21
+ @media (min-width: 1280px) {
22
+ #shopify-block-{{block.id}} .zz-normal-swiper {
23
+ padding: 0 calc((100% - {{ block.settings.pc_xl_width }}px) / 2);
24
+ }
35
25
  }
36
- }
37
-
38
- {% endif %}
39
- #shopify-block-{{block.id}} {
40
- width: 100%;
41
- }
42
-
43
- #shopify-block-{{block.id}} .swiper-button-next:after,
44
- #shopify-block-{{block.id}} .swiper-button-prev:after {
45
- display: none;
46
- }
47
26
 
48
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullets {
49
- bottom: calc(16px + var(--zz-pagination-offset-y));
50
- }
51
- {% if block.settings.pagination_type == 'segments' %}
52
- /* Segments pagination (mobile defaults) */
53
- #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments {
54
- bottom: calc(16px + var(--zz-pagination-offset-y));
55
- --seg-width: 24px;
56
- --seg-active-width: 60px;
57
- --seg-height: 4px;
58
- --seg-gap: 2px;
59
- --seg-bg: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.3 }};
60
- }
61
- #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet {
62
- margin: 0 var(--seg-gap);
63
- width: var(--seg-width);
64
- height: var(--seg-height);
65
- border-radius: var(--seg-height);
66
- background: var(--seg-bg);
67
- opacity: 1;
68
- transition: width .3s ease, background-color .3s ease;
69
- }
70
- #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet-active {
71
- width: var(--seg-active-width);
72
- position: relative;
73
- overflow: hidden;
74
- }
75
- #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet-active::after {
76
- content: '';
77
- position: absolute;
78
- left: 0; top: 0; bottom: 0;
79
- width: 0%;
80
- background: #000;
81
- {% if block.settings.autoplay %}
82
- animation: zz-pb-{{block.id}} var(--zz-autoplay-delay) linear forwards;
27
+ @media (min-width: 1024px) and (max-width: 1279px) {
28
+ #shopify-block-{{block.id}} .zz-normal-swiper {
29
+ padding: 0 calc((100% - {{ block.settings.pc_lg_width }}vw) / 2);
30
+ }
31
+ }
32
+ @media (max-width: 1024px) {
33
+ #shopify-block-{{block.id}} .zz-normal-swiper {
34
+ padding-left: 20px;
35
+ }
36
+ }
37
+ @media (max-width: 1024px) {
38
+ .zz-fraction-inline-controls .swiper-button-next,
39
+ .zz-fraction-inline-controls .swiper-button-prev {
40
+ width: 36px !important;
41
+ height: 36px !important;
42
+ }
43
+ }
83
44
  {% endif %}
84
- }
85
- @keyframes zz-pb-{{block.id}} {
86
- from { width: 0%; }
87
- to { width: 100%; }
88
- }
89
- {% endif %}
90
- /* Ensure progressbar pagination is visible and colored */
91
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar,
92
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
93
- height: 4px;
94
- }
95
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar {
96
- background: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.15 }};
97
- }
98
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
99
- background: {{ block.settings.mb_pagination_color }};
100
- }
101
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet {
102
- margin: 0 4px;
103
- width: 6px;
104
- height: 6px;
105
- border-radius: 6px;
106
- background: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.3 }};
107
- opacity: 1;
108
- transition: 0.3s;
109
- }
110
- #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet-active {
111
- background: {{ block.settings.mb_pagination_color }};
112
- }
45
+ #shopify-block-{{block.id}} {
46
+ width: 100%;
47
+ }
48
+
49
+ #shopify-block-{{block.id}} .swiper-button-next:after,
50
+ #shopify-block-{{block.id}} .swiper-button-prev:after {
51
+ display: none;
52
+ }
113
53
 
114
- @media screen and (min-width: 1024px) {
115
54
  #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullets {
116
- bottom: calc(24px + var(--zz-pagination-offset-y));
55
+ bottom: calc(16px + var(--zz-pagination-offset-y));
117
56
  }
118
57
  {% if block.settings.pagination_type == 'segments' %}
119
- /* Segments pagination (desktop overrides) */
58
+ /* Segments pagination (mobile defaults) */
120
59
  #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments {
121
- bottom: calc(24px + var(--zz-pagination-offset-y));
122
- --seg-width: 48px;
123
- --seg-active-width: 120px;
124
- --seg-height: 6px;
125
- --seg-gap: 4px;
126
- --seg-bg: {{ block.settings.pagination_color | color_modify: 'alpha', 0.3 }};
60
+ bottom: calc(16px + var(--zz-pagination-offset-y));
61
+ --seg-width: 24px;
62
+ --seg-active-width: 60px;
63
+ --seg-height: 4px;
64
+ --seg-gap: 2px;
65
+ --seg-bg: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.3 }};
66
+ }
67
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet {
68
+ margin: 0 var(--seg-gap);
69
+ width: var(--seg-width);
70
+ height: var(--seg-height);
71
+ border-radius: var(--seg-height);
72
+ background: var(--seg-bg);
73
+ opacity: 1;
74
+ transition: width .3s ease, background-color .3s ease;
75
+ }
76
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet-active {
77
+ width: var(--seg-active-width);
78
+ position: relative;
79
+ overflow: hidden;
80
+ }
81
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet-active::after {
82
+ content: '';
83
+ position: absolute;
84
+ left: 0; top: 0; bottom: 0;
85
+ width: 0%;
86
+ background: #000;
87
+ {% if block.settings.autoplay %}
88
+ animation: zz-pb-{{block.id}} var(--zz-autoplay-delay) linear forwards;
89
+ {% endif %}
90
+ }
91
+ @keyframes zz-pb-{{block.id}} {
92
+ from { width: 0%; }
93
+ to { width: 100%; }
127
94
  }
128
95
  {% endif %}
96
+ /* Ensure progressbar pagination is visible and colored */
97
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar,
98
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
99
+ height: 4px;
100
+ }
129
101
  #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar {
130
- background: {{ block.settings.pagination_color | color_modify: 'alpha', 0.15 }};
102
+ background: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.15 }};
131
103
  }
132
104
  #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
133
- background: {{ block.settings.pagination_color }};
105
+ background: {{ block.settings.mb_pagination_color }};
134
106
  }
135
107
  #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet {
136
- margin: 0 6px;
137
- width: 10px;
138
- height: 10px;
139
- border-radius: 10px;
140
- background: {{ block.settings.pagination_color | color_modify: 'alpha', 0.3 }};
108
+ margin: 0 4px;
109
+ width: 6px;
110
+ height: 6px;
111
+ border-radius: 6px;
112
+ background: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.3 }};
113
+ opacity: 1;
114
+ transition: 0.3s;
141
115
  }
142
116
  #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet-active {
143
- background: {{ block.settings.pagination_color }};
144
- }
145
- #shopify-block-{{block.id}} .swiper-button-next,
146
- #shopify-block-{{block.id}} .swiper-button-prev {
147
- width: 48px;
148
- height: 48px;
149
- top: 50%;
150
- transform: translateY(-50%);
151
- }
152
- #shopify-block-{{block.id}} .swiper-button-prev { left: 16px; }
153
- #shopify-block-{{block.id}} .swiper-button-next { right: 16px; }
154
- }
155
- /* Reset segments progress animation when slide changes */
156
- #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet::after {
157
- width: 0%;
158
- }
117
+ background: {{ block.settings.mb_pagination_color }};
118
+ }
119
+ {% if block.settings.scale_active_slide %}
120
+ #shopify-block-{{block.id}} {
121
+ overflow: visible;
122
+ }
123
+ #shopify-block-{{block.id}} .zz-normal-swiper {
124
+ overflow: visible;
125
+ }
126
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-wrapper {
127
+ overflow: visible;
128
+ }
129
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-slide {
130
+ padding: calc({{ block.settings.space_between | default: 8 }}px / 2 + 6px);
131
+ box-sizing: border-box;
132
+ }
133
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-slide-scale-target {
134
+ height: 100%;
135
+ transition: transform 0.35s ease;
136
+ will-change: transform;
137
+ transform-origin: center;
138
+ }
139
+
140
+ @media screen and (min-width: 1024px) {
141
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-slide.swiper-slide-active .zz-slide-scale-target,
142
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-slide.swiper-slide-duplicate-active .zz-slide-scale-target {
143
+ transform: scale(1.1);
144
+ }
145
+ }
159
146
 
160
- @media screen and (max-width: 1023px) {
161
- {% if block.settings.show_navigation_mobile == false %}
162
- #shopify-block-{{block.id}} .swiper-button-next,
163
- #shopify-block-{{block.id}} .swiper-button-prev { display: none; }
164
147
  {% endif %}
165
- }
148
+ {% if block.settings.pagination_type == 'fraction' %}
149
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls {
150
+ display: flex;
151
+ align-items: center;
152
+ justify-content: center;
153
+ gap: 20px;
154
+ padding-top: {{ block.settings.pagination_offset_y | default: 16 }}px;
155
+ --zz-fraction-color-current: {{ block.settings.mb_pagination_color }};
156
+ --zz-fraction-color-total: {{ block.settings.mb_pagination_color | color_modify: 'alpha', 0.45 }};
157
+ --zz-fraction-font-size: 14px;
158
+ --zz-fraction-slash-spacing: 4px;
159
+ }
160
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination {
161
+ position: static;
162
+ bottom: auto;
163
+ transform: none;
164
+ margin: 0;
165
+ }
166
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction {
167
+ display: inline-flex;
168
+ align-items: baseline;
169
+ width: auto;
170
+ justify-content: center;
171
+ font-size: 0;
172
+ letter-spacing: 0;
173
+ white-space: nowrap;
174
+ }
175
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-current,
176
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-total {
177
+ font-size: var(--zz-fraction-font-size);
178
+ width: 20px;
179
+ line-height: 1.1;
180
+ }
181
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-current {
182
+ text-align: right;
183
+ display: inline-block;
184
+ width: 40px;
185
+ }
186
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-current {
187
+ font-weight: 600;
188
+ color: var(--zz-fraction-color-current);
189
+ }
190
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-current::after {
191
+ content: '/';
192
+ display: inline-block;
193
+ margin: 0 var(--zz-fraction-slash-spacing);
194
+ font-weight: 500;
195
+ color: var(--zz-fraction-color-total);
196
+ }
197
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-total {
198
+ font-weight: 500;
199
+ color: var(--zz-fraction-color-total);
200
+ }
201
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-button-next,
202
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-button-prev {
203
+ position: static;
204
+ top: auto;
205
+ left: auto;
206
+ right: auto;
207
+ transform: none;
208
+ margin: 0;
209
+ }
210
+ {% endif %}
211
+
212
+ @media screen and (min-width: 1024px) {
213
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullets {
214
+ bottom: calc(24px + var(--zz-pagination-offset-y));
215
+ }
216
+ {% if block.settings.pagination_type == 'segments' %}
217
+ /* Segments pagination (desktop overrides) */
218
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments {
219
+ bottom: calc(24px + var(--zz-pagination-offset-y));
220
+ --seg-width: 48px;
221
+ --seg-active-width: 120px;
222
+ --seg-height: 6px;
223
+ --seg-gap: 4px;
224
+ --seg-bg: {{ block.settings.pagination_color | color_modify: 'alpha', 0.3 }};
225
+ }
226
+ {% endif %}
227
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar {
228
+ background: {{ block.settings.pagination_color | color_modify: 'alpha', 0.15 }};
229
+ }
230
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
231
+ background: {{ block.settings.pagination_color }};
232
+ }
233
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet {
234
+ margin: 0 6px;
235
+ width: 10px;
236
+ height: 10px;
237
+ border-radius: 10px;
238
+ background: {{ block.settings.pagination_color | color_modify: 'alpha', 0.3 }};
239
+ }
240
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-pagination-bullet-active {
241
+ background: {{ block.settings.pagination_color }};
242
+ }
243
+ #shopify-block-{{block.id}} .swiper-button-next,
244
+ #shopify-block-{{block.id}} .swiper-button-prev {
245
+ width: 48px;
246
+ height: 48px;
247
+ top: 50%;
248
+ transform: translateY(-50%);
249
+ }
250
+ #shopify-block-{{block.id}} .swiper-button-prev { left: 16px; }
251
+ #shopify-block-{{block.id}} .swiper-button-next { right: 16px; }
252
+ {% if block.settings.pagination_type == 'fraction' %}
253
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls {
254
+ --zz-fraction-color-current: {{ block.settings.pagination_color }};
255
+ --zz-fraction-color-total: {{ block.settings.pagination_color | color_modify: 'alpha', 0.45 }};
256
+ --zz-fraction-font-size: 14px;
257
+ --zz-fraction-slash-spacing: 8px;
258
+ }
259
+ {% endif %}
260
+ }
261
+ /* Reset segments progress animation when slide changes */
262
+ #shopify-block-{{block.id}} .zz-normal-swiper .zz-pagination-segments .swiper-pagination-bullet::after {
263
+ width: 0%;
264
+ }
265
+
266
+ {% if block.settings.slides_per_view_pc == 0 %}
267
+ @media screen and (min-width: 1024px) {
268
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-slide {
269
+ width: auto;
270
+ }
271
+ }
272
+ {% endif %}
273
+ {% if block.settings.slides_per_view_mb == 0 %}
274
+ @media screen and (max-width: 1023px) {
275
+ #shopify-block-{{block.id}} .zz-normal-swiper .swiper-slide {
276
+ width: auto;
277
+ }
278
+ }
279
+ {% endif %}
280
+ @media screen and (max-width: 1023px) {
281
+ #shopify-block-{{block.id}} .zz-fraction-inline-controls .swiper-pagination-fraction .swiper-pagination-current {
282
+ width: 30px;
283
+ }
284
+ {% if block.settings.show_navigation_mobile == false %}
285
+ #shopify-block-{{block.id}} .swiper-button-next,
286
+ #shopify-block-{{block.id}} .swiper-button-prev { display: none; }
287
+ {% endif %}
288
+ }
166
289
  </style>
167
290
 
168
291
  <div
169
292
  class='zz-normal-swiper swiper zz-normal-swiper-{{ block.id }}'
170
293
  >
171
294
  <div class='zz-swiper-wrapper swiper-wrapper tw-invisible'>
172
- {% for block in block.blocks %}
295
+ {% for slide_block in block.blocks %}
173
296
  <div class='swiper-slide'>
174
- {% render block %}
297
+ {% if block.settings.scale_active_slide %}
298
+ <div class='zz-slide-scale-target'>
299
+ {% render slide_block %}
300
+ </div>
301
+ {% else %}
302
+ {% render slide_block %}
303
+ {% endif %}
175
304
  </div>
176
305
  {% endfor %}
177
306
  </div>
178
307
 
179
- {% if block.settings.show_navigation %}
180
- <div class='swiper-button-prev {% if block_size <= 1 %} tw-hidden {% endif %}'>
181
- {% render 'zz-prev-next-btn',
182
- type: 'prev',
183
- color_type: block.settings.prev_next_type
184
- %}
185
- </div>
186
- <div class='swiper-button-next {% if block_size <= 1 %} tw-hidden {% endif %}'>
187
- {% render 'zz-prev-next-btn',
188
- type: 'next',
189
- color_type: block.settings.prev_next_type
190
- %}
308
+ {% if block.settings.pagination_type == 'fraction' %}
309
+ <div class='zz-fraction-inline-controls'>
310
+ {% if block.settings.show_navigation %}
311
+ <div class='swiper-button-prev {% if block_size <= 1 %} tw-hidden {% endif %}'>
312
+ {% if block.settings.navigation_style == 'normal' %}
313
+ {% render 'zz-prev-next-btn',
314
+ type: 'prev',
315
+ color_type: block.settings.prev_next_type
316
+ %}
317
+ {% else %}
318
+ {% render 'zz-prev-next-blur-icon',
319
+ type: 'prev',
320
+ color_type: block.settings.prev_next_type
321
+ %}
322
+ {% endif %}
323
+ </div>
324
+ {% endif %}
325
+
326
+ {% if block.settings.pagination_type != 'none' %}
327
+ <div class='swiper-pagination'></div>
328
+ {% endif %}
329
+
330
+ {% if block.settings.show_navigation %}
331
+ <div class='swiper-button-next {% if block_size <= 1 %} tw-hidden {% endif %}'>
332
+ {% if block.settings.navigation_style == 'normal' %}
333
+ {% render 'zz-prev-next-btn',
334
+ type: 'next',
335
+ color_type: block.settings.prev_next_type
336
+ %}
337
+ {% else %}
338
+ {% render 'zz-prev-next-blur-icon',
339
+ type: 'next',
340
+ color_type: block.settings.prev_next_type
341
+ %}
342
+ {% endif %}
343
+ </div>
344
+ {% endif %}
191
345
  </div>
192
- {% endif %}
346
+ {% else %}
347
+ {% if block.settings.show_navigation %}
348
+ <div class='swiper-button-prev {% if block_size <= 1 %} tw-hidden {% endif %}'>
349
+ {% if block.settings.navigation_style == 'normal' %}
350
+ {% render 'zz-prev-next-btn',
351
+ type: 'prev',
352
+ color_type: block.settings.prev_next_type
353
+ %}
354
+ {% else %}
355
+ {% render 'zz-prev-next-blur-icon',
356
+ type: 'prev',
357
+ color_type: block.settings.prev_next_type
358
+ %}
359
+ {% endif %}
360
+ </div>
361
+ <div class='swiper-button-next {% if block_size <= 1 %} tw-hidden {% endif %}'>
362
+ {% if block.settings.navigation_style == 'normal' %}
363
+ {% render 'zz-prev-next-btn',
364
+ type: 'next',
365
+ color_type: block.settings.prev_next_type
366
+ %}
367
+ {% else %}
368
+ {% render 'zz-prev-next-blur-icon',
369
+ type: 'next',
370
+ color_type: block.settings.prev_next_type
371
+ %}
372
+ {% endif %}
373
+ </div>
374
+ {% endif %}
193
375
 
194
- {% if block.settings.pagination_type != 'none' %}
195
- <div
196
- class='swiper-pagination {% if block.settings.pagination_type == "segments" %} zz-pagination-segments {% endif %}'
197
- ></div>
376
+ {% if block.settings.pagination_type != 'none' %}
377
+ <div
378
+ class='swiper-pagination {% if block.settings.pagination_type == "segments" %} zz-pagination-segments {% endif %}'
379
+ ></div>
380
+ {% endif %}
198
381
  {% endif %}
199
382
  </div>
200
383
 
@@ -210,16 +393,13 @@
210
393
  let instance = null;
211
394
  let initialized = false;
212
395
 
213
- const isDesktop = window.innerWidth > 1023;
214
- const spaceBetween = isDesktop ? {{ block.settings.space_between | default: 8 }} : {{ block.settings.space_between_mb | default: 8 }};
215
-
216
396
  const options = {
217
397
  loop: {{ block.settings.loop | json }},
218
398
  speed: {{ block.settings.speed | default: 500 }},
219
399
  autoHeight: {{ block.settings.auto_height | json }},
220
400
  centeredSlides: {{ block.settings.centered_slides | json }},
221
401
  watchOverflow: true,
222
- spaceBetween: spaceBetween,
402
+ spaceBetween: {{ block.settings.space_between | default: 8 }},
223
403
  {% if block.settings.pagination_type != 'none' %}
224
404
  pagination: {
225
405
  el: '#shopify-block-{{block.id}} .swiper-pagination',
@@ -243,11 +423,19 @@
243
423
  initialSlide: {{ block.settings.pre_show_index | default: 0 }},
244
424
  breakpoints: {
245
425
  0: {
426
+ {% if block.settings.slides_per_view_mb == 0 %}
427
+ slidesPerView: 'auto',
428
+ {% else %}
246
429
  slidesPerView: {{ block.settings.slides_per_view_mb | default: 1 }},
430
+ {% endif %}
247
431
  slidesPerGroup: {{ block.settings.slides_per_group_mb | default: 1 }},
248
432
  },
249
433
  1024: {
434
+ {% if block.settings.slides_per_view_pc == 0 %}
435
+ slidesPerView: 'auto',
436
+ {% else %}
250
437
  slidesPerView: {{ block.settings.slides_per_view_pc | default: 3 }},
438
+ {% endif %}
251
439
  slidesPerGroup: {{ block.settings.slides_per_group_pc | default: 1 }},
252
440
  }
253
441
  }
@@ -310,21 +498,18 @@
310
498
  "max": 80,
311
499
  "step": 2
312
500
  },
313
- {
314
- "type": "range",
315
- "id": "space_between_mb",
316
- "label": "卡片间距(px)(mobile)",
317
- "default": 8,
318
- "min": 0,
319
- "max": 80,
320
- "step": 2
321
- },
322
501
  {
323
502
  "type": "checkbox",
324
503
  "id": "centered_slides",
325
504
  "label": "居中显示",
326
505
  "default": false
327
506
  },
507
+ {
508
+ "type": "checkbox",
509
+ "id": "scale_active_slide",
510
+ "label": "当前卡片放大",
511
+ "default": false
512
+ },
328
513
  {
329
514
  "type": "number",
330
515
  "id": "pre_show_index",
@@ -414,6 +599,16 @@
414
599
  "label": "显示左右导航",
415
600
  "default": true
416
601
  },
602
+ {
603
+ "type": "select",
604
+ "id": "navigation_style",
605
+ "label": "导航样式",
606
+ "options": [
607
+ { "value": "normal", "label": "正常" },
608
+ { "value": "blur", "label": "背景模糊" }
609
+ ],
610
+ "default": "normal"
611
+ },
417
612
  {
418
613
  "type": "checkbox",
419
614
  "id": "show_navigation_mobile",
@@ -435,6 +630,7 @@
435
630
  {
436
631
  "type": "range",
437
632
  "id": "slides_per_view_mb",
633
+ "info": "0表示根据内容宽度自动计算(auto)",
438
634
  "label": "可见数(Mobile)",
439
635
  "default": 1,
440
636
  "min": 1,
@@ -454,8 +650,9 @@
454
650
  "type": "range",
455
651
  "id": "slides_per_view_pc",
456
652
  "label": "可见数(PC)",
653
+ "info": "0表示根据内容宽度自动计算(auto)",
457
654
  "default": 3,
458
- "min": 1,
655
+ "min": 0,
459
656
  "max": 6,
460
657
  "step": 0.1
461
658
  },
@@ -483,7 +680,6 @@
483
680
  "loop": true,
484
681
  "speed": 500,
485
682
  "space_between": 8,
486
- "space_between_mb": 8,
487
683
  "centered_slides": false,
488
684
  "auto_height": false,
489
685
  "autoplay": false,