zz-shopify-components 0.28.1-beta.0 → 0.29.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.
@@ -210,13 +210,16 @@
210
210
  let instance = null;
211
211
  let initialized = false;
212
212
 
213
+ const isDesktop = window.innerWidth > 1023;
214
+ const spaceBetween = isDesktop ? {{ block.settings.space_between | default: 8 }} : {{ block.settings.space_between_mb | default: 8 }};
215
+
213
216
  const options = {
214
217
  loop: {{ block.settings.loop | json }},
215
218
  speed: {{ block.settings.speed | default: 500 }},
216
219
  autoHeight: {{ block.settings.auto_height | json }},
217
220
  centeredSlides: {{ block.settings.centered_slides | json }},
218
221
  watchOverflow: true,
219
- spaceBetween: {{ block.settings.space_between | default: 8 }},
222
+ spaceBetween: spaceBetween,
220
223
  {% if block.settings.pagination_type != 'none' %}
221
224
  pagination: {
222
225
  el: '#shopify-block-{{block.id}} .swiper-pagination',
@@ -307,6 +310,15 @@
307
310
  "max": 80,
308
311
  "step": 2
309
312
  },
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
+ },
310
322
  {
311
323
  "type": "checkbox",
312
324
  "id": "centered_slides",
@@ -471,6 +483,7 @@
471
483
  "loop": true,
472
484
  "speed": 500,
473
485
  "space_between": 8,
486
+ "space_between_mb": 8,
474
487
  "centered_slides": false,
475
488
  "auto_height": false,
476
489
  "autoplay": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.28.1-beta.0",
3
+ "version": "0.29.1-beta.0",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -342,7 +342,7 @@
342
342
  {% assign collapsible_title_color = section.settings.collapsible_title_color
343
343
  | color_modify: 'alpha', 0.5
344
344
  %}
345
- <div class="tw-daisy-collapse-title tw-py-[20px] tw-px-0 tw-text-[20px] tw-font-[700] tw-leading-[1]" style="color: {{ collapsible_title_color }};">
345
+ <div class="tw-daisy-collapse-title tw-py-[20px] tw-pl-0 tw-pr-[30px] tw-text-[20px] tw-font-[700] tw-leading-[1]" style="color: {{ collapsible_title_color }};">
346
346
  {{ collapsible_row.settings.heading }}
347
347
  </div>
348
348
  <div class="tw-p-0 tw-daisy-collapse-content">
@@ -22,7 +22,11 @@
22
22
  {% if pc_video and pc_poster %}
23
23
  {% assign pc_src = pc_video %}
24
24
  {% if pc_video.media_type == 'video' %}
25
- {% assign pc_src = pc_video.sources[1].url %}
25
+ {% if pc_video.sources[1] != blank %}
26
+ {% assign pc_src = pc_video.sources[1].url %}
27
+ {% else %}
28
+ {% assign pc_src = pc_video.sources[0].url %}
29
+ {% endif %}
26
30
  {% endif %}
27
31
 
28
32
  {% assign video_poster_width = pc_posterWidth | default: 1500 %}
@@ -70,7 +74,11 @@
70
74
  {% if mb_video and mb_poster %}
71
75
  {% assign mb_src = mb_video %}
72
76
  {% if mb_video.media_type == 'video' %}
73
- {% assign mb_src = mb_video.sources[1].url %}
77
+ {% if mb_video.sources[1] != blank %}
78
+ {% assign mb_src = mb_video.sources[1].url %}
79
+ {% else %}
80
+ {% assign mb_src = mb_video.sources[0].url %}
81
+ {% endif %}
74
82
  {% endif %}
75
83
 
76
84
  {% assign mb_video_poster_width = mb_poster_width | default: 1500 %}
@@ -22,7 +22,11 @@
22
22
  {% if pc_video and pc_poster %}
23
23
  {% assign pc_src = pc_video %}
24
24
  {% if pc_video.media_type == 'video' %}
25
- {% assign pc_src = pc_video.sources[1].url %}
25
+ {% if pc_video.sources[1] != blank %}
26
+ {% assign pc_src = pc_video.sources[1].url %}
27
+ {% else %}
28
+ {% assign pc_src = pc_video.sources[0].url %}
29
+ {% endif %}
26
30
  {% endif %}
27
31
 
28
32
  {% assign video_poster_width = pc_posterWidth | default: 5000 %}
@@ -70,9 +74,12 @@
70
74
  {% if mb_video and mb_poster %}
71
75
  {% assign mb_src = mb_video %}
72
76
  {% if mb_video.media_type == 'video' %}
73
- {% assign mb_src = mb_video.sources[1].url %}
77
+ {% if mb_video.sources[1] != blank %}
78
+ {% assign mb_src = mb_video.sources[1].url %}
79
+ {% else %}
80
+ {% assign mb_src = mb_video.sources[0].url %}
81
+ {% endif %}
74
82
  {% endif %}
75
-
76
83
  {% assign mb_video_poster_width = mb_poster_width | default: 1500 %}
77
84
  {% assign mb_video_poster = mb_poster
78
85
  | image_url: width: mb_video_poster_width