zz-shopify-components 0.0.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.
Files changed (61) hide show
  1. package/README.md +12 -0
  2. package/assets/fade-in-content.js +169 -0
  3. package/assets/gsap.min.js +11 -0
  4. package/assets/http-request.js +73 -0
  5. package/assets/jquery.js +2 -0
  6. package/assets/lozad.js +10 -0
  7. package/assets/site-jump.js +52 -0
  8. package/assets/site-jumpV2.js +35 -0
  9. package/assets/swiper-bundle.min.css +13 -0
  10. package/assets/swiper-bundle.min.js +14 -0
  11. package/assets/swiper.css +331 -0
  12. package/assets/zz-components.css +323 -0
  13. package/assets/zz-components.js +166 -0
  14. package/blocks/zz-accessories-item.liquid +183 -0
  15. package/blocks/zz-accessories-swiper.liquid +223 -0
  16. package/blocks/zz-button.liquid +189 -0
  17. package/blocks/zz-content-description-html.liquid +199 -0
  18. package/blocks/zz-content-description.liquid +200 -0
  19. package/blocks/zz-flex-layout-bg-block.liquid +520 -0
  20. package/blocks/zz-flex-layout-block.liquid +545 -0
  21. package/blocks/zz-flex-layout-widget.liquid +318 -0
  22. package/blocks/zz-full-screen-swiper.liquid +444 -0
  23. package/blocks/zz-icon.liquid +46 -0
  24. package/blocks/zz-mail.liquid +135 -0
  25. package/blocks/zz-mb-swiper-pc-flex.liquid +270 -0
  26. package/blocks/zz-ratio-image.liquid +177 -0
  27. package/blocks/zz-ratio-video.liquid +112 -0
  28. package/blocks/zz-responsive-width-image.liquid +219 -0
  29. package/blocks/zz-responsive-width-video.liquid +163 -0
  30. package/blocks/zz-scroll-animate-bg-text.liquid +265 -0
  31. package/blocks/zz-scroll-cover.liquid +64 -0
  32. package/blocks/zz-tag.liquid +48 -0
  33. package/blocks/zz-text.liquid +225 -0
  34. package/blocks/zz-title.liquid +284 -0
  35. package/blocks/zz-video-button.liquid +81 -0
  36. package/blocks/zz-video-swiper-perview-item.liquid +216 -0
  37. package/blocks/zz-video-swiper-perview.liquid +582 -0
  38. package/component.config.json +4 -0
  39. package/package.json +23 -0
  40. package/scripts/postinstall-v2.js +47 -0
  41. package/scripts/postinstall.js +39 -0
  42. package/sections/zz-flex-layout-section.liquid +266 -0
  43. package/sections/zz-navigation-tab-v3.liquid +403 -0
  44. package/sections/zz-navigation-tab.liquid +410 -0
  45. package/sections/zz-video-collapse-swiper.liquid +522 -0
  46. package/sections/zz-video-tab-swiper.liquid +745 -0
  47. package/snippets/zz-button.liquid +70 -0
  48. package/snippets/zz-content-text.liquid +56 -0
  49. package/snippets/zz-h2.liquid +31 -0
  50. package/snippets/zz-h3.liquid +31 -0
  51. package/snippets/zz-h4.liquid +30 -0
  52. package/snippets/zz-h5.liquid +39 -0
  53. package/snippets/zz-h6.liquid +39 -0
  54. package/snippets/zz-icon.liquid +74 -0
  55. package/snippets/zz-img.liquid +44 -0
  56. package/snippets/zz-prev-next-btn.liquid +62 -0
  57. package/snippets/zz-spoke.liquid +142 -0
  58. package/snippets/zz-tag.liquid +22 -0
  59. package/snippets/zz-video-button.liquid +55 -0
  60. package/snippets/zz-video-md.liquid +117 -0
  61. package/snippets/zz-video.liquid +117 -0
