zz-shopify-components 0.0.27 → 0.0.28-beta.10
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-button.liquid
CHANGED
|
@@ -1,216 +1,216 @@
|
|
|
1
|
-
|
|
2
|
-
{% schema %}
|
|
3
|
-
{
|
|
4
|
-
"name": "Button",
|
|
5
|
-
"settings": [
|
|
6
|
-
{
|
|
7
|
-
"type": "text",
|
|
8
|
-
"id": "text",
|
|
9
|
-
"label": "按钮文字",
|
|
10
|
-
"default": "按钮"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "select",
|
|
14
|
-
"id": "function_type",
|
|
15
|
-
"label": "功能类型",
|
|
16
|
-
"options": [
|
|
17
|
-
{
|
|
18
|
-
"value": "link",
|
|
19
|
-
"label": "链接"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"value": "link_map",
|
|
23
|
-
"label": "多国家映射"
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
"default": "link"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "url",
|
|
30
|
-
"id": "url",
|
|
31
|
-
"label": "按钮链接",
|
|
32
|
-
"visible_if": "{{ block.settings.function_type == 'link' }}"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "textarea",
|
|
36
|
-
"id": "links",
|
|
37
|
-
"label": "Sites Link Map",
|
|
38
|
-
"info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
|
|
39
|
-
"visible_if": "{{ block.settings.function_type == 'link_map' }}"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "select",
|
|
43
|
-
"id": "type",
|
|
44
|
-
"label": "按钮类型",
|
|
45
|
-
"options": [
|
|
46
|
-
{
|
|
47
|
-
"value": "primary",
|
|
48
|
-
"label": "primary"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"value": "default",
|
|
52
|
-
"label": "default"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"value": "round",
|
|
56
|
-
"label": "round"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"value": "link",
|
|
60
|
-
"label": "link"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"value": "primary-round",
|
|
64
|
-
"label": "primary-round"
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
"default": "primary"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "select",
|
|
71
|
-
"id": "color",
|
|
72
|
-
"label": "按钮颜色",
|
|
73
|
-
"options": [
|
|
74
|
-
{
|
|
75
|
-
"value": "black",
|
|
76
|
-
"label": "black"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"value": "white",
|
|
80
|
-
"label": "white"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"value": "orange",
|
|
84
|
-
"label": "orange"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"default": "black",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "select",
|
|
91
|
-
"id": "size",
|
|
92
|
-
"label": "按钮大小",
|
|
93
|
-
"options": [
|
|
94
|
-
{
|
|
95
|
-
"value": "large",
|
|
96
|
-
"label": "large"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"value": "medium",
|
|
100
|
-
"label": "medium"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"value": "small",
|
|
104
|
-
"label": "small"
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
"default": "medium"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"type": "select",
|
|
111
|
-
"id": "mobile_width",
|
|
112
|
-
"label": "移动端按钮宽度",
|
|
113
|
-
"options": [
|
|
114
|
-
{ "value": "full", "label": "全宽" },
|
|
115
|
-
{ "value": "auto", "label": "自动" }
|
|
116
|
-
],
|
|
117
|
-
"default": "auto"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"type": "select",
|
|
121
|
-
"id": "postfix_icon",
|
|
122
|
-
"label": "后缀图标",
|
|
123
|
-
"options": [
|
|
124
|
-
{ "value": "none", "label": "不展示" },
|
|
125
|
-
{ "value": "download", "label": "下载" },
|
|
126
|
-
{ "value": "arrow-right", "label": "向右箭头" }
|
|
127
|
-
],
|
|
128
|
-
"default": "none"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"type": "number",
|
|
132
|
-
"id": "icon_size",
|
|
133
|
-
"label": "图标大小(px)",
|
|
134
|
-
"default": 15
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"type": "number",
|
|
138
|
-
"id": "icon_left_margin",
|
|
139
|
-
"label": "图标左边距(px)",
|
|
140
|
-
"default": 0
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"type": "number",
|
|
144
|
-
"id": "icon_right_margin",
|
|
145
|
-
"label": "图标右边距(px)",
|
|
146
|
-
"default": 0
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"type": "text",
|
|
150
|
-
"id": "click_event_class_name",
|
|
151
|
-
"label": "点击事件统计 classname",
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"presets": [
|
|
155
|
-
{
|
|
156
|
-
"name": "Button"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"name": "按钮"
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
}
|
|
163
|
-
{% endschema %}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
{% assign btn_class = 'zz-button' | append: block.id %}
|
|
167
|
-
|
|
168
|
-
<style>
|
|
169
|
-
|
|
170
|
-
{% if block.settings.mobile_width == 'full' %}
|
|
171
|
-
@media (max-width: 1024px) {
|
|
172
|
-
#shopify-block-{{ block.id }} {
|
|
173
|
-
width: 100%;
|
|
174
|
-
box-sizing: border-box;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
{% endif %}
|
|
178
|
-
</style>
|
|
179
|
-
|
|
180
|
-
{% render 'zz-button',
|
|
181
|
-
href: block.settings.url,
|
|
182
|
-
type: block.settings.type,
|
|
183
|
-
color: block.settings.color,
|
|
184
|
-
text: block.settings.text,
|
|
185
|
-
size: block.settings.size,
|
|
186
|
-
postfix_icon: block.settings.postfix_icon,
|
|
187
|
-
icon_size: block.settings.icon_size,
|
|
188
|
-
icon_left_margin: block.settings.icon_left_margin,
|
|
189
|
-
icon_right_margin: block.settings.icon_right_margin,
|
|
190
|
-
width: block.settings.mobile_width,
|
|
191
|
-
class_name: btn_class
|
|
192
|
-
%}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
<script>
|
|
197
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
198
|
-
const btn = document.getElementsByClassName('{{ btn_class }}')
|
|
199
|
-
if(btn && btn[0]) {
|
|
200
|
-
btn[0].addEventListener('click', (event) => {
|
|
201
|
-
dataLayer.push({
|
|
202
|
-
event: "{{ block.settings.click_event_class_name }}",
|
|
203
|
-
timestamp: new Date().toISOString(),
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
{% if block.settings.function_type == 'link_map' %}
|
|
207
|
-
if(window.bindSiteJump) {
|
|
208
|
-
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
209
|
-
}
|
|
210
|
-
{% endif %}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
})
|
|
214
|
-
</script>
|
|
215
|
-
|
|
216
|
-
|
|
1
|
+
|
|
2
|
+
{% schema %}
|
|
3
|
+
{
|
|
4
|
+
"name": "Button",
|
|
5
|
+
"settings": [
|
|
6
|
+
{
|
|
7
|
+
"type": "text",
|
|
8
|
+
"id": "text",
|
|
9
|
+
"label": "按钮文字",
|
|
10
|
+
"default": "按钮"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "select",
|
|
14
|
+
"id": "function_type",
|
|
15
|
+
"label": "功能类型",
|
|
16
|
+
"options": [
|
|
17
|
+
{
|
|
18
|
+
"value": "link",
|
|
19
|
+
"label": "链接"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"value": "link_map",
|
|
23
|
+
"label": "多国家映射"
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
"default": "link"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "url",
|
|
30
|
+
"id": "url",
|
|
31
|
+
"label": "按钮链接",
|
|
32
|
+
"visible_if": "{{ block.settings.function_type == 'link' }}"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "textarea",
|
|
36
|
+
"id": "links",
|
|
37
|
+
"label": "Sites Link Map",
|
|
38
|
+
"info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
|
|
39
|
+
"visible_if": "{{ block.settings.function_type == 'link_map' }}"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "select",
|
|
43
|
+
"id": "type",
|
|
44
|
+
"label": "按钮类型",
|
|
45
|
+
"options": [
|
|
46
|
+
{
|
|
47
|
+
"value": "primary",
|
|
48
|
+
"label": "primary"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"value": "default",
|
|
52
|
+
"label": "default"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"value": "round",
|
|
56
|
+
"label": "round"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"value": "link",
|
|
60
|
+
"label": "link"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"value": "primary-round",
|
|
64
|
+
"label": "primary-round"
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
"default": "primary"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "select",
|
|
71
|
+
"id": "color",
|
|
72
|
+
"label": "按钮颜色",
|
|
73
|
+
"options": [
|
|
74
|
+
{
|
|
75
|
+
"value": "black",
|
|
76
|
+
"label": "black"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"value": "white",
|
|
80
|
+
"label": "white"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"value": "orange",
|
|
84
|
+
"label": "orange"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"default": "black",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "select",
|
|
91
|
+
"id": "size",
|
|
92
|
+
"label": "按钮大小",
|
|
93
|
+
"options": [
|
|
94
|
+
{
|
|
95
|
+
"value": "large",
|
|
96
|
+
"label": "large"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"value": "medium",
|
|
100
|
+
"label": "medium"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"value": "small",
|
|
104
|
+
"label": "small"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"default": "medium"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "select",
|
|
111
|
+
"id": "mobile_width",
|
|
112
|
+
"label": "移动端按钮宽度",
|
|
113
|
+
"options": [
|
|
114
|
+
{ "value": "full", "label": "全宽" },
|
|
115
|
+
{ "value": "auto", "label": "自动" }
|
|
116
|
+
],
|
|
117
|
+
"default": "auto"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "select",
|
|
121
|
+
"id": "postfix_icon",
|
|
122
|
+
"label": "后缀图标",
|
|
123
|
+
"options": [
|
|
124
|
+
{ "value": "none", "label": "不展示" },
|
|
125
|
+
{ "value": "download", "label": "下载" },
|
|
126
|
+
{ "value": "arrow-right", "label": "向右箭头" }
|
|
127
|
+
],
|
|
128
|
+
"default": "none"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "number",
|
|
132
|
+
"id": "icon_size",
|
|
133
|
+
"label": "图标大小(px)",
|
|
134
|
+
"default": 15
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "number",
|
|
138
|
+
"id": "icon_left_margin",
|
|
139
|
+
"label": "图标左边距(px)",
|
|
140
|
+
"default": 0
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "number",
|
|
144
|
+
"id": "icon_right_margin",
|
|
145
|
+
"label": "图标右边距(px)",
|
|
146
|
+
"default": 0
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "text",
|
|
150
|
+
"id": "click_event_class_name",
|
|
151
|
+
"label": "点击事件统计 classname",
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"presets": [
|
|
155
|
+
{
|
|
156
|
+
"name": "Button"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "按钮"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
{% endschema %}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
{% assign btn_class = 'zz-button' | append: block.id %}
|
|
167
|
+
|
|
168
|
+
<style>
|
|
169
|
+
|
|
170
|
+
{% if block.settings.mobile_width == 'full' %}
|
|
171
|
+
@media (max-width: 1024px) {
|
|
172
|
+
#shopify-block-{{ block.id }} {
|
|
173
|
+
width: 100%;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
{% endif %}
|
|
178
|
+
</style>
|
|
179
|
+
|
|
180
|
+
{% render 'zz-button',
|
|
181
|
+
href: block.settings.url,
|
|
182
|
+
type: block.settings.type,
|
|
183
|
+
color: block.settings.color,
|
|
184
|
+
text: block.settings.text,
|
|
185
|
+
size: block.settings.size,
|
|
186
|
+
postfix_icon: block.settings.postfix_icon,
|
|
187
|
+
icon_size: block.settings.icon_size,
|
|
188
|
+
icon_left_margin: block.settings.icon_left_margin,
|
|
189
|
+
icon_right_margin: block.settings.icon_right_margin,
|
|
190
|
+
width: block.settings.mobile_width,
|
|
191
|
+
class_name: btn_class
|
|
192
|
+
%}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<script>
|
|
197
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
|
198
|
+
const btn = document.getElementsByClassName('{{ btn_class }}')
|
|
199
|
+
if(btn && btn[0]) {
|
|
200
|
+
btn[0].addEventListener('click', (event) => {
|
|
201
|
+
dataLayer.push({
|
|
202
|
+
event: "{{ block.settings.click_event_class_name }}",
|
|
203
|
+
timestamp: new Date().toISOString(),
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
{% if block.settings.function_type == 'link_map' %}
|
|
207
|
+
if(window.bindSiteJump) {
|
|
208
|
+
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
209
|
+
}
|
|
210
|
+
{% endif %}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
})
|
|
214
|
+
</script>
|
|
215
|
+
|
|
216
|
+
|