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
package/blocks/zz-title.liquid
CHANGED
|
@@ -1,287 +1,287 @@
|
|
|
1
|
-
{% schema %}
|
|
2
|
-
{
|
|
3
|
-
"name": "Title",
|
|
4
|
-
"class": "zz-title",
|
|
5
|
-
"settings": [
|
|
6
|
-
{
|
|
7
|
-
"type": "richtext",
|
|
8
|
-
"id": "pc_title",
|
|
9
|
-
"label": "PC标题内容 (PC Title Content)",
|
|
10
|
-
"default": "<p>这里是标题</p>"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "richtext",
|
|
14
|
-
"id": "mb_title",
|
|
15
|
-
"label": "移动标题内容 (Mobile Title Content)",
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"type": "select",
|
|
20
|
-
"id": "tag",
|
|
21
|
-
"label": "标题等级 (Heading Tag)",
|
|
22
|
-
"options": [
|
|
23
|
-
{ "value": "h2", "label": "二级标题 (H2)" },
|
|
24
|
-
{ "value": "h3", "label": "三级标题 (H3)" },
|
|
25
|
-
{ "value": "h4", "label": "四级标题 (H4)" },
|
|
26
|
-
{ "value": "h5", "label": "五级标题 (H5)" },
|
|
27
|
-
{ "value": "h6", "label": "六级标题 (H6)" },
|
|
28
|
-
],
|
|
29
|
-
"default": "h2"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"type": "select",
|
|
33
|
-
"id": "pc_font_weight",
|
|
34
|
-
"label": "PC Font Weight",
|
|
35
|
-
"options": [
|
|
36
|
-
{ "value": "default", "label": "默认" },
|
|
37
|
-
{ "value": "custom", "label": "自定义" }
|
|
38
|
-
],
|
|
39
|
-
"default": "default"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "range",
|
|
43
|
-
"id": "pc_font_weight_custom",
|
|
44
|
-
"label": "PC Font Weight Custom",
|
|
45
|
-
"min": 100,
|
|
46
|
-
"max": 900,
|
|
47
|
-
"step": 100,
|
|
48
|
-
"default": 700,
|
|
49
|
-
"visible_if": "{{ block.settings.pc_font_weight == 'custom' }}"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"type": "checkbox",
|
|
53
|
-
"id": "italic",
|
|
54
|
-
"label": "是否斜体 (Italic)",
|
|
55
|
-
"default": false
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
"type": "color",
|
|
60
|
-
"id": "text_color",
|
|
61
|
-
"label": "文字颜色",
|
|
62
|
-
"default": "#000000"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"type": "text",
|
|
66
|
-
"id": "text_gradient",
|
|
67
|
-
"label": "文字渐变 (可选)"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "header",
|
|
71
|
-
"content": "💻 PC 样式设置"
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
"type": "select",
|
|
76
|
-
"id": "pc_align",
|
|
77
|
-
"label": "PC对齐方式 (Text Align)",
|
|
78
|
-
"options": [
|
|
79
|
-
{ "value": "left", "label": "左对齐 (Left)" },
|
|
80
|
-
{ "value": "center", "label": "居中对齐 (Center)" },
|
|
81
|
-
{ "value": "right", "label": "右对齐 (Right)" }
|
|
82
|
-
],
|
|
83
|
-
"default": "left"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "number",
|
|
87
|
-
"id": "pc_margin_top",
|
|
88
|
-
"label": "PC上外边距 (Margin Top)",
|
|
89
|
-
"default": 0
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"type": "number",
|
|
93
|
-
"id": "pc_margin_bottom",
|
|
94
|
-
"label": "PC下外边距 (Margin Bottom)",
|
|
95
|
-
"default": 0
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"type": "header",
|
|
99
|
-
"content": "📱 移动端样式设置"
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
"type": "select",
|
|
104
|
-
"id": "mobile_align",
|
|
105
|
-
"label": "移动对齐方式 (Text Align)",
|
|
106
|
-
"options": [
|
|
107
|
-
{ "value": "left", "label": "左对齐 (Left)" },
|
|
108
|
-
{ "value": "center", "label": "居中对齐 (Center)" },
|
|
109
|
-
{ "value": "right", "label": "右对齐 (Right)" }
|
|
110
|
-
],
|
|
111
|
-
"default": "left"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"type": "number",
|
|
115
|
-
"id": "mobile_margin_top",
|
|
116
|
-
"label": "移动上外边距 (Margin Top)",
|
|
117
|
-
"default": 0
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"type": "number",
|
|
121
|
-
"id": "mobile_margin_bottom",
|
|
122
|
-
"label": "移动下外边距 (Margin Bottom)",
|
|
123
|
-
"default": 0
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"type": "checkbox",
|
|
127
|
-
"id": "mb_special_settings",
|
|
128
|
-
"label": "移动端特殊设置",
|
|
129
|
-
"default": false
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"type": "range",
|
|
133
|
-
"id": "mobile_font_size",
|
|
134
|
-
"min": 8,
|
|
135
|
-
"max": 36,
|
|
136
|
-
"step": 1,
|
|
137
|
-
"unit": "px",
|
|
138
|
-
"label": "移动端字体大小",
|
|
139
|
-
"info": "移动端需要特殊设置时使用,默认根据选择标题等级自动设置",
|
|
140
|
-
"default": 28,
|
|
141
|
-
"visible_if": "{{ block.settings.mb_special_settings == true }}"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"type": "select",
|
|
145
|
-
"id": "mobile_font_weight",
|
|
146
|
-
"label": "移动端字体粗细",
|
|
147
|
-
"options": [
|
|
148
|
-
{ "value": "default", "label": "默认" },
|
|
149
|
-
{ "value": "custom", "label": "自定义" }
|
|
150
|
-
],
|
|
151
|
-
"default": "default"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"type": "range",
|
|
155
|
-
"id": "mobile_font_weight_custom",
|
|
156
|
-
"label": "移动端字体粗细自定义",
|
|
157
|
-
"min": 100,
|
|
158
|
-
"max": 900,
|
|
159
|
-
"step": 100,
|
|
160
|
-
"default": 700,
|
|
161
|
-
"visible_if": "{{ block.settings.mobile_font_weight == 'custom' }}"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"type": "select",
|
|
165
|
-
"id": "animation",
|
|
166
|
-
"label": "动画",
|
|
167
|
-
"options": [
|
|
168
|
-
{ "value": "none-animation", "label": "无动画" },
|
|
169
|
-
{ "value": "fade-in-content", "label": "从下往上显示" },
|
|
170
|
-
{ "value": "fade-in-from-left-content", "label": "从左往右显示" },
|
|
171
|
-
{ "value": "fade-in-from-right-content", "label": "从右往左显示" },
|
|
172
|
-
{ "value": "slow-reveal-content", "label": "跟随页面滚动缓慢显示" }
|
|
173
|
-
],
|
|
174
|
-
"default": "none-animation"
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
"presets": [
|
|
178
|
-
{
|
|
179
|
-
"name": "Title"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"name": "标题 h2-h4"
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
}
|
|
186
|
-
{% endschema %}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
{% assign animation_class = block.settings.animation | append: ' title-block' %}
|
|
190
|
-
|
|
191
|
-
{% case block.settings.tag %}
|
|
192
|
-
{% when 'h2' %}
|
|
193
|
-
{% render 'zz-h2',
|
|
194
|
-
title: block.settings.pc_title,
|
|
195
|
-
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
196
|
-
title_color: block.settings.text_color,
|
|
197
|
-
title_color_gradient: block.settings.text_gradient,
|
|
198
|
-
italic: block.settings.italic,
|
|
199
|
-
class_name: animation_class,
|
|
200
|
-
font_weight: block.settings.pc_font_weight,
|
|
201
|
-
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
202
|
-
font_weight_mb: block.settings.mobile_font_weight,
|
|
203
|
-
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
204
|
-
%}
|
|
205
|
-
{% when 'h3' %}
|
|
206
|
-
{% render 'zz-h3',
|
|
207
|
-
title: block.settings.pc_title,
|
|
208
|
-
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
209
|
-
title_color: block.settings.text_color,
|
|
210
|
-
title_color_gradient: block.settings.text_gradient,
|
|
211
|
-
italic: block.settings.italic,
|
|
212
|
-
class_name: animation_class,
|
|
213
|
-
font_weight: block.settings.pc_font_weight,
|
|
214
|
-
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
215
|
-
font_weight_mb: block.settings.mobile_font_weight,
|
|
216
|
-
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
217
|
-
|
|
218
|
-
%}
|
|
219
|
-
{% when 'h4' %}
|
|
220
|
-
{% render 'zz-h4',
|
|
221
|
-
title: block.settings.pc_title,
|
|
222
|
-
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
223
|
-
title_color: block.settings.text_color,
|
|
224
|
-
title_color_gradient: block.settings.text_gradient,
|
|
225
|
-
italic: block.settings.italic,
|
|
226
|
-
class_name: animation_class,
|
|
227
|
-
font_weight: block.settings.pc_font_weight,
|
|
228
|
-
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
229
|
-
font_weight_mb: block.settings.mobile_font_weight,
|
|
230
|
-
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
231
|
-
%}
|
|
232
|
-
{% when 'h5' %}
|
|
233
|
-
{% render 'zz-h5',
|
|
234
|
-
title: block.settings.pc_title,
|
|
235
|
-
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
236
|
-
title_color: block.settings.text_color,
|
|
237
|
-
title_color_gradient: block.settings.text_gradient,
|
|
238
|
-
italic: block.settings.italic,
|
|
239
|
-
class_name: animation_class,
|
|
240
|
-
font_weight: block.settings.pc_font_weight,
|
|
241
|
-
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
242
|
-
font_weight_mb: block.settings.mobile_font_weight,
|
|
243
|
-
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
244
|
-
%}
|
|
245
|
-
{% when 'h6' %}
|
|
246
|
-
{% render 'zz-h6',
|
|
247
|
-
title: block.settings.pc_title,
|
|
248
|
-
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
249
|
-
title_color: block.settings.text_color,
|
|
250
|
-
title_color_gradient: block.settings.text_gradient,
|
|
251
|
-
italic: block.settings.italic,
|
|
252
|
-
class_name: animation_class,
|
|
253
|
-
font_weight: block.settings.pc_font_weight,
|
|
254
|
-
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
255
|
-
font_weight_mb: block.settings.mobile_font_weight,
|
|
256
|
-
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
257
|
-
%}
|
|
258
|
-
{% endcase %}
|
|
259
|
-
|
|
260
|
-
<style>
|
|
261
|
-
#shopify-block-{{ block.id }} {
|
|
262
|
-
margin-top: {{ block.settings.mobile_margin_top }}px;
|
|
263
|
-
margin-bottom: {{ block.settings.mobile_margin_bottom }}px;
|
|
264
|
-
}
|
|
265
|
-
#shopify-block-{{ block.id }} .title-block {
|
|
266
|
-
text-align: {{ block.settings.mobile_align }};
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
@media (min-width: 1024px) {
|
|
270
|
-
#shopify-block-{{ block.id }} {
|
|
271
|
-
margin-top: {{ block.settings.pc_margin_top }}px;
|
|
272
|
-
margin-bottom: {{ block.settings.pc_margin_bottom }}px;
|
|
273
|
-
}
|
|
274
|
-
#shopify-block-{{ block.id }} .title-block {
|
|
275
|
-
text-align: {{ block.settings.pc_align }};
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
{% if block.settings.mb_special_settings %}
|
|
280
|
-
@media (max-width: 1023px) {
|
|
281
|
-
#shopify-block-{{ block.id }} .title-block {
|
|
282
|
-
font-size: {{ block.settings.mobile_font_size }}px;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
{% endif %}
|
|
286
|
-
|
|
287
|
-
</style>
|
|
1
|
+
{% schema %}
|
|
2
|
+
{
|
|
3
|
+
"name": "Title",
|
|
4
|
+
"class": "zz-title",
|
|
5
|
+
"settings": [
|
|
6
|
+
{
|
|
7
|
+
"type": "richtext",
|
|
8
|
+
"id": "pc_title",
|
|
9
|
+
"label": "PC标题内容 (PC Title Content)",
|
|
10
|
+
"default": "<p>这里是标题</p>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "richtext",
|
|
14
|
+
"id": "mb_title",
|
|
15
|
+
"label": "移动标题内容 (Mobile Title Content)",
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "select",
|
|
20
|
+
"id": "tag",
|
|
21
|
+
"label": "标题等级 (Heading Tag)",
|
|
22
|
+
"options": [
|
|
23
|
+
{ "value": "h2", "label": "二级标题 (H2)" },
|
|
24
|
+
{ "value": "h3", "label": "三级标题 (H3)" },
|
|
25
|
+
{ "value": "h4", "label": "四级标题 (H4)" },
|
|
26
|
+
{ "value": "h5", "label": "五级标题 (H5)" },
|
|
27
|
+
{ "value": "h6", "label": "六级标题 (H6)" },
|
|
28
|
+
],
|
|
29
|
+
"default": "h2"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "select",
|
|
33
|
+
"id": "pc_font_weight",
|
|
34
|
+
"label": "PC Font Weight",
|
|
35
|
+
"options": [
|
|
36
|
+
{ "value": "default", "label": "默认" },
|
|
37
|
+
{ "value": "custom", "label": "自定义" }
|
|
38
|
+
],
|
|
39
|
+
"default": "default"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "range",
|
|
43
|
+
"id": "pc_font_weight_custom",
|
|
44
|
+
"label": "PC Font Weight Custom",
|
|
45
|
+
"min": 100,
|
|
46
|
+
"max": 900,
|
|
47
|
+
"step": 100,
|
|
48
|
+
"default": 700,
|
|
49
|
+
"visible_if": "{{ block.settings.pc_font_weight == 'custom' }}"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "checkbox",
|
|
53
|
+
"id": "italic",
|
|
54
|
+
"label": "是否斜体 (Italic)",
|
|
55
|
+
"default": false
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
"type": "color",
|
|
60
|
+
"id": "text_color",
|
|
61
|
+
"label": "文字颜色",
|
|
62
|
+
"default": "#000000"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "text",
|
|
66
|
+
"id": "text_gradient",
|
|
67
|
+
"label": "文字渐变 (可选)"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "header",
|
|
71
|
+
"content": "💻 PC 样式设置"
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
{
|
|
75
|
+
"type": "select",
|
|
76
|
+
"id": "pc_align",
|
|
77
|
+
"label": "PC对齐方式 (Text Align)",
|
|
78
|
+
"options": [
|
|
79
|
+
{ "value": "left", "label": "左对齐 (Left)" },
|
|
80
|
+
{ "value": "center", "label": "居中对齐 (Center)" },
|
|
81
|
+
{ "value": "right", "label": "右对齐 (Right)" }
|
|
82
|
+
],
|
|
83
|
+
"default": "left"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "number",
|
|
87
|
+
"id": "pc_margin_top",
|
|
88
|
+
"label": "PC上外边距 (Margin Top)",
|
|
89
|
+
"default": 0
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "number",
|
|
93
|
+
"id": "pc_margin_bottom",
|
|
94
|
+
"label": "PC下外边距 (Margin Bottom)",
|
|
95
|
+
"default": 0
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "header",
|
|
99
|
+
"content": "📱 移动端样式设置"
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
"type": "select",
|
|
104
|
+
"id": "mobile_align",
|
|
105
|
+
"label": "移动对齐方式 (Text Align)",
|
|
106
|
+
"options": [
|
|
107
|
+
{ "value": "left", "label": "左对齐 (Left)" },
|
|
108
|
+
{ "value": "center", "label": "居中对齐 (Center)" },
|
|
109
|
+
{ "value": "right", "label": "右对齐 (Right)" }
|
|
110
|
+
],
|
|
111
|
+
"default": "left"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "number",
|
|
115
|
+
"id": "mobile_margin_top",
|
|
116
|
+
"label": "移动上外边距 (Margin Top)",
|
|
117
|
+
"default": 0
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "number",
|
|
121
|
+
"id": "mobile_margin_bottom",
|
|
122
|
+
"label": "移动下外边距 (Margin Bottom)",
|
|
123
|
+
"default": 0
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "checkbox",
|
|
127
|
+
"id": "mb_special_settings",
|
|
128
|
+
"label": "移动端特殊设置",
|
|
129
|
+
"default": false
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "range",
|
|
133
|
+
"id": "mobile_font_size",
|
|
134
|
+
"min": 8,
|
|
135
|
+
"max": 36,
|
|
136
|
+
"step": 1,
|
|
137
|
+
"unit": "px",
|
|
138
|
+
"label": "移动端字体大小",
|
|
139
|
+
"info": "移动端需要特殊设置时使用,默认根据选择标题等级自动设置",
|
|
140
|
+
"default": 28,
|
|
141
|
+
"visible_if": "{{ block.settings.mb_special_settings == true }}"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "select",
|
|
145
|
+
"id": "mobile_font_weight",
|
|
146
|
+
"label": "移动端字体粗细",
|
|
147
|
+
"options": [
|
|
148
|
+
{ "value": "default", "label": "默认" },
|
|
149
|
+
{ "value": "custom", "label": "自定义" }
|
|
150
|
+
],
|
|
151
|
+
"default": "default"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "range",
|
|
155
|
+
"id": "mobile_font_weight_custom",
|
|
156
|
+
"label": "移动端字体粗细自定义",
|
|
157
|
+
"min": 100,
|
|
158
|
+
"max": 900,
|
|
159
|
+
"step": 100,
|
|
160
|
+
"default": 700,
|
|
161
|
+
"visible_if": "{{ block.settings.mobile_font_weight == 'custom' }}"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "select",
|
|
165
|
+
"id": "animation",
|
|
166
|
+
"label": "动画",
|
|
167
|
+
"options": [
|
|
168
|
+
{ "value": "none-animation", "label": "无动画" },
|
|
169
|
+
{ "value": "fade-in-content", "label": "从下往上显示" },
|
|
170
|
+
{ "value": "fade-in-from-left-content", "label": "从左往右显示" },
|
|
171
|
+
{ "value": "fade-in-from-right-content", "label": "从右往左显示" },
|
|
172
|
+
{ "value": "slow-reveal-content", "label": "跟随页面滚动缓慢显示" }
|
|
173
|
+
],
|
|
174
|
+
"default": "none-animation"
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
"presets": [
|
|
178
|
+
{
|
|
179
|
+
"name": "Title"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "标题 h2-h4"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
}
|
|
186
|
+
{% endschema %}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
{% assign animation_class = block.settings.animation | append: ' title-block' %}
|
|
190
|
+
|
|
191
|
+
{% case block.settings.tag %}
|
|
192
|
+
{% when 'h2' %}
|
|
193
|
+
{% render 'zz-h2',
|
|
194
|
+
title: block.settings.pc_title,
|
|
195
|
+
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
196
|
+
title_color: block.settings.text_color,
|
|
197
|
+
title_color_gradient: block.settings.text_gradient,
|
|
198
|
+
italic: block.settings.italic,
|
|
199
|
+
class_name: animation_class,
|
|
200
|
+
font_weight: block.settings.pc_font_weight,
|
|
201
|
+
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
202
|
+
font_weight_mb: block.settings.mobile_font_weight,
|
|
203
|
+
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
204
|
+
%}
|
|
205
|
+
{% when 'h3' %}
|
|
206
|
+
{% render 'zz-h3',
|
|
207
|
+
title: block.settings.pc_title,
|
|
208
|
+
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
209
|
+
title_color: block.settings.text_color,
|
|
210
|
+
title_color_gradient: block.settings.text_gradient,
|
|
211
|
+
italic: block.settings.italic,
|
|
212
|
+
class_name: animation_class,
|
|
213
|
+
font_weight: block.settings.pc_font_weight,
|
|
214
|
+
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
215
|
+
font_weight_mb: block.settings.mobile_font_weight,
|
|
216
|
+
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
217
|
+
|
|
218
|
+
%}
|
|
219
|
+
{% when 'h4' %}
|
|
220
|
+
{% render 'zz-h4',
|
|
221
|
+
title: block.settings.pc_title,
|
|
222
|
+
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
223
|
+
title_color: block.settings.text_color,
|
|
224
|
+
title_color_gradient: block.settings.text_gradient,
|
|
225
|
+
italic: block.settings.italic,
|
|
226
|
+
class_name: animation_class,
|
|
227
|
+
font_weight: block.settings.pc_font_weight,
|
|
228
|
+
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
229
|
+
font_weight_mb: block.settings.mobile_font_weight,
|
|
230
|
+
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
231
|
+
%}
|
|
232
|
+
{% when 'h5' %}
|
|
233
|
+
{% render 'zz-h5',
|
|
234
|
+
title: block.settings.pc_title,
|
|
235
|
+
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
236
|
+
title_color: block.settings.text_color,
|
|
237
|
+
title_color_gradient: block.settings.text_gradient,
|
|
238
|
+
italic: block.settings.italic,
|
|
239
|
+
class_name: animation_class,
|
|
240
|
+
font_weight: block.settings.pc_font_weight,
|
|
241
|
+
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
242
|
+
font_weight_mb: block.settings.mobile_font_weight,
|
|
243
|
+
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
244
|
+
%}
|
|
245
|
+
{% when 'h6' %}
|
|
246
|
+
{% render 'zz-h6',
|
|
247
|
+
title: block.settings.pc_title,
|
|
248
|
+
title_mb: block.settings.mb_title | default: block.settings.pc_title,
|
|
249
|
+
title_color: block.settings.text_color,
|
|
250
|
+
title_color_gradient: block.settings.text_gradient,
|
|
251
|
+
italic: block.settings.italic,
|
|
252
|
+
class_name: animation_class,
|
|
253
|
+
font_weight: block.settings.pc_font_weight,
|
|
254
|
+
font_weight_custom: block.settings.pc_font_weight_custom,
|
|
255
|
+
font_weight_mb: block.settings.mobile_font_weight,
|
|
256
|
+
font_weight_mb_custom: block.settings.mobile_font_weight_custom
|
|
257
|
+
%}
|
|
258
|
+
{% endcase %}
|
|
259
|
+
|
|
260
|
+
<style>
|
|
261
|
+
#shopify-block-{{ block.id }} {
|
|
262
|
+
margin-top: {{ block.settings.mobile_margin_top }}px;
|
|
263
|
+
margin-bottom: {{ block.settings.mobile_margin_bottom }}px;
|
|
264
|
+
}
|
|
265
|
+
#shopify-block-{{ block.id }} .title-block {
|
|
266
|
+
text-align: {{ block.settings.mobile_align }};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@media (min-width: 1024px) {
|
|
270
|
+
#shopify-block-{{ block.id }} {
|
|
271
|
+
margin-top: {{ block.settings.pc_margin_top }}px;
|
|
272
|
+
margin-bottom: {{ block.settings.pc_margin_bottom }}px;
|
|
273
|
+
}
|
|
274
|
+
#shopify-block-{{ block.id }} .title-block {
|
|
275
|
+
text-align: {{ block.settings.pc_align }};
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
{% if block.settings.mb_special_settings %}
|
|
280
|
+
@media (max-width: 1023px) {
|
|
281
|
+
#shopify-block-{{ block.id }} .title-block {
|
|
282
|
+
font-size: {{ block.settings.mobile_font_size }}px;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
{% endif %}
|
|
286
|
+
|
|
287
|
+
</style>
|