@@ -0,0 +1,318 @@
1
+ {% schema %}
2
+ {
3
+ "name": "Flex Layout Widget",
4
+ "class": "flex-layout-widget",
5
+ "settings": [
6
+ {
7
+ "type": "color_background",
8
+ "id": "background_color",
9
+ "label": "背景颜色",
10
+ "default": "rgba(0,0,0,0)"
11
+ },
12
+
13
+ {
14
+ "type": "header",
15
+ "content": "💻 PC端布局设置"
16
+ },
17
+ {
18
+ "type": "range",
19
+ "id": "pc_width",
20
+ "min": 0,
21
+ "max": 100,
22
+ "step": 1,
23
+ "unit": "%",
24
+ "label": "PC端占父容器的百分比,单位%",
25
+ "info": "0 默认flex-1",
26
+ "default": 0
27
+ },
28
+ {
29
+ "type": "select",
30
+ "id": "pc_direction",
31
+ "label": "PC方向 (Direction)",
32
+ "options": [
33
+ { "value": "row", "label": "横向 (Horizontal)" },
34
+ { "value": "column", "label": "纵向 (Vertical)" },
35
+ { "value": "row-reverse", "label": "横向反向 (Horizontal Reverse)" },
36
+ { "value": "column-reverse", "label": "纵向反向 (Vertical Reverse)" }
37
+ ],
38
+ "default": "row"
39
+ },
40
+ {
41
+ "type": "number",
42
+ "id": "pc_gap",
43
+ "label": "区块间距 (Gap)",
44
+ "default": 40
45
+ },
46
+
47
+ {
48
+ "type": "select",
49
+ "id": "pc_justify",
50
+ "label": "PC主轴对齐 (Justify Content)",
51
+ "options": [
52
+ { "value": "flex-start", "label": "起始对齐 (Flex Start)" },
53
+ { "value": "center", "label": "居中对齐 (Center)" },
54
+ { "value": "flex-end", "label": "末尾对齐 (Flex End)" },
55
+ { "value": "space-between", "label": "两端对齐 (Space Between)" },
56
+ { "value": "space-around", "label": "平均间距 (Space Around)" }
57
+ ],
58
+ "default": "flex-start"
59
+ },
60
+ {
61
+ "type": "select",
62
+ "id": "pc_align",
63
+ "label": "PC交叉轴对齐 (Align Items)",
64
+ "options": [
65
+ { "value": "flex-start", "label": "起始对齐 (Flex Start)" },
66
+ { "value": "center", "label": "居中对齐 (Center)" },
67
+ { "value": "flex-end", "label": "末尾对齐 (Flex End)" }
68
+ ],
69
+ "default": "center"
70
+ },
71
+ {
72
+ "type": "number",
73
+ "id": "pc_padding_top",
74
+ "label": "PC端顶部内边距 (px)",
75
+ "default": 0
76
+ },
77
+ {
78
+ "type": "number",
79
+ "id": "pc_padding_bottom",
80
+ "label": "PC端底部内边距 (px)",
81
+ "default": 0
82
+ },
83
+ {
84
+ "type": "number",
85
+ "id": "pc_padding_x",
86
+ "label": "PC端左右内边距",
87
+ "default": 0,
88
+ "info": "单位:px"
89
+ },
90
+ {
91
+ "type": "range",
92
+ "id": "pc_border_radius",
93
+ "min": 0,
94
+ "max": 50,
95
+ "step": 1,
96
+ "unit": "px",
97
+ "label": "PC端圆角大小",
98
+ "default": 0
99
+ },
100
+ {
101
+ "type": "header",
102
+ "content": "📱 移动端布局设置"
103
+ },
104
+ {
105
+ "type": "range",
106
+ "id": "mobile_width",
107
+ "min": 0,
108
+ "max": 100,
109
+ "step": 1,
110
+ "unit": "%",
111
+ "label": "移动端占父容器的百分比,单位%",
112
+ "info": "0 默认flex-1",
113
+ "default": 0
114
+ },
115
+ {
116
+ "type": "select",
117
+ "id": "mobile_direction",
118
+ "label": "移动方向 (Direction)",
119
+ "options": [
120
+ { "value": "row", "label": "横向 (Horizontal)" },
121
+ { "value": "column", "label": "纵向 (Vertical)" },
122
+ { "value": "row-reverse", "label": "横向反向 (Horizontal Reverse)" },
123
+ { "value": "column-reverse", "label": "纵向反向 (Vertical Reverse)" }
124
+ ],
125
+ "default": "column"
126
+ },
127
+ {
128
+ "type": "number",
129
+ "id": "mobile_gap",
130
+ "label": "移动区块间距 (Gap)",
131
+ "default": 20
132
+ },
133
+ {
134
+ "type": "select",
135
+ "id": "mobile_justify",
136
+ "label": "移动主轴对齐 (Justify Content)",
137
+ "options": [
138
+ { "value": "flex-start", "label": "起始对齐 (Flex Start)" },
139
+ { "value": "center", "label": "居中对齐 (Center)" },
140
+ { "value": "flex-end", "label": "末尾对齐 (Flex End)" },
141
+ { "value": "space-between", "label": "两端对齐 (Space Between)" },
142
+ { "value": "space-around", "label": "平均间距 (Space Around)" }
143
+ ],
144
+ "default": "flex-start"
145
+ },
146
+ {
147
+ "type": "select",
148
+ "id": "mobile_align",
149
+ "label": "移动交叉轴对齐 (Align Items)",
150
+ "options": [
151
+ { "value": "flex-start", "label": "起始对齐 (Flex Start)" },
152
+ { "value": "center", "label": "居中对齐 (Center)" },
153
+ { "value": "flex-end", "label": "末尾对齐 (Flex End)" }
154
+ ],
155
+ "default": "center"
156
+ },
157
+ {
158
+ "type": "number",
159
+ "id": "mobile_padding_x",
160
+ "label": "移动端左右内边距",
161
+ "default": 0,
162
+ "info": "单位:px"
163
+ },
164
+ {
165
+ "type": "number",
166
+ "id": "mobile_padding_top",
167
+ "label": "移动端顶部内边距 (px)",
168
+ "default": 0
169
+ },
170
+ {
171
+ "type": "number",
172
+ "id": "mobile_padding_bottom",
173
+ "label": "移动端底部内边距 (px)",
174
+ "default": 0
175
+ },
176
+ {
177
+ "type": "range",
178
+ "id": "mobile_border_radius",
179
+ "min": 0,
180
+ "max": 50,
181
+ "step": 1,
182
+ "unit": "px",
183
+ "label": "移动端圆角大小",
184
+ "default": 0
185
+ },
186
+ {
187
+ "type": "header",
188
+ "content": "动画设置"
189
+ },
190
+ {
191
+ "type": "select",
192
+ "id": "child_animation",
193
+ "label": "子元素动画",
194
+ "options": [
195
+ { "value": "none-animation", "label": "无动画" },
196
+ { "value": "fade-in-box", "label": "按序从下往上显示" },
197
+ { "value": "fade-in-from-left", "label": "按序从左进入显示" },
198
+ { "value": "fade-in-from-right", "label": "按序从右进入显示" },
199
+ { "value": "slow-reveal", "label": "跟随页面滚动缓慢显示" }
200
+ ],
201
+ "default": "none-animation"
202
+ },
203
+ {
204
+ "type": "select",
205
+ "id": "self_animation",
206
+ "label": "自身动画",
207
+ "options": [
208
+ { "value": "none-animation", "label": "无动画" },
209
+ { "value": "fade-in-content", "label": "从下往上显示" },
210
+ { "value": "fade-in-from-left-content", "label": "从左往右显示" },
211
+ { "value": "fade-in-from-right-content", "label": "从右往左显示" },
212
+ { "value": "slow-reveal-content", "label": "跟随页面滚动缓慢显示" }
213
+ ],
214
+ "default": "none-animation"
215
+ },
216
+ ],
217
+ "blocks": [
218
+ {
219
+ "type": "@theme",
220
+ }
221
+ ],
222
+ "presets": [
223
+ {
224
+ "name": "弹性布局部件",
225
+ },
226
+ {
227
+ "name": "上下布局,标题+内容",
228
+ "blocks": [
229
+ {
230
+ "type": "zz-title",
231
+ "settings": {
232
+ "pc_title": "<p>title is here</p>",
233
+ "mb_title": "<p>title is here</p>",
234
+ "tag": "h3",
235
+ "text_color": "#ffffff",
236
+ }
237
+ },
238
+ {
239
+ "type": "zz-content-description-html",
240
+ "settings": {
241
+ "text_color": "#b2b2b2",
242
+ "highlight_color": "#ffffff",
243
+ "link_color": "#0066cc",
244
+ "pc_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
245
+ "mobile_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
246
+
247
+ }
248
+ }
249
+ ]
250
+ }
251
+ ]
252
+ }
253
+ {% endschema %}
254
+
255
+ <style>
256
+ #shopify-block-{{ block.id }} {
257
+ {% if block.settings.mobile_width == 0 %}
258
+ width: 100%;
259
+ flex: 1;
260
+ {% else %}
261
+ width: {{ block.settings.mobile_width }}%;
262
+ {% endif %}
263
+ }
264
+ #shopify-block-{{ block.id }} .flex-layout-widget-container {
265
+ width: 100%;
266
+ display: flex;
267
+ flex-direction: {{ block.settings.mobile_direction }};
268
+ justify-content: {{ block.settings.mobile_justify }};
269
+ align-items: {{ block.settings.mobile_align }};
270
+ gap: {{ block.settings.mobile_gap }}px;
271
+ background-color: {{ block.settings.background_color }};
272
+ padding-top: {{ block.settings.mobile_padding_top }}px;
273
+ padding-bottom: {{ block.settings.mobile_padding_bottom }}px;
274
+ padding-left: {{ block.settings.mobile_padding_x }}px;
275
+ padding-right: {{ block.settings.mobile_padding_x }}px;
276
+ border-radius: {{ block.settings.mobile_border_radius }}px;
277
+ box-sizing: border-box;
278
+ }
279
+
280
+
281
+ @media (min-width: 1024px) {
282
+ #shopify-block-{{ block.id }} {
283
+ {% if block.settings.pc_width == 0 %}
284
+ flex: 1;
285
+ {% else %}
286
+ width: {{ block.settings.pc_width }}%;
287
+ {% endif %}
288
+ }
289
+ #shopify-block-{{ block.id }} .flex-layout-widget-container {
290
+ width: 100%;
291
+ flex-direction: {{ block.settings.pc_direction }};
292
+ justify-content: {{ block.settings.pc_justify }};
293
+ align-items: {{ block.settings.pc_align }};
294
+ gap: {{ block.settings.pc_gap }}px;
295
+ padding-top: {{ block.settings.pc_padding_top }}px;
296
+ padding-bottom: {{ block.settings.pc_padding_bottom }}px;
297
+ padding-left: {{ block.settings.pc_padding_x }}px;
298
+ padding-right: {{ block.settings.pc_padding_x }}px;
299
+ border-radius: {{ block.settings.pc_border_radius }}px;
300
+ }
301
+
302
+ }
303
+
304
+ .flex-layout-widget-container .flex-layout-video {
305
+ border-radius: 10px;
306
+ }
307
+ @media screen and (min-width: 1024px) {
308
+ .flex-layout-widget-container .flex-layout-video {
309
+ border-radius: 16px;
310
+ }
311
+ }
312
+ </style>
313
+
314
+
315
+ <div class="flex-layout-widget-container {{ block.settings.self_animation }} {{ block.settings.child_animation }}">
316
+
317
+ {% content_for 'blocks' %}
318
+ </div>