zz-shopify-components 0.0.27 → 0.0.28-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.
- package/CHANGELOG.md +21 -21
- package/README.md +70 -56
- package/assets/ScrollTrigger.min.js +11 -11
- package/assets/gsap.min.js +11 -11
- package/assets/jquery.js +2 -2
- package/assets/lazy-video.js +2 -2
- package/assets/lazyload.min.js +1 -1
- package/assets/lozad.js +10 -10
- package/assets/site-jump.js +52 -52
- package/assets/site-jumpV2.js +35 -35
- package/assets/swiper-bundle.min.css +12 -12
- package/assets/swiper-bundle.min.js +13 -13
- package/assets/swiper.css +330 -330
- package/assets/zz-components.css +322 -322
- package/assets/zz-components.js +166 -166
- package/assets/zz-fade-in-content.js +169 -169
- package/assets/zz-http-request.js +73 -73
- package/assets/zz-world-video-comments-dialog.js +240 -240
- package/assets/zz-world-video-dialog.js +190 -190
- package/assets/zz-world-video-list.js +317 -317
- package/assets/zz-world-video.js +270 -270
- package/blocks/zz-accessories-item.liquid +188 -188
- package/blocks/zz-accessories-swiper.liquid +223 -223
- package/blocks/zz-button.liquid +216 -216
- package/blocks/zz-content-description-html.liquid +201 -201
- package/blocks/zz-content-description.liquid +209 -209
- package/blocks/zz-flex-layout-bg-block.liquid +524 -524
- package/blocks/zz-flex-layout-block.liquid +549 -549
- package/blocks/zz-flex-layout-widget.liquid +321 -321
- package/blocks/zz-full-screen-swiper.liquid +443 -443
- package/blocks/zz-icon.liquid +46 -46
- package/blocks/zz-mail.liquid +135 -135
- package/blocks/zz-mb-swiper-pc-flex.liquid +273 -273
- package/blocks/zz-price-tag-mini.liquid +106 -106
- package/blocks/zz-price-tag.liquid +41 -41
- package/blocks/zz-ratio-image.liquid +181 -181
- package/blocks/zz-ratio-video.liquid +115 -115
- package/blocks/zz-responsive-width-image.liquid +222 -222
- package/blocks/zz-responsive-width-video.liquid +166 -166
- package/blocks/zz-scroll-animate-bg-text.liquid +268 -268
- package/blocks/zz-scroll-cover.liquid +67 -67
- package/blocks/zz-tag.liquid +50 -50
- package/blocks/zz-text.liquid +227 -227
- package/blocks/zz-title.liquid +287 -287
- package/blocks/zz-video-button.liquid +84 -84
- package/blocks/zz-video-img-item.liquid +203 -203
- package/blocks/zz-video-img-list.liquid +166 -166
- package/blocks/zz-video-swiper-perview-item.liquid +221 -221
- package/blocks/zz-video-swiper-perview.liquid +585 -585
- package/blocks/zz-world-video.liquid +639 -639
- package/component.config.json +7 -7
- package/package.json +1 -1
- package/scripts/postinstall-v1.js +39 -39
- package/scripts/postinstall-v2.js +47 -47
- package/scripts/postinstall-v3.js +51 -51
- package/scripts/publish-npm.js +43 -43
- package/sections/zz-flex-layout-section.liquid +269 -269
- package/sections/zz-navigation-tab-v3.liquid +409 -409
- package/sections/zz-navigation-tab.liquid +411 -411
- package/sections/zz-shopping-card-list.liquid +399 -399
- package/sections/zz-video-collapse-swiper.liquid +522 -522
- package/sections/zz-video-tab-swiper.liquid +748 -748
- package/snippets/zz-button.liquid +70 -70
- package/snippets/zz-content-h3.liquid +15 -15
- package/snippets/zz-content-text.liquid +56 -56
- package/snippets/zz-h2.liquid +31 -31
- package/snippets/zz-h3.liquid +31 -31
- package/snippets/zz-h4.liquid +30 -30
- package/snippets/zz-h5.liquid +39 -39
- package/snippets/zz-h6.liquid +39 -39
- package/snippets/zz-icon-next.liquid +17 -17
- package/snippets/zz-icon-prev.liquid +17 -17
- package/snippets/zz-icon.liquid +74 -74
- package/snippets/zz-img-md.liquid +44 -44
- package/snippets/zz-img.liquid +44 -44
- package/snippets/zz-prev-next-blur-icon.liquid +36 -36
- package/snippets/zz-prev-next-btn.liquid +62 -62
- package/snippets/zz-price-tag.liquid +22 -22
- package/snippets/zz-spoke.liquid +142 -142
- package/snippets/zz-tag.liquid +22 -22
- package/snippets/zz-video-button.liquid +54 -54
- package/snippets/zz-video-md.liquid +117 -117
- package/snippets/zz-video.liquid +117 -117
|
@@ -1,321 +1,321 @@
|
|
|
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": "Flex Layout Widget"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "上下布局,标题+内容",
|
|
231
|
-
"blocks": [
|
|
232
|
-
{
|
|
233
|
-
"type": "zz-title",
|
|
234
|
-
"settings": {
|
|
235
|
-
"pc_title": "<p>title is here</p>",
|
|
236
|
-
"mb_title": "<p>title is here</p>",
|
|
237
|
-
"tag": "h3",
|
|
238
|
-
"text_color": "#ffffff",
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"type": "zz-content-description-html",
|
|
243
|
-
"settings": {
|
|
244
|
-
"text_color": "#b2b2b2",
|
|
245
|
-
"highlight_color": "#ffffff",
|
|
246
|
-
"link_color": "#0066cc",
|
|
247
|
-
"pc_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
|
|
248
|
-
"mobile_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
]
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
{% endschema %}
|
|
257
|
-
|
|
258
|
-
<style>
|
|
259
|
-
#shopify-block-{{ block.id }} {
|
|
260
|
-
{% if block.settings.mobile_width == 0 %}
|
|
261
|
-
width: 100%;
|
|
262
|
-
flex: 1;
|
|
263
|
-
{% else %}
|
|
264
|
-
width: {{ block.settings.mobile_width }}%;
|
|
265
|
-
{% endif %}
|
|
266
|
-
}
|
|
267
|
-
#shopify-block-{{ block.id }} .flex-layout-widget-container {
|
|
268
|
-
width: 100%;
|
|
269
|
-
display: flex;
|
|
270
|
-
flex-direction: {{ block.settings.mobile_direction }};
|
|
271
|
-
justify-content: {{ block.settings.mobile_justify }};
|
|
272
|
-
align-items: {{ block.settings.mobile_align }};
|
|
273
|
-
gap: {{ block.settings.mobile_gap }}px;
|
|
274
|
-
background-color: {{ block.settings.background_color }};
|
|
275
|
-
padding-top: {{ block.settings.mobile_padding_top }}px;
|
|
276
|
-
padding-bottom: {{ block.settings.mobile_padding_bottom }}px;
|
|
277
|
-
padding-left: {{ block.settings.mobile_padding_x }}px;
|
|
278
|
-
padding-right: {{ block.settings.mobile_padding_x }}px;
|
|
279
|
-
border-radius: {{ block.settings.mobile_border_radius }}px;
|
|
280
|
-
box-sizing: border-box;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
@media (min-width: 1024px) {
|
|
285
|
-
#shopify-block-{{ block.id }} {
|
|
286
|
-
{% if block.settings.pc_width == 0 %}
|
|
287
|
-
flex: 1;
|
|
288
|
-
{% else %}
|
|
289
|
-
width: {{ block.settings.pc_width }}%;
|
|
290
|
-
{% endif %}
|
|
291
|
-
}
|
|
292
|
-
#shopify-block-{{ block.id }} .flex-layout-widget-container {
|
|
293
|
-
width: 100%;
|
|
294
|
-
flex-direction: {{ block.settings.pc_direction }};
|
|
295
|
-
justify-content: {{ block.settings.pc_justify }};
|
|
296
|
-
align-items: {{ block.settings.pc_align }};
|
|
297
|
-
gap: {{ block.settings.pc_gap }}px;
|
|
298
|
-
padding-top: {{ block.settings.pc_padding_top }}px;
|
|
299
|
-
padding-bottom: {{ block.settings.pc_padding_bottom }}px;
|
|
300
|
-
padding-left: {{ block.settings.pc_padding_x }}px;
|
|
301
|
-
padding-right: {{ block.settings.pc_padding_x }}px;
|
|
302
|
-
border-radius: {{ block.settings.pc_border_radius }}px;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.flex-layout-widget-container .flex-layout-video {
|
|
308
|
-
border-radius: 10px;
|
|
309
|
-
}
|
|
310
|
-
@media screen and (min-width: 1024px) {
|
|
311
|
-
.flex-layout-widget-container .flex-layout-video {
|
|
312
|
-
border-radius: 16px;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
</style>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<div class="flex-layout-widget-container {{ block.settings.self_animation }} {{ block.settings.child_animation }}">
|
|
319
|
-
|
|
320
|
-
{% content_for 'blocks' %}
|
|
321
|
-
</div>
|
|
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": "Flex Layout Widget"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "上下布局,标题+内容",
|
|
231
|
+
"blocks": [
|
|
232
|
+
{
|
|
233
|
+
"type": "zz-title",
|
|
234
|
+
"settings": {
|
|
235
|
+
"pc_title": "<p>title is here</p>",
|
|
236
|
+
"mb_title": "<p>title is here</p>",
|
|
237
|
+
"tag": "h3",
|
|
238
|
+
"text_color": "#ffffff",
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"type": "zz-content-description-html",
|
|
243
|
+
"settings": {
|
|
244
|
+
"text_color": "#b2b2b2",
|
|
245
|
+
"highlight_color": "#ffffff",
|
|
246
|
+
"link_color": "#0066cc",
|
|
247
|
+
"pc_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
|
|
248
|
+
"mobile_content": "<p>normal content is here and <strong> highlight the key features </strong></p>",
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
{% endschema %}
|
|
257
|
+
|
|
258
|
+
<style>
|
|
259
|
+
#shopify-block-{{ block.id }} {
|
|
260
|
+
{% if block.settings.mobile_width == 0 %}
|
|
261
|
+
width: 100%;
|
|
262
|
+
flex: 1;
|
|
263
|
+
{% else %}
|
|
264
|
+
width: {{ block.settings.mobile_width }}%;
|
|
265
|
+
{% endif %}
|
|
266
|
+
}
|
|
267
|
+
#shopify-block-{{ block.id }} .flex-layout-widget-container {
|
|
268
|
+
width: 100%;
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: {{ block.settings.mobile_direction }};
|
|
271
|
+
justify-content: {{ block.settings.mobile_justify }};
|
|
272
|
+
align-items: {{ block.settings.mobile_align }};
|
|
273
|
+
gap: {{ block.settings.mobile_gap }}px;
|
|
274
|
+
background-color: {{ block.settings.background_color }};
|
|
275
|
+
padding-top: {{ block.settings.mobile_padding_top }}px;
|
|
276
|
+
padding-bottom: {{ block.settings.mobile_padding_bottom }}px;
|
|
277
|
+
padding-left: {{ block.settings.mobile_padding_x }}px;
|
|
278
|
+
padding-right: {{ block.settings.mobile_padding_x }}px;
|
|
279
|
+
border-radius: {{ block.settings.mobile_border_radius }}px;
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
@media (min-width: 1024px) {
|
|
285
|
+
#shopify-block-{{ block.id }} {
|
|
286
|
+
{% if block.settings.pc_width == 0 %}
|
|
287
|
+
flex: 1;
|
|
288
|
+
{% else %}
|
|
289
|
+
width: {{ block.settings.pc_width }}%;
|
|
290
|
+
{% endif %}
|
|
291
|
+
}
|
|
292
|
+
#shopify-block-{{ block.id }} .flex-layout-widget-container {
|
|
293
|
+
width: 100%;
|
|
294
|
+
flex-direction: {{ block.settings.pc_direction }};
|
|
295
|
+
justify-content: {{ block.settings.pc_justify }};
|
|
296
|
+
align-items: {{ block.settings.pc_align }};
|
|
297
|
+
gap: {{ block.settings.pc_gap }}px;
|
|
298
|
+
padding-top: {{ block.settings.pc_padding_top }}px;
|
|
299
|
+
padding-bottom: {{ block.settings.pc_padding_bottom }}px;
|
|
300
|
+
padding-left: {{ block.settings.pc_padding_x }}px;
|
|
301
|
+
padding-right: {{ block.settings.pc_padding_x }}px;
|
|
302
|
+
border-radius: {{ block.settings.pc_border_radius }}px;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.flex-layout-widget-container .flex-layout-video {
|
|
308
|
+
border-radius: 10px;
|
|
309
|
+
}
|
|
310
|
+
@media screen and (min-width: 1024px) {
|
|
311
|
+
.flex-layout-widget-container .flex-layout-video {
|
|
312
|
+
border-radius: 16px;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
</style>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
<div class="flex-layout-widget-container {{ block.settings.self_animation }} {{ block.settings.child_animation }}">
|
|
319
|
+
|
|
320
|
+
{% content_for 'blocks' %}
|
|
321
|
+
</div>
|