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,166 +1,166 @@
|
|
|
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: 100%;
|
|
9
|
-
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
position: relative;
|
|
13
|
-
}
|
|
14
|
-
#shopify-block-{{block.id}} .zz-video-img-list-swiper {
|
|
15
|
-
width: 100%;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
height: fit-content;
|
|
19
|
-
position: relative;
|
|
20
|
-
letter-spacing: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
#shopify-block-{{block.id}} .swiper-button-next:after,
|
|
25
|
-
#shopify-block-{{block.id}} .swiper-button-prev:after {
|
|
26
|
-
display: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@media screen and (max-width: 750px) {
|
|
30
|
-
#shopify-block-{{block.id}} .swiper-button-next,
|
|
31
|
-
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
32
|
-
display: none;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
@media screen and (min-width: 750px) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
#shopify-block-{{block.id}} .swiper-button-next,
|
|
39
|
-
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
40
|
-
width: 48px;
|
|
41
|
-
height: 48px;
|
|
42
|
-
}
|
|
43
|
-
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
44
|
-
left: 20px;
|
|
45
|
-
top: 50%;
|
|
46
|
-
right: unset;
|
|
47
|
-
transform:translateY(-50%);
|
|
48
|
-
}
|
|
49
|
-
#shopify-block-{{block.id}} .swiper-button-next {
|
|
50
|
-
right: 20px;
|
|
51
|
-
left: unset;
|
|
52
|
-
top: 50%;
|
|
53
|
-
transform:translateY(-50%);
|
|
54
|
-
}
|
|
55
|
-
#shopify-block-{{block.id}} .swiper-button-next.swiper-button-disabled, #shopify-block-{{block.id}} .swiper-button-prev.swiper-button-disabled {
|
|
56
|
-
display: none;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
</style>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<div
|
|
66
|
-
class='zz-video-img-list-swiper zz-video-img-list-swiper-{{ block.id }}'
|
|
67
|
-
>
|
|
68
|
-
<div class='zz-swiper-wrapper swiper-wrapper'>
|
|
69
|
-
{% content_for 'blocks' %}
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<!-- If we need navigation buttons -->
|
|
73
|
-
<div class='swiper-button-prev {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
|
|
74
|
-
|
|
75
|
-
{% render 'zz-prev-next-blur-icon', type: 'prev', color_type: block.settings.prev_next_type %}
|
|
76
|
-
</div>
|
|
77
|
-
<div class='swiper-button-next {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
|
|
78
|
-
{% render 'zz-prev-next-blur-icon', type: 'next', color_type: block.settings.prev_next_type %}
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<script>
|
|
84
|
-
|
|
85
|
-
document.addEventListener('DOMContentLoaded', function () {
|
|
86
|
-
const videoNum = {{ block_size }};
|
|
87
|
-
const block = document.getElementById(
|
|
88
|
-
'shopify-block-{{block.id}}'
|
|
89
|
-
);
|
|
90
|
-
let isDesktop = window.innerWidth > 750;
|
|
91
|
-
const swiperWrapper = block.querySelector('.zz-swiper-wrapper');
|
|
92
|
-
// 获取当前 swiper-wrapper 下面 所有 第一层 div
|
|
93
|
-
const swiperSlides = swiperWrapper.querySelectorAll(':scope > div');
|
|
94
|
-
// 给每个 swiper-slide 添加 class swiper-slide
|
|
95
|
-
swiperSlides.forEach(slide => {
|
|
96
|
-
slide.classList.add('swiper-slide');
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const prevIcon = block.querySelector('.swiper-button-prev');
|
|
100
|
-
const nextIcon = block.querySelector('.swiper-button-next');
|
|
101
|
-
|
|
102
|
-
let progressTimer = null;
|
|
103
|
-
const swiperClassName = '.zz-video-img-list-swiper-{{ block.id }}';
|
|
104
|
-
const videoImgListSwiper = new Swiper(swiperClassName, {
|
|
105
|
-
slidesPerView: "auto",
|
|
106
|
-
initialSlide: isDesktop ? 1 : 0,
|
|
107
|
-
centeredSlides: true,
|
|
108
|
-
spaceBetween: isDesktop ? 24 : 8,
|
|
109
|
-
navigation: {
|
|
110
|
-
nextEl: '.swiper-button-next',
|
|
111
|
-
prevEl: '.swiper-button-prev',
|
|
112
|
-
},
|
|
113
|
-
effect: 'slide',
|
|
114
|
-
freeMode: isDesktop ? false : true,
|
|
115
|
-
on: {
|
|
116
|
-
slideChangeTransitionEnd: function (e) {
|
|
117
|
-
console.log('slideChangeTransitionEnd', e.activeIndex);
|
|
118
|
-
{% comment %} if (e.activeIndex < 1) {
|
|
119
|
-
videoImgListSwiper.slideTo(videoNum - 1, 0);
|
|
120
|
-
} else if(e.activeIndex > videoNum - 1) {
|
|
121
|
-
videoImgListSwiper.slideTo(0, 0);
|
|
122
|
-
} else {
|
|
123
|
-
|
|
124
|
-
} {% endcomment %}
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
{% schema %}
|
|
133
|
-
{
|
|
134
|
-
"name": "Full Screen Swiper",
|
|
135
|
-
"class": "zz-video-img-list-swiper-block",
|
|
136
|
-
"settings": [
|
|
137
|
-
{
|
|
138
|
-
"type": "color",
|
|
139
|
-
"id": "bg_color",
|
|
140
|
-
"default": "#000000",
|
|
141
|
-
"label": "背景色"
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
"type": "select",
|
|
146
|
-
"id": "prev_next_type",
|
|
147
|
-
"label": "prev next 颜色",
|
|
148
|
-
"options": [
|
|
149
|
-
{ "value": "dark", "label": "黑色" },
|
|
150
|
-
{ "value": "light", "label": "白色" },
|
|
151
|
-
],
|
|
152
|
-
"default": "light"
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
"blocks": [
|
|
156
|
-
{
|
|
157
|
-
"type": "zz-video-img-item",
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"presets": [
|
|
161
|
-
{
|
|
162
|
-
"name": "ZZ Video Img List",
|
|
163
|
-
},
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
{% endschema %}
|
|
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: 100%;
|
|
9
|
+
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
#shopify-block-{{block.id}} .zz-video-img-list-swiper {
|
|
15
|
+
width: 100%;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
height: fit-content;
|
|
19
|
+
position: relative;
|
|
20
|
+
letter-spacing: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#shopify-block-{{block.id}} .swiper-button-next:after,
|
|
25
|
+
#shopify-block-{{block.id}} .swiper-button-prev:after {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media screen and (max-width: 750px) {
|
|
30
|
+
#shopify-block-{{block.id}} .swiper-button-next,
|
|
31
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@media screen and (min-width: 750px) {
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
#shopify-block-{{block.id}} .swiper-button-next,
|
|
39
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
40
|
+
width: 48px;
|
|
41
|
+
height: 48px;
|
|
42
|
+
}
|
|
43
|
+
#shopify-block-{{block.id}} .swiper-button-prev {
|
|
44
|
+
left: 20px;
|
|
45
|
+
top: 50%;
|
|
46
|
+
right: unset;
|
|
47
|
+
transform:translateY(-50%);
|
|
48
|
+
}
|
|
49
|
+
#shopify-block-{{block.id}} .swiper-button-next {
|
|
50
|
+
right: 20px;
|
|
51
|
+
left: unset;
|
|
52
|
+
top: 50%;
|
|
53
|
+
transform:translateY(-50%);
|
|
54
|
+
}
|
|
55
|
+
#shopify-block-{{block.id}} .swiper-button-next.swiper-button-disabled, #shopify-block-{{block.id}} .swiper-button-prev.swiper-button-disabled {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
</style>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<div
|
|
66
|
+
class='zz-video-img-list-swiper zz-video-img-list-swiper-{{ block.id }}'
|
|
67
|
+
>
|
|
68
|
+
<div class='zz-swiper-wrapper swiper-wrapper'>
|
|
69
|
+
{% content_for 'blocks' %}
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- If we need navigation buttons -->
|
|
73
|
+
<div class='swiper-button-prev {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
|
|
74
|
+
|
|
75
|
+
{% render 'zz-prev-next-blur-icon', type: 'prev', color_type: block.settings.prev_next_type %}
|
|
76
|
+
</div>
|
|
77
|
+
<div class='swiper-button-next {% if block_size <= 3 %} tw-hidden {% endif %} max-md:tw-hidden'>
|
|
78
|
+
{% render 'zz-prev-next-blur-icon', type: 'next', color_type: block.settings.prev_next_type %}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<script>
|
|
84
|
+
|
|
85
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
86
|
+
const videoNum = {{ block_size }};
|
|
87
|
+
const block = document.getElementById(
|
|
88
|
+
'shopify-block-{{block.id}}'
|
|
89
|
+
);
|
|
90
|
+
let isDesktop = window.innerWidth > 750;
|
|
91
|
+
const swiperWrapper = block.querySelector('.zz-swiper-wrapper');
|
|
92
|
+
// 获取当前 swiper-wrapper 下面 所有 第一层 div
|
|
93
|
+
const swiperSlides = swiperWrapper.querySelectorAll(':scope > div');
|
|
94
|
+
// 给每个 swiper-slide 添加 class swiper-slide
|
|
95
|
+
swiperSlides.forEach(slide => {
|
|
96
|
+
slide.classList.add('swiper-slide');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const prevIcon = block.querySelector('.swiper-button-prev');
|
|
100
|
+
const nextIcon = block.querySelector('.swiper-button-next');
|
|
101
|
+
|
|
102
|
+
let progressTimer = null;
|
|
103
|
+
const swiperClassName = '.zz-video-img-list-swiper-{{ block.id }}';
|
|
104
|
+
const videoImgListSwiper = new Swiper(swiperClassName, {
|
|
105
|
+
slidesPerView: "auto",
|
|
106
|
+
initialSlide: isDesktop ? 1 : 0,
|
|
107
|
+
centeredSlides: true,
|
|
108
|
+
spaceBetween: isDesktop ? 24 : 8,
|
|
109
|
+
navigation: {
|
|
110
|
+
nextEl: '.swiper-button-next',
|
|
111
|
+
prevEl: '.swiper-button-prev',
|
|
112
|
+
},
|
|
113
|
+
effect: 'slide',
|
|
114
|
+
freeMode: isDesktop ? false : true,
|
|
115
|
+
on: {
|
|
116
|
+
slideChangeTransitionEnd: function (e) {
|
|
117
|
+
console.log('slideChangeTransitionEnd', e.activeIndex);
|
|
118
|
+
{% comment %} if (e.activeIndex < 1) {
|
|
119
|
+
videoImgListSwiper.slideTo(videoNum - 1, 0);
|
|
120
|
+
} else if(e.activeIndex > videoNum - 1) {
|
|
121
|
+
videoImgListSwiper.slideTo(0, 0);
|
|
122
|
+
} else {
|
|
123
|
+
|
|
124
|
+
} {% endcomment %}
|
|
125
|
+
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
{% schema %}
|
|
133
|
+
{
|
|
134
|
+
"name": "Full Screen Swiper",
|
|
135
|
+
"class": "zz-video-img-list-swiper-block",
|
|
136
|
+
"settings": [
|
|
137
|
+
{
|
|
138
|
+
"type": "color",
|
|
139
|
+
"id": "bg_color",
|
|
140
|
+
"default": "#000000",
|
|
141
|
+
"label": "背景色"
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
{
|
|
145
|
+
"type": "select",
|
|
146
|
+
"id": "prev_next_type",
|
|
147
|
+
"label": "prev next 颜色",
|
|
148
|
+
"options": [
|
|
149
|
+
{ "value": "dark", "label": "黑色" },
|
|
150
|
+
{ "value": "light", "label": "白色" },
|
|
151
|
+
],
|
|
152
|
+
"default": "light"
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
"blocks": [
|
|
156
|
+
{
|
|
157
|
+
"type": "zz-video-img-item",
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"presets": [
|
|
161
|
+
{
|
|
162
|
+
"name": "ZZ Video Img List",
|
|
163
|
+
},
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
{% endschema %}
|