zz-shopify-components 0.29.0 → 0.29.1-beta.1

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.29.0",
3
+ "version": "0.29.1-beta.1",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -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-[8px] lg:tw-gap-[20px] slow-reveal'>
135
+ <div class='voc-item-list 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]'>
@@ -150,7 +150,7 @@
150
150
  user_account: block.settings.account,
151
151
  content: block.settings.content,
152
152
  name_class: 'tw-text-black max-lg:tw-text-[10px] lg:tw-text-[14px]',
153
- content_class: 'max-lg:tw-text-[10px] lg:tw-text-[14px] tw-text-black/70 lg:tw-text-black/60 max-lg:tw-leading-[1.2] tw-line-clamp-6 lg:tw-line-clamp-4'
153
+ content_class: 'voc-text-content max-lg:tw-text-[10px] lg:tw-text-[14px] tw-text-black/70 lg:tw-text-black/60 max-lg:tw-leading-[1.2] tw-line-clamp-8 lg:tw-line-clamp-6'
154
154
  %}
155
155
  </div>
156
156
  </div>
@@ -171,6 +171,18 @@
171
171
  #shopify-section-{{section.id}} .zz-spoke-block-media img{
172
172
  height: 100%;
173
173
  }
174
+
175
+ .voc-item-list {
176
+ -webkit-overflow-scrolling: touch; /* 移动端流畅滚动(可选) */
177
+ scrollbar-width: none; /* Firefox */
178
+ -ms-overflow-style: none; /* IE 和 Edge */
179
+ }
180
+ .voc-item-list::-webkit-scrollbar {
181
+ width: 0px; /* 隐藏滚动条 */
182
+ }
183
+ .voc-item-list::-webkit-scrollbar {
184
+ display: none;
185
+ }
174
186
  @media screen and (max-width: 1023px) {
175
187
  #shopify-section-{{section.id}} .comment-box .comment-item {
176
188
  width: 168px;
@@ -179,14 +191,14 @@
179
191
 
180
192
  #shopify-section-{{section.id}} .comment-box {
181
193
  width: 168px;
182
- height: 357px;
194
+ height: 380px;
183
195
  }
184
196
  #shopify-section-{{section.id}} .comment-box .zz-spoke-block-media {
185
197
  height: 221px;
186
198
  }
187
199
  #shopify-section-{{section.id}} .comment-box .zz-spoke-block-content {
188
200
  box-sizing: border-box;
189
- height: 136px;
201
+ height: 160px;
190
202
  }
191
203
 
192
204
 
@@ -198,13 +210,13 @@
198
210
  padding-bottom: {{ section.settings.padding_bottom }}px;
199
211
  }
200
212
  #shopify-section-{{section.id}} .comment-box {
201
- height: 643px;
213
+ height: 688px;
202
214
  }
203
215
  #shopify-section-{{section.id}} .comment-box .zz-spoke-block-media {
204
216
  height: 468px;
205
217
  }
206
218
  #shopify-section-{{section.id}} .comment-box .zz-spoke-block-content {
207
- height: 175px;
219
+ height: 210px;
208
220
  }
209
221
  }
210
222
  @media (min-width: 1024px) and (max-width: 1280px) {
@@ -95,7 +95,7 @@
95
95
  {% endcomment %}
96
96
  </div>
97
97
  {% endif %}
98
- <div class='zz-spoke-block-content tw-relative tw-p-[10px] tw-pr-[0px] lg:tw-pl-[24px] lg:tw-pr-[30px] lg:tw-py-[20px] tw-w-full tw-h-fit tw-rounded-[10px] lg:tw-rounded-[16px] tw-overflow-hidden {% if only_content %}tw-pb-[32px] lg:tw-pb-[40px] {% else %}tw-pb-[10px] lg:tw-pb-[20px]{% endif %}'>
98
+ <div class='zz-spoke-block-content tw-relative tw-p-[10px] lg:tw-pl-[24px] lg:tw-pr-[30px] lg:tw-py-[20px] tw-w-full tw-h-fit tw-rounded-[10px] lg:tw-rounded-[16px] tw-overflow-hidden {% if only_content %}tw-pb-[32px] lg:tw-pb-[40px] {% else %}tw-pb-[10px] lg:tw-pb-[20px]{% endif %}'>
99
99
  <div class='tw-flex tw-items-center'>
100
100
  <div class='tw-w-[20px] tw-min-w-[20px] tw-h-[20px] lg:tw-w-[36px] lg:tw-min-w-[36px] lg:tw-h-[36px]'>
101
101
  {% render 'zz-img',