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.
- package/README.md +12 -0
- package/assets/fade-in-content.js +169 -0
- package/assets/gsap.min.js +11 -0
- package/assets/http-request.js +73 -0
- package/assets/jquery.js +2 -0
- package/assets/lozad.js +10 -0
- package/assets/site-jump.js +52 -0
- package/assets/site-jumpV2.js +35 -0
- package/assets/swiper-bundle.min.css +13 -0
- package/assets/swiper-bundle.min.js +14 -0
- package/assets/swiper.css +331 -0
- package/assets/zz-components.css +323 -0
- package/assets/zz-components.js +166 -0
- package/blocks/zz-accessories-item.liquid +183 -0
- package/blocks/zz-accessories-swiper.liquid +223 -0
- package/blocks/zz-button.liquid +189 -0
- package/blocks/zz-content-description-html.liquid +199 -0
- package/blocks/zz-content-description.liquid +200 -0
- package/blocks/zz-flex-layout-bg-block.liquid +520 -0
- package/blocks/zz-flex-layout-block.liquid +545 -0
- package/blocks/zz-flex-layout-widget.liquid +318 -0
- package/blocks/zz-full-screen-swiper.liquid +444 -0
- package/blocks/zz-icon.liquid +46 -0
- package/blocks/zz-mail.liquid +135 -0
- package/blocks/zz-mb-swiper-pc-flex.liquid +270 -0
- package/blocks/zz-ratio-image.liquid +177 -0
- package/blocks/zz-ratio-video.liquid +112 -0
- package/blocks/zz-responsive-width-image.liquid +219 -0
- package/blocks/zz-responsive-width-video.liquid +163 -0
- package/blocks/zz-scroll-animate-bg-text.liquid +265 -0
- package/blocks/zz-scroll-cover.liquid +64 -0
- package/blocks/zz-tag.liquid +48 -0
- package/blocks/zz-text.liquid +225 -0
- package/blocks/zz-title.liquid +284 -0
- package/blocks/zz-video-button.liquid +81 -0
- package/blocks/zz-video-swiper-perview-item.liquid +216 -0
- package/blocks/zz-video-swiper-perview.liquid +582 -0
- package/component.config.json +4 -0
- package/package.json +23 -0
- package/scripts/postinstall-v2.js +47 -0
- package/scripts/postinstall.js +39 -0
- package/sections/zz-flex-layout-section.liquid +266 -0
- package/sections/zz-navigation-tab-v3.liquid +403 -0
- package/sections/zz-navigation-tab.liquid +410 -0
- package/sections/zz-video-collapse-swiper.liquid +522 -0
- package/sections/zz-video-tab-swiper.liquid +745 -0
- package/snippets/zz-button.liquid +70 -0
- package/snippets/zz-content-text.liquid +56 -0
- package/snippets/zz-h2.liquid +31 -0
- package/snippets/zz-h3.liquid +31 -0
- package/snippets/zz-h4.liquid +30 -0
- package/snippets/zz-h5.liquid +39 -0
- package/snippets/zz-h6.liquid +39 -0
- package/snippets/zz-icon.liquid +74 -0
- package/snippets/zz-img.liquid +44 -0
- package/snippets/zz-prev-next-btn.liquid +62 -0
- package/snippets/zz-spoke.liquid +142 -0
- package/snippets/zz-tag.liquid +22 -0
- package/snippets/zz-video-button.liquid +55 -0
- package/snippets/zz-video-md.liquid +117 -0
- package/snippets/zz-video.liquid +117 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
{% assign block_size = block.blocks.size %}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<style>
|
|
6
|
+
#shopify-block-{{block.id}} {
|
|
7
|
+
background: {{ block.settings.bg_color }};
|
|
8
|
+
width: 100vw;
|
|
9
|
+
height: 100vh;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper {
|
|
15
|
+
width: 100vw;
|
|
16
|
+
height: 100vh;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
height: fit-content;
|
|
20
|
+
position: relative;
|
|
21
|
+
letter-spacing: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
#shopify-block-{{block.id}} .swiper-button-next:after,
|
|
26
|
+
#shopify-block-{{block.id}} .swiper-button-prev:after {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets {
|
|
30
|
+
bottom: 30px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet {
|
|
34
|
+
margin: 0 4px;
|
|
35
|
+
width: 24px;
|
|
36
|
+
height: 3px;
|
|
37
|
+
border-radius: 3px;
|
|
38
|
+
background: {{ block.settings.pagination_color | color_modify: 'alpha', 0.3 }};
|
|
39
|
+
opacity: 1;
|
|
40
|
+
transition: 0.3s;
|
|
41
|
+
}
|
|
42
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet-active {
|
|
43
|
+
position: relative;
|
|
44
|
+
width: 48px;
|
|
45
|
+
}
|
|
46
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet-active .progress-line {
|
|
47
|
+
display: block;
|
|
48
|
+
position: absolute;
|
|
49
|
+
left: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
width: 0;
|
|
52
|
+
background-color: {{ block.settings.pagination_color }};
|
|
53
|
+
border-radius: 3px;
|
|
54
|
+
height: 3px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media screen and (max-width: 1023px) {
|
|
58
|
+
#shopify-block-{{block.id}} .swiper-button-next,
|
|
59
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
@media screen and (min-width: 1024px) {
|
|
64
|
+
|
|
65
|
+
#shopify-block-{{block.id}} .swiper-button-next,
|
|
66
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
67
|
+
width: 48px;
|
|
68
|
+
height: 48px;
|
|
69
|
+
}
|
|
70
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
71
|
+
left: 20px;
|
|
72
|
+
top: 50%;
|
|
73
|
+
right: unset;
|
|
74
|
+
transform:translateY(-50%);
|
|
75
|
+
}
|
|
76
|
+
#shopify-block-{{block.id}} .swiper-button-next {
|
|
77
|
+
right: 20px;
|
|
78
|
+
left: unset;
|
|
79
|
+
top: 50%;
|
|
80
|
+
transform:translateY(-50%);
|
|
81
|
+
}
|
|
82
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet {
|
|
83
|
+
margin: 0 8px;
|
|
84
|
+
width: 48px;
|
|
85
|
+
height: 4px;
|
|
86
|
+
border-radius: 3px;
|
|
87
|
+
}
|
|
88
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet-active {
|
|
89
|
+
width: 120px;
|
|
90
|
+
}
|
|
91
|
+
#shopify-block-{{block.id}} .zz-full-screen-swiper .swiper-pagination-bullets .swiper-pagination-bullet-active .progress-line {
|
|
92
|
+
height: 4px;
|
|
93
|
+
border-radius: 3px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
</style>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<div
|
|
102
|
+
class='zz-full-screen-swiper zz-full-screen-swiper-{{ block.id }}'
|
|
103
|
+
>
|
|
104
|
+
<div class='zz-swiper-wrapper'>
|
|
105
|
+
{% content_for 'blocks' %}
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<!-- If we need navigation buttons -->
|
|
109
|
+
<div class='swiper-button-prev {% if block_size <= 1 %} tw-hidden {% endif %}'>
|
|
110
|
+
|
|
111
|
+
{% render 'zz-prev-next-btn', type: 'prev', color_type: block.settings.prev_next_type %}
|
|
112
|
+
</div>
|
|
113
|
+
<div class='swiper-button-next {% if block_size <= 1 %} tw-hidden {% endif %}'>
|
|
114
|
+
{% render 'zz-prev-next-btn', type: 'next', color_type: block.settings.prev_next_type %}
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<!-- Pagination indicator -->
|
|
118
|
+
<div class='swiper-pagination'></div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<script>
|
|
123
|
+
|
|
124
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
125
|
+
const block = document.getElementById(
|
|
126
|
+
'shopify-block-{{block.id}}'
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const swiperWrapper = block.querySelector('.zz-swiper-wrapper');
|
|
130
|
+
// 获取当前 swiper-wrapper 下面 所有 第一层 div
|
|
131
|
+
const swiperSlides = swiperWrapper.querySelectorAll(':scope > div');
|
|
132
|
+
// 给每个 swiper-slide 添加 class swiper-slide
|
|
133
|
+
swiperSlides.forEach(slide => {
|
|
134
|
+
slide.classList.add('swiper-slide');
|
|
135
|
+
});
|
|
136
|
+
swiperWrapper.classList.add('swiper-wrapper');
|
|
137
|
+
let progressTimer = null;
|
|
138
|
+
const swiperClassName = '.zz-full-screen-swiper-{{ block.id }}';
|
|
139
|
+
const fullScreenSwiper = new Swiper(swiperClassName, {
|
|
140
|
+
loop: true,
|
|
141
|
+
slidesPerView: 1,
|
|
142
|
+
centeredSlides: true,
|
|
143
|
+
navigation: {
|
|
144
|
+
nextEl: '.swiper-button-next',
|
|
145
|
+
prevEl: '.swiper-button-prev',
|
|
146
|
+
},
|
|
147
|
+
pagination: {
|
|
148
|
+
el: '.swiper-pagination',
|
|
149
|
+
clickable: true,
|
|
150
|
+
renderBullet: function (index, className) {
|
|
151
|
+
return `
|
|
152
|
+
<span class="${className}">
|
|
153
|
+
<span class="progress-line"></span>
|
|
154
|
+
</span>`;
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
effect: 'slide',
|
|
158
|
+
on: {
|
|
159
|
+
slideChangeTransitionEnd: function () {
|
|
160
|
+
block.querySelectorAll(".swiper-pagination-bullet").forEach((bullet) => {
|
|
161
|
+
console.log('do reset')
|
|
162
|
+
const progressBar = bullet.querySelector(".progress-line");
|
|
163
|
+
progressBar.style.transition = "none";
|
|
164
|
+
progressBar.style.width = "0";
|
|
165
|
+
});
|
|
166
|
+
handleVideoOnSlideChange();
|
|
167
|
+
},
|
|
168
|
+
slideChangeTransitionStart: function () {
|
|
169
|
+
console.log('do slideChangeTransitionStart')
|
|
170
|
+
if (progressTimer) {
|
|
171
|
+
clearInterval(progressTimer);
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
handleVideoOnSlideChange();
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
function getVisibleDisplayMedias(container) {
|
|
180
|
+
const videos = container.querySelectorAll('video');
|
|
181
|
+
const video = Array.from(videos).find((video) => {
|
|
182
|
+
const style = window.getComputedStyle(video);
|
|
183
|
+
return style.display !== 'none';
|
|
184
|
+
});
|
|
185
|
+
if (video) {
|
|
186
|
+
return {
|
|
187
|
+
video,
|
|
188
|
+
type: 'video'
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
const images = container.querySelectorAll('img');
|
|
192
|
+
const image = Array.from(images).find((image) => {
|
|
193
|
+
const style = window.getComputedStyle(image);
|
|
194
|
+
return style.display !== 'none';
|
|
195
|
+
});
|
|
196
|
+
if (image) {
|
|
197
|
+
return {
|
|
198
|
+
image,
|
|
199
|
+
type: 'image'
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
const endedHandler = function() {
|
|
206
|
+
|
|
207
|
+
fullScreenSwiper.slideNext();
|
|
208
|
+
if (progressTimer) {
|
|
209
|
+
clearInterval(progressTimer);
|
|
210
|
+
}
|
|
211
|
+
this.removeEventListener('ended', endedHandler);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
function updataMediaProgress(type, videoDom) {
|
|
215
|
+
console.log('do updataMediaProgress')
|
|
216
|
+
const activeBullet = block.querySelector(".swiper-pagination-bullet-active");
|
|
217
|
+
const progressBar = activeBullet.querySelector(".progress-line");
|
|
218
|
+
if (progressBar) {
|
|
219
|
+
if (type === 'video') {
|
|
220
|
+
if (progressTimer) {
|
|
221
|
+
clearInterval(progressTimer);
|
|
222
|
+
}
|
|
223
|
+
// 添加新的事件监听器
|
|
224
|
+
progressTimer = setInterval(() => {
|
|
225
|
+
const progress = videoDom.currentTime / videoDom.duration;
|
|
226
|
+
progressBar.style.transition = "0.2s";
|
|
227
|
+
progressBar.style.width = `${progress * 100}%`;
|
|
228
|
+
}, 100);
|
|
229
|
+
videoDom.addEventListener('ended', endedHandler);
|
|
230
|
+
} else if (type === 'image') {
|
|
231
|
+
console.log('do animate')
|
|
232
|
+
progressBar.style.transition = "15s";
|
|
233
|
+
progressBar.style.width = "100%";
|
|
234
|
+
setTimeout(() => {
|
|
235
|
+
fullScreenSwiper.slideNext();
|
|
236
|
+
}, 15000);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function handleVideoOnSlideChange() {
|
|
242
|
+
|
|
243
|
+
const activeSlide = block.querySelector('.swiper-slide-active');
|
|
244
|
+
const media = getVisibleDisplayMedias(activeSlide);
|
|
245
|
+
const activeBullet = block.querySelector(".swiper-pagination-bullet-active");
|
|
246
|
+
const progressBar = activeBullet.querySelector(".progress-line");
|
|
247
|
+
if (progressBar) {
|
|
248
|
+
console.log('do reset 1')
|
|
249
|
+
progressBar.style.transition = "none";
|
|
250
|
+
progressBar.style.width = "0";
|
|
251
|
+
}
|
|
252
|
+
if (media.type === 'video') {
|
|
253
|
+
media.video.currentTime = 0;
|
|
254
|
+
updataMediaProgress('video', media.video);
|
|
255
|
+
} else if (media.type === 'image') {
|
|
256
|
+
// 处理图片的情况
|
|
257
|
+
updataMediaProgress('image', media.image);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
</script>
|
|
262
|
+
|
|
263
|
+
{% schema %}
|
|
264
|
+
{
|
|
265
|
+
"name": "Full Screen Swiper",
|
|
266
|
+
"class": "zz-full-screen-swiper-block",
|
|
267
|
+
"settings": [
|
|
268
|
+
{
|
|
269
|
+
"type": "color",
|
|
270
|
+
"id": "bg_color",
|
|
271
|
+
"default": "#ffffff",
|
|
272
|
+
"label": "背景色"
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
{
|
|
276
|
+
"type": "color",
|
|
277
|
+
"id": "pagination_color",
|
|
278
|
+
"default": "#ffffff",
|
|
279
|
+
"label": "轮播导航圆圈颜色"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"type": "select",
|
|
283
|
+
"id": "prev_next_type",
|
|
284
|
+
"label": "prev next 颜色",
|
|
285
|
+
"options": [
|
|
286
|
+
{ "value": "dark", "label": "黑色" },
|
|
287
|
+
{ "value": "light", "label": "白色" },
|
|
288
|
+
],
|
|
289
|
+
"default": "dark"
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
"blocks": [
|
|
293
|
+
{
|
|
294
|
+
"type": "zz-flex-layout-bg-block",
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"presets": [
|
|
298
|
+
{
|
|
299
|
+
"name": "全屏轮播组件",
|
|
300
|
+
"settings": {
|
|
301
|
+
"bg_color": "#ffffff",
|
|
302
|
+
"pagination_color": "#ffffff",
|
|
303
|
+
"prev_next_type": "dark"
|
|
304
|
+
},
|
|
305
|
+
"blocks": [
|
|
306
|
+
{
|
|
307
|
+
"type": "zz-flex-layout-bg-block",
|
|
308
|
+
"settings": {
|
|
309
|
+
"background_color": "rgba(0,0,0,0)",
|
|
310
|
+
"bg_type": "image",
|
|
311
|
+
"full_screen_bg": true,
|
|
312
|
+
"pc_background_image": "shopify://shop_images/preset_pc_full_bg_pic.png",
|
|
313
|
+
"mobile_background_image": "shopify://shop_images/preset_mobile_full_bg_pic.png",
|
|
314
|
+
"pc_background_video_url": "",
|
|
315
|
+
"video_loop": false,
|
|
316
|
+
"pc_direction": "column",
|
|
317
|
+
"pc_gap": 40,
|
|
318
|
+
"pc_justify": "center",
|
|
319
|
+
"pc_align": "flex-start",
|
|
320
|
+
"pc_padding_top": 0,
|
|
321
|
+
"pc_padding_bottom": 0,
|
|
322
|
+
"pc_full_width": false,
|
|
323
|
+
"pc_xl_width": 1200,
|
|
324
|
+
"pc_lg_width": 90,
|
|
325
|
+
"mobile_direction": "column",
|
|
326
|
+
"mobile_gap": 20,
|
|
327
|
+
"mobile_justify": "flex-end",
|
|
328
|
+
"mobile_align": "center",
|
|
329
|
+
"mobile_padding_bottom": 100,
|
|
330
|
+
},
|
|
331
|
+
"blocks": [
|
|
332
|
+
{
|
|
333
|
+
"type": "zz-responsive-width-image",
|
|
334
|
+
"settings": {
|
|
335
|
+
"desktop_image": "shopify://shop_images/1_521b8e7f-8da9-4df0-9ee1-10a25ee62323.png",
|
|
336
|
+
"desktop_width_xl": 322,
|
|
337
|
+
"desktop_width_lg": 322,
|
|
338
|
+
"desktop_border_radius": 0,
|
|
339
|
+
"mobile_image": "shopify://shop_images/12_5bbff2ea-19fe-46e1-944b-f78a79ae2d4a.png",
|
|
340
|
+
"mb_width_type": "mb_use_padding",
|
|
341
|
+
"mobile_padding_x": 60,
|
|
342
|
+
"mobile_width": 60,
|
|
343
|
+
"mb_width_px": 100,
|
|
344
|
+
"mobile_border_radius": 0,
|
|
345
|
+
"alt": "image loading",
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"type": "zz-title",
|
|
350
|
+
"settings": {
|
|
351
|
+
"pc_title": "<p>OFFICIAL FLYING CAMERA OF<br/>USA CYCLING TEAM</p>",
|
|
352
|
+
"mb_title": "<p>OFFICIAL FLYING CAMERA OF<br/>USA CYCLING TEAM</p>",
|
|
353
|
+
"tag": "h3",
|
|
354
|
+
"text_color": "#ffffff",
|
|
355
|
+
"pc_align": "left",
|
|
356
|
+
"mobile_align": "center",
|
|
357
|
+
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"type": "zz-button",
|
|
362
|
+
"settings": {
|
|
363
|
+
"text": "Buy Now",
|
|
364
|
+
"function_type": "link_map",
|
|
365
|
+
"type": "primary",
|
|
366
|
+
"color": "white",
|
|
367
|
+
"size": "medium"
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"type": "zz-flex-layout-bg-block",
|
|
375
|
+
"settings": {
|
|
376
|
+
"background_color": "rgba(0,0,0,0)",
|
|
377
|
+
"bg_type": "image",
|
|
378
|
+
"full_screen_bg": true,
|
|
379
|
+
"pc_background_image": "shopify://shop_images/preset_pc_full_bg_pic.png",
|
|
380
|
+
"mobile_background_image": "shopify://shop_images/preset_mobile_full_bg_pic.png",
|
|
381
|
+
"pc_background_video_url": "",
|
|
382
|
+
"video_loop": false,
|
|
383
|
+
"pc_direction": "column",
|
|
384
|
+
"pc_gap": 40,
|
|
385
|
+
"pc_justify": "center",
|
|
386
|
+
"pc_align": "flex-start",
|
|
387
|
+
"pc_padding_top": 0,
|
|
388
|
+
"pc_padding_bottom": 0,
|
|
389
|
+
"pc_full_width": false,
|
|
390
|
+
"pc_xl_width": 1200,
|
|
391
|
+
"pc_lg_width": 90,
|
|
392
|
+
"mobile_direction": "column",
|
|
393
|
+
"mobile_gap": 20,
|
|
394
|
+
"mobile_justify": "flex-end",
|
|
395
|
+
"mobile_align": "center",
|
|
396
|
+
"mobile_padding_bottom": 100,
|
|
397
|
+
},
|
|
398
|
+
"blocks": [
|
|
399
|
+
{
|
|
400
|
+
"type": "zz-responsive-width-image",
|
|
401
|
+
"settings": {
|
|
402
|
+
"desktop_image": "shopify://shop_images/1_521b8e7f-8da9-4df0-9ee1-10a25ee62323.png",
|
|
403
|
+
"desktop_width_xl": 322,
|
|
404
|
+
"desktop_width_lg": 322,
|
|
405
|
+
"desktop_border_radius": 0,
|
|
406
|
+
"mobile_image": "shopify://shop_images/12_5bbff2ea-19fe-46e1-944b-f78a79ae2d4a.png",
|
|
407
|
+
"mb_width_type": "mb_use_padding",
|
|
408
|
+
"mobile_padding_x": 60,
|
|
409
|
+
"mobile_width": 60,
|
|
410
|
+
"mb_width_px": 100,
|
|
411
|
+
"mobile_border_radius": 0,
|
|
412
|
+
"alt": "image loading",
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"type": "zz-title",
|
|
417
|
+
"settings": {
|
|
418
|
+
"pc_title": "<p>OFFICIAL FLYING CAMERA OF<br/>USA CYCLING TEAM</p>",
|
|
419
|
+
"mb_title": "<p>OFFICIAL FLYING CAMERA OF<br/>USA CYCLING TEAM</p>",
|
|
420
|
+
"tag": "h3",
|
|
421
|
+
"text_color": "#ffffff",
|
|
422
|
+
"pc_align": "left",
|
|
423
|
+
"mobile_align": "center",
|
|
424
|
+
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"type": "zz-button",
|
|
429
|
+
"settings": {
|
|
430
|
+
"text": "Buy Now",
|
|
431
|
+
"function_type": "link_map",
|
|
432
|
+
"type": "primary",
|
|
433
|
+
"color": "white",
|
|
434
|
+
"size": "medium"
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
{% endschema %}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
{% schema %}
|
|
3
|
+
{
|
|
4
|
+
"name": "Icon",
|
|
5
|
+
"settings": [
|
|
6
|
+
{
|
|
7
|
+
"type": "select",
|
|
8
|
+
"id": "icon_name",
|
|
9
|
+
"label": "图标类型",
|
|
10
|
+
"options": [
|
|
11
|
+
{
|
|
12
|
+
"value": "download",
|
|
13
|
+
"label": "download"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"value": "arrow-right",
|
|
17
|
+
"label": "arrow-right"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"value": "mail",
|
|
21
|
+
"label": "mail"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"value": "copy",
|
|
25
|
+
"label": "copy"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"default": "download"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "number",
|
|
32
|
+
"id": "icon_size",
|
|
33
|
+
"label": "图标大小",
|
|
34
|
+
"default": 15
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"presets": [
|
|
38
|
+
{
|
|
39
|
+
"name": "Icon"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
{% endschema %}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
{% render 'zz-icon', icon_name: block.settings.icon_name, icon_size: block.settings.icon_size %}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{% schema %}
|
|
2
|
+
{
|
|
3
|
+
"name": "Email Link",
|
|
4
|
+
"settings": [
|
|
5
|
+
{
|
|
6
|
+
"type": "text",
|
|
7
|
+
"id": "email_address",
|
|
8
|
+
"label": "邮箱地址",
|
|
9
|
+
"default": "pr@hoverair.com"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "text",
|
|
13
|
+
"id": "subject",
|
|
14
|
+
"label": "邮件主题",
|
|
15
|
+
"default": "Media Inquiries"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "text",
|
|
19
|
+
"id": "text",
|
|
20
|
+
"label": "复制成功提示",
|
|
21
|
+
"default": "Copied to clipboard"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"presets": [
|
|
25
|
+
{
|
|
26
|
+
"name": "Email Link"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
{% endschema %}
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
.zz-btn-icon {
|
|
34
|
+
display: flex;
|
|
35
|
+
padding-left: 4px;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<span class='tw-inline-flex tw-text-[#378DDD] tw-items-center tw-text-[12px] lg:tw-text-[14px] '>
|
|
40
|
+
<a
|
|
41
|
+
href='mailto:{{ block.settings.email_address }}?subject={{ block.settings.subject | default: "Media Inquiries" }}'
|
|
42
|
+
class='tw-text-[#378DDD] tw-no-underline'
|
|
43
|
+
>
|
|
44
|
+
<span class='zz-btn-text'>{{ block.settings.email_address }}</span>
|
|
45
|
+
</a>
|
|
46
|
+
<span
|
|
47
|
+
class='zz-btn-icon tw-cursor-pointer tw-daisy-tooltip'
|
|
48
|
+
data-tip='Copy to clipboard'
|
|
49
|
+
id='zz-email-copy-icon'
|
|
50
|
+
>
|
|
51
|
+
{% render 'zz-icon', icon_name: 'copy', icon_size: 25 %}
|
|
52
|
+
</span>
|
|
53
|
+
</span>
|
|
54
|
+
<div id='toast-email-copied'>{{ block.settings.text | default: "Copied to clipboard" }}</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
#toast-email-copied {
|
|
58
|
+
visibility: hidden;
|
|
59
|
+
min-width: 250px;
|
|
60
|
+
margin-left: -125px;
|
|
61
|
+
background-color: #333;
|
|
62
|
+
color: #fff;
|
|
63
|
+
text-align: center;
|
|
64
|
+
border-radius: 2px;
|
|
65
|
+
padding: 16px;
|
|
66
|
+
position: fixed;
|
|
67
|
+
z-index: 1;
|
|
68
|
+
left: 50%;
|
|
69
|
+
bottom: 30px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#toast-email-copied.show {
|
|
73
|
+
visibility: visible;
|
|
74
|
+
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
|
75
|
+
animation: fadein 0.5s, fadeout 0.5s 2.5s;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@-webkit-keyframes fadein {
|
|
79
|
+
from {
|
|
80
|
+
bottom: 0;
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
to {
|
|
84
|
+
bottom: 30px;
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes fadein {
|
|
90
|
+
from {
|
|
91
|
+
bottom: 0;
|
|
92
|
+
opacity: 0;
|
|
93
|
+
}
|
|
94
|
+
to {
|
|
95
|
+
bottom: 30px;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@-webkit-keyframes fadeout {
|
|
101
|
+
from {
|
|
102
|
+
bottom: 30px;
|
|
103
|
+
opacity: 1;
|
|
104
|
+
}
|
|
105
|
+
to {
|
|
106
|
+
bottom: 0;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes fadeout {
|
|
112
|
+
from {
|
|
113
|
+
bottom: 30px;
|
|
114
|
+
opacity: 1;
|
|
115
|
+
}
|
|
116
|
+
to {
|
|
117
|
+
bottom: 0;
|
|
118
|
+
opacity: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
122
|
+
|
|
123
|
+
<script>
|
|
124
|
+
document
|
|
125
|
+
.getElementById('zz-email-copy-icon')
|
|
126
|
+
.addEventListener('click', function () {
|
|
127
|
+
navigator.clipboard.writeText('{{ block.settings.email_address }}');
|
|
128
|
+
|
|
129
|
+
var x = document.getElementById('toast-email-copied');
|
|
130
|
+
x.className = 'show';
|
|
131
|
+
setTimeout(function () {
|
|
132
|
+
x.className = x.className.replace('show', '');
|
|
133
|
+
}, 3000);
|
|
134
|
+
});
|
|
135
|
+
</script>
|