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,84 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
{% schema %}
|
|
3
|
-
{
|
|
4
|
-
"name": "Video Button",
|
|
5
|
-
"settings": [
|
|
6
|
-
{
|
|
7
|
-
"type": "text",
|
|
8
|
-
"id": "text",
|
|
9
|
-
"label": "按钮文字",
|
|
10
|
-
"default": "按钮"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"type": "video",
|
|
14
|
-
"id": "video_pc",
|
|
15
|
-
"label": "视频"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "image_picker",
|
|
19
|
-
"id": "poster_pc",
|
|
20
|
-
"label": "视频 封面"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"type": "select",
|
|
24
|
-
"id": "color",
|
|
25
|
-
"label": "按钮颜色",
|
|
26
|
-
"options": [
|
|
27
|
-
{
|
|
28
|
-
"value": "black",
|
|
29
|
-
"label": "black"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"value": "white",
|
|
33
|
-
"label": "white"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"value": "orange",
|
|
37
|
-
"label": "orange"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"default": "white",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "select",
|
|
44
|
-
"id": "size",
|
|
45
|
-
"label": "按钮大小",
|
|
46
|
-
"options": [
|
|
47
|
-
{
|
|
48
|
-
"value": "large",
|
|
49
|
-
"label": "large"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"value": "medium",
|
|
53
|
-
"label": "medium"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"value": "small",
|
|
57
|
-
"label": "small"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"default": "medium"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"presets": [
|
|
64
|
-
{
|
|
65
|
-
"name": "Video Button"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "视频按钮",
|
|
69
|
-
"settings": {
|
|
70
|
-
"text": "watch video",
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
{% endschema %}
|
|
76
|
-
|
|
77
|
-
{% render 'zz-video-button',
|
|
78
|
-
video: block.settings.video_pc,
|
|
79
|
-
poster: block.settings.poster_pc,
|
|
80
|
-
color: block.settings.color,
|
|
81
|
-
text: block.settings.text,
|
|
82
|
-
size: block.settings.size
|
|
83
|
-
%}
|
|
84
|
-
|
|
1
|
+
|
|
2
|
+
{% schema %}
|
|
3
|
+
{
|
|
4
|
+
"name": "Video Button",
|
|
5
|
+
"settings": [
|
|
6
|
+
{
|
|
7
|
+
"type": "text",
|
|
8
|
+
"id": "text",
|
|
9
|
+
"label": "按钮文字",
|
|
10
|
+
"default": "按钮"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "video",
|
|
14
|
+
"id": "video_pc",
|
|
15
|
+
"label": "视频"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "image_picker",
|
|
19
|
+
"id": "poster_pc",
|
|
20
|
+
"label": "视频 封面"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "select",
|
|
24
|
+
"id": "color",
|
|
25
|
+
"label": "按钮颜色",
|
|
26
|
+
"options": [
|
|
27
|
+
{
|
|
28
|
+
"value": "black",
|
|
29
|
+
"label": "black"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"value": "white",
|
|
33
|
+
"label": "white"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"value": "orange",
|
|
37
|
+
"label": "orange"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"default": "white",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "select",
|
|
44
|
+
"id": "size",
|
|
45
|
+
"label": "按钮大小",
|
|
46
|
+
"options": [
|
|
47
|
+
{
|
|
48
|
+
"value": "large",
|
|
49
|
+
"label": "large"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"value": "medium",
|
|
53
|
+
"label": "medium"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": "small",
|
|
57
|
+
"label": "small"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"default": "medium"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"presets": [
|
|
64
|
+
{
|
|
65
|
+
"name": "Video Button"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "视频按钮",
|
|
69
|
+
"settings": {
|
|
70
|
+
"text": "watch video",
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
{% endschema %}
|
|
76
|
+
|
|
77
|
+
{% render 'zz-video-button',
|
|
78
|
+
video: block.settings.video_pc,
|
|
79
|
+
poster: block.settings.poster_pc,
|
|
80
|
+
color: block.settings.color,
|
|
81
|
+
text: block.settings.text,
|
|
82
|
+
size: block.settings.size
|
|
83
|
+
%}
|
|
84
|
+
|
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
@media screen and (max-width: 750px) {
|
|
3
|
-
#shopify-block-{{block.id}} {
|
|
4
|
-
width: calc(100% - 72px);
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
transform: translateX(-18px);
|
|
7
|
-
}
|
|
8
|
-
#shopify-block-{{block.id}} .image-video-box {
|
|
9
|
-
width: 100%;
|
|
10
|
-
aspect-ratio: 3 / 4;
|
|
11
|
-
object-fit: cover;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
@media screen and (min-width: 750px) {
|
|
15
|
-
#shopify-block-{{block.id}} {
|
|
16
|
-
width: 318px;
|
|
17
|
-
}
|
|
18
|
-
#shopify-block-{{block.id}} .image-video-box {
|
|
19
|
-
width: 100%;
|
|
20
|
-
aspect-ratio: 9 / 16;
|
|
21
|
-
object-fit: cover;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
#shopify-block-{{block.id}} .media-box {
|
|
26
|
-
{% if block.settings.has_link %}
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
{% endif %}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
</style>
|
|
32
|
-
|
|
33
|
-
{% assign media_class = 'zz-link-' | append: block.id %}
|
|
34
|
-
|
|
35
|
-
<div class='media-box banner-item {{ media_class }} max-md:tw-rounded-[12px] md:tw-rounded-[16px]'>
|
|
36
|
-
{% if block.settings.video_pc != blank %}
|
|
37
|
-
{% if block.settings.video_url_pc != blank %}
|
|
38
|
-
{% assign pc_video = block.settings.video_url_pc %}
|
|
39
|
-
{% else %}
|
|
40
|
-
{% assign pc_video = block.settings.video_pc %}
|
|
41
|
-
{% endif %}
|
|
42
|
-
{% render 'zz-video-md',
|
|
43
|
-
pc_video: pc_video,
|
|
44
|
-
pc_poster: block.settings.poster_pc,
|
|
45
|
-
mb_video: block.settings.video_mb,
|
|
46
|
-
mb_poster: block.settings.poster_mb,
|
|
47
|
-
lazy: true,
|
|
48
|
-
class: 'image-video-box tw-w-full tw-h-auto max-md:tw-rounded-[12px] md:tw-rounded-[16px]',
|
|
49
|
-
autoplay: true,
|
|
50
|
-
muted: true,
|
|
51
|
-
loop: true
|
|
52
|
-
%}
|
|
53
|
-
{% else %}
|
|
54
|
-
{%
|
|
55
|
-
render 'zz-img-md',
|
|
56
|
-
pc_image: block.settings.poster_pc,
|
|
57
|
-
mb_image: block.settings.poster_mb,
|
|
58
|
-
image_alt: block.settings.heading | escape,
|
|
59
|
-
class_name: 'image-video-box max-md:tw-rounded-[12px] md:tw-rounded-[16px]',
|
|
60
|
-
%}
|
|
61
|
-
{% endif %}
|
|
62
|
-
</div>
|
|
63
|
-
{% if block.settings.has_title_and_content %}
|
|
64
|
-
<div class='active-box-content md:tw-text-[20px] max-md:tw-text-[17px] max-md:tw-mt-[20px] md:tw-mt-[24px]'>
|
|
65
|
-
<div class="tw-text-left tw-font-bold max-md:tw-text-[17px] md:tw-text-[20px]" style="color: {{ block.settings.title_color }};">
|
|
66
|
-
{{ block.settings.heading }}
|
|
67
|
-
</div>
|
|
68
|
-
<div class='tw-mt-[12px] max-md:tw-text-[12px] md:tw-text-[14px] tw-leading-[1.5]' style="color: {{ block.settings.content_color }};">
|
|
69
|
-
{{ block.settings.row_content }}
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
{% endif %}
|
|
74
|
-
|
|
75
|
-
{% schema %}
|
|
76
|
-
{
|
|
77
|
-
"name": "ZZ Video Img Item",
|
|
78
|
-
"class": "zz-video-img-item",
|
|
79
|
-
"settings": [
|
|
80
|
-
{
|
|
81
|
-
"type": "text",
|
|
82
|
-
"id": "video_url_pc",
|
|
83
|
-
"label": "Video url PC",
|
|
84
|
-
"info": "使用cdn视频时,填写视频url。防止大屏幕视频模糊"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"type": "video",
|
|
88
|
-
"id": "video_pc",
|
|
89
|
-
"label": "Video"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"type": "image_picker",
|
|
93
|
-
"id": "poster_pc",
|
|
94
|
-
"label": "Poster"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "video",
|
|
98
|
-
"id": "video_mb",
|
|
99
|
-
"label": "Video(Mobile)"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"type": "image_picker",
|
|
103
|
-
"id": "poster_mb",
|
|
104
|
-
"label": "Poster(Mobile)"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"type": "checkbox",
|
|
108
|
-
"id": "has_title_and_content",
|
|
109
|
-
"label": "是否有标题与内容",
|
|
110
|
-
"default": true
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"type": "text",
|
|
114
|
-
"id": "heading",
|
|
115
|
-
"label": "标题",
|
|
116
|
-
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"type": "color",
|
|
120
|
-
"id": "title_color",
|
|
121
|
-
"default": "#ffffff",
|
|
122
|
-
"label": "标题颜色",
|
|
123
|
-
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"type": "richtext",
|
|
127
|
-
"id": "row_content",
|
|
128
|
-
"label": "description",
|
|
129
|
-
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"type": "color",
|
|
133
|
-
"id": "content_color",
|
|
134
|
-
"default": "#B2B2B2",
|
|
135
|
-
"label": "内容颜色",
|
|
136
|
-
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"type": "checkbox",
|
|
140
|
-
"id": "has_link",
|
|
141
|
-
"label": "是否有链接",
|
|
142
|
-
"default": false
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"type": "select",
|
|
146
|
-
"id": "function_type",
|
|
147
|
-
"label": "功能类型",
|
|
148
|
-
"options": [
|
|
149
|
-
{
|
|
150
|
-
"value": "link",
|
|
151
|
-
"label": "链接"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"value": "link_map",
|
|
155
|
-
"label": "多国家映射"
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
"default": "link",
|
|
159
|
-
"visible_if": "{{ block.settings.has_link == true }}"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"type": "url",
|
|
163
|
-
"id": "url",
|
|
164
|
-
"label": "链接",
|
|
165
|
-
"visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"type": "textarea",
|
|
169
|
-
"id": "links",
|
|
170
|
-
"label": "Sites Link Map",
|
|
171
|
-
"info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
|
|
172
|
-
"visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"presets": [
|
|
176
|
-
{
|
|
177
|
-
"name": "ZZ Video Img Item"
|
|
178
|
-
},
|
|
179
|
-
]
|
|
180
|
-
}
|
|
181
|
-
{% endschema %}
|
|
182
|
-
|
|
183
|
-
{% if block.settings.has_link %}
|
|
184
|
-
<script>
|
|
185
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
186
|
-
const btn = document.getElementsByClassName('{{ media_class }}')
|
|
187
|
-
if(btn && btn[0]) {
|
|
188
|
-
{% if block.settings.function_type == 'link_map' %}
|
|
189
|
-
if(window.bindSiteJump) {
|
|
190
|
-
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
191
|
-
}
|
|
192
|
-
{% else %}
|
|
193
|
-
// 监听点击事件
|
|
194
|
-
btn[0].addEventListener('click', (event) => {
|
|
195
|
-
event.preventDefault();
|
|
196
|
-
window.location.href = '{{ block.settings.url }}';
|
|
197
|
-
})
|
|
198
|
-
{% endif %}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
})
|
|
202
|
-
</script>
|
|
203
|
-
{% endif %}
|
|
1
|
+
<style>
|
|
2
|
+
@media screen and (max-width: 750px) {
|
|
3
|
+
#shopify-block-{{block.id}} {
|
|
4
|
+
width: calc(100% - 72px);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
transform: translateX(-18px);
|
|
7
|
+
}
|
|
8
|
+
#shopify-block-{{block.id}} .image-video-box {
|
|
9
|
+
width: 100%;
|
|
10
|
+
aspect-ratio: 3 / 4;
|
|
11
|
+
object-fit: cover;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@media screen and (min-width: 750px) {
|
|
15
|
+
#shopify-block-{{block.id}} {
|
|
16
|
+
width: 318px;
|
|
17
|
+
}
|
|
18
|
+
#shopify-block-{{block.id}} .image-video-box {
|
|
19
|
+
width: 100%;
|
|
20
|
+
aspect-ratio: 9 / 16;
|
|
21
|
+
object-fit: cover;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#shopify-block-{{block.id}} .media-box {
|
|
26
|
+
{% if block.settings.has_link %}
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
{% endif %}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
</style>
|
|
32
|
+
|
|
33
|
+
{% assign media_class = 'zz-link-' | append: block.id %}
|
|
34
|
+
|
|
35
|
+
<div class='media-box banner-item {{ media_class }} max-md:tw-rounded-[12px] md:tw-rounded-[16px]'>
|
|
36
|
+
{% if block.settings.video_pc != blank %}
|
|
37
|
+
{% if block.settings.video_url_pc != blank %}
|
|
38
|
+
{% assign pc_video = block.settings.video_url_pc %}
|
|
39
|
+
{% else %}
|
|
40
|
+
{% assign pc_video = block.settings.video_pc %}
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% render 'zz-video-md',
|
|
43
|
+
pc_video: pc_video,
|
|
44
|
+
pc_poster: block.settings.poster_pc,
|
|
45
|
+
mb_video: block.settings.video_mb,
|
|
46
|
+
mb_poster: block.settings.poster_mb,
|
|
47
|
+
lazy: true,
|
|
48
|
+
class: 'image-video-box tw-w-full tw-h-auto max-md:tw-rounded-[12px] md:tw-rounded-[16px]',
|
|
49
|
+
autoplay: true,
|
|
50
|
+
muted: true,
|
|
51
|
+
loop: true
|
|
52
|
+
%}
|
|
53
|
+
{% else %}
|
|
54
|
+
{%
|
|
55
|
+
render 'zz-img-md',
|
|
56
|
+
pc_image: block.settings.poster_pc,
|
|
57
|
+
mb_image: block.settings.poster_mb,
|
|
58
|
+
image_alt: block.settings.heading | escape,
|
|
59
|
+
class_name: 'image-video-box max-md:tw-rounded-[12px] md:tw-rounded-[16px]',
|
|
60
|
+
%}
|
|
61
|
+
{% endif %}
|
|
62
|
+
</div>
|
|
63
|
+
{% if block.settings.has_title_and_content %}
|
|
64
|
+
<div class='active-box-content md:tw-text-[20px] max-md:tw-text-[17px] max-md:tw-mt-[20px] md:tw-mt-[24px]'>
|
|
65
|
+
<div class="tw-text-left tw-font-bold max-md:tw-text-[17px] md:tw-text-[20px]" style="color: {{ block.settings.title_color }};">
|
|
66
|
+
{{ block.settings.heading }}
|
|
67
|
+
</div>
|
|
68
|
+
<div class='tw-mt-[12px] max-md:tw-text-[12px] md:tw-text-[14px] tw-leading-[1.5]' style="color: {{ block.settings.content_color }};">
|
|
69
|
+
{{ block.settings.row_content }}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
{% endif %}
|
|
74
|
+
|
|
75
|
+
{% schema %}
|
|
76
|
+
{
|
|
77
|
+
"name": "ZZ Video Img Item",
|
|
78
|
+
"class": "zz-video-img-item",
|
|
79
|
+
"settings": [
|
|
80
|
+
{
|
|
81
|
+
"type": "text",
|
|
82
|
+
"id": "video_url_pc",
|
|
83
|
+
"label": "Video url PC",
|
|
84
|
+
"info": "使用cdn视频时,填写视频url。防止大屏幕视频模糊"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "video",
|
|
88
|
+
"id": "video_pc",
|
|
89
|
+
"label": "Video"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "image_picker",
|
|
93
|
+
"id": "poster_pc",
|
|
94
|
+
"label": "Poster"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "video",
|
|
98
|
+
"id": "video_mb",
|
|
99
|
+
"label": "Video(Mobile)"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "image_picker",
|
|
103
|
+
"id": "poster_mb",
|
|
104
|
+
"label": "Poster(Mobile)"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "checkbox",
|
|
108
|
+
"id": "has_title_and_content",
|
|
109
|
+
"label": "是否有标题与内容",
|
|
110
|
+
"default": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "text",
|
|
114
|
+
"id": "heading",
|
|
115
|
+
"label": "标题",
|
|
116
|
+
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "color",
|
|
120
|
+
"id": "title_color",
|
|
121
|
+
"default": "#ffffff",
|
|
122
|
+
"label": "标题颜色",
|
|
123
|
+
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "richtext",
|
|
127
|
+
"id": "row_content",
|
|
128
|
+
"label": "description",
|
|
129
|
+
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "color",
|
|
133
|
+
"id": "content_color",
|
|
134
|
+
"default": "#B2B2B2",
|
|
135
|
+
"label": "内容颜色",
|
|
136
|
+
"visible_if": "{{ block.settings.has_title_and_content == true }}"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "checkbox",
|
|
140
|
+
"id": "has_link",
|
|
141
|
+
"label": "是否有链接",
|
|
142
|
+
"default": false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "select",
|
|
146
|
+
"id": "function_type",
|
|
147
|
+
"label": "功能类型",
|
|
148
|
+
"options": [
|
|
149
|
+
{
|
|
150
|
+
"value": "link",
|
|
151
|
+
"label": "链接"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"value": "link_map",
|
|
155
|
+
"label": "多国家映射"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"default": "link",
|
|
159
|
+
"visible_if": "{{ block.settings.has_link == true }}"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "url",
|
|
163
|
+
"id": "url",
|
|
164
|
+
"label": "链接",
|
|
165
|
+
"visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "textarea",
|
|
169
|
+
"id": "links",
|
|
170
|
+
"label": "Sites Link Map",
|
|
171
|
+
"info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
|
|
172
|
+
"visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"presets": [
|
|
176
|
+
{
|
|
177
|
+
"name": "ZZ Video Img Item"
|
|
178
|
+
},
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
{% endschema %}
|
|
182
|
+
|
|
183
|
+
{% if block.settings.has_link %}
|
|
184
|
+
<script>
|
|
185
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
|
186
|
+
const btn = document.getElementsByClassName('{{ media_class }}')
|
|
187
|
+
if(btn && btn[0]) {
|
|
188
|
+
{% if block.settings.function_type == 'link_map' %}
|
|
189
|
+
if(window.bindSiteJump) {
|
|
190
|
+
bindSiteJump(btn[0], {{ block.settings.links | json }})
|
|
191
|
+
}
|
|
192
|
+
{% else %}
|
|
193
|
+
// 监听点击事件
|
|
194
|
+
btn[0].addEventListener('click', (event) => {
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
window.location.href = '{{ block.settings.url }}';
|
|
197
|
+
})
|
|
198
|
+
{% endif %}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
})
|
|
202
|
+
</script>
|
|
203
|
+
{% endif %}
|