zz-shopify-components 0.35.1-beta.8 → 0.35.1-beta.9
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.
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
#shopify-block-{{ block.id }} .zz-bottom-popup__overlay {
|
|
20
20
|
position: fixed;
|
|
21
21
|
inset: 0;
|
|
22
|
-
z-index:
|
|
23
|
-
background: rgba(0, 0, 0, 0.
|
|
22
|
+
z-index: 888;
|
|
23
|
+
background: rgba(0, 0, 0, 0.6);
|
|
24
24
|
opacity: 0;
|
|
25
25
|
pointer-events: none;
|
|
26
26
|
transition: opacity 0.35s ease;
|
|
@@ -30,18 +30,23 @@
|
|
|
30
30
|
opacity: 1;
|
|
31
31
|
pointer-events: auto;
|
|
32
32
|
}
|
|
33
|
+
@media screen and (max-width: 1023px) {
|
|
34
|
+
#shopify-block-{{ block.id }} .zz-bottom-popup__content {
|
|
35
|
+
height: {{ block.settings.mobile_height }}vh;
|
|
36
|
+
max-height: {{ block.settings.mobile_height }}vh;
|
|
37
|
+
padding: {{ block.settings.mobile_padding_top }}px {{ block.settings.mobile_padding_x }}px 0;
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
}
|
|
33
41
|
|
|
34
42
|
#shopify-block-{{ block.id }} .zz-bottom-popup__content {
|
|
35
43
|
position: fixed;
|
|
36
44
|
left: 0;
|
|
37
45
|
bottom: 0;
|
|
38
|
-
z-index:
|
|
46
|
+
z-index: 889;
|
|
39
47
|
display: flex;
|
|
40
48
|
flex-direction: column;
|
|
41
49
|
width: 100vw;
|
|
42
|
-
height: {{ block.settings.mobile_height }}vh;
|
|
43
|
-
max-height: {{ block.settings.mobile_height }}vh;
|
|
44
|
-
padding: {{ block.settings.mobile_padding_top }}px {{ block.settings.mobile_padding_x }}px 0;
|
|
45
50
|
border-radius: 20px 20px 0 0;
|
|
46
51
|
background: {{ block.settings.background_color }};
|
|
47
52
|
box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
|
|
@@ -64,12 +69,18 @@
|
|
|
64
69
|
right: 16px;
|
|
65
70
|
z-index: 101;
|
|
66
71
|
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
67
74
|
width: 32px;
|
|
68
75
|
height: 32px;
|
|
69
76
|
padding: 0;
|
|
70
77
|
border: 0;
|
|
71
|
-
|
|
78
|
+
border-radius: 999px;
|
|
79
|
+
background: rgba(255, 255, 255, 0.12);
|
|
80
|
+
backdrop-filter: blur(10px);
|
|
81
|
+
-webkit-backdrop-filter: blur(10px);
|
|
72
82
|
cursor: pointer;
|
|
83
|
+
overflow: hidden;
|
|
73
84
|
}
|
|
74
85
|
|
|
75
86
|
#shopify-block-{{ block.id }} .zz-bottom-popup__body {
|
|
@@ -79,17 +90,8 @@
|
|
|
79
90
|
flex: 1 1 auto;
|
|
80
91
|
padding-bottom: 34px;
|
|
81
92
|
overflow-y: auto;
|
|
82
|
-
scrollbar-width: thin;
|
|
83
|
-
scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
#shopify-block-{{ block.id }} .zz-bottom-popup__body::-webkit-scrollbar {
|
|
87
|
-
width: 6px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
#shopify-block-{{ block.id }} .zz-bottom-popup__body::-webkit-scrollbar-thumb {
|
|
91
|
-
border-radius: 999px;
|
|
92
|
-
background: rgba(255, 255, 255, 0.18);
|
|
93
|
+
{% comment %} scrollbar-width: thin;
|
|
94
|
+
scrollbar-color: rgba(255, 255, 255, 0.18) transparent; {% endcomment %}
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
#shopify-block-{{ block.id }} .zz-bottom-popup__inner {
|
|
@@ -111,11 +113,10 @@
|
|
|
111
113
|
#shopify-block-{{ block.id }} .zz-bottom-popup__close {
|
|
112
114
|
top: auto;
|
|
113
115
|
right: auto;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
right: 30px;
|
|
117
|
+
top: 30px;
|
|
116
118
|
width: 40px;
|
|
117
119
|
height: 40px;
|
|
118
|
-
transform: translateX(-50%);
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
#shopify-block-{{ block.id }} .zz-bottom-popup__body {
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
|
|
145
146
|
<div class="zz-bottom-popup" {{ block.shopify_attributes }}>
|
|
146
147
|
<zz-normal-modal id="{{ modal_id }}" class="zz-bottom-popup__modal" aria-hidden="true">
|
|
147
|
-
<div class="zz-bottom-popup__overlay" data-modal-overlay
|
|
148
|
+
<div class="zz-bottom-popup__overlay" data-modal-overlay> </div>
|
|
148
149
|
<div
|
|
149
150
|
class="zz-bottom-popup__content"
|
|
150
151
|
data-modal-content
|
|
@@ -169,7 +170,7 @@
|
|
|
169
170
|
</svg>
|
|
170
171
|
</button>
|
|
171
172
|
|
|
172
|
-
<div class="zz-bottom-popup__body">
|
|
173
|
+
<div class="zz-bottom-popup__body zz-overflow-scrollbar-hidden">
|
|
173
174
|
<div class="zz-bottom-popup__inner" id="{{ modal_id }}-title">
|
|
174
175
|
{% content_for 'blocks' %}
|
|
175
176
|
</div>
|
|
@@ -179,7 +180,7 @@
|
|
|
179
180
|
</div>
|
|
180
181
|
|
|
181
182
|
<script>
|
|
182
|
-
(function() {
|
|
183
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
183
184
|
var blockRoot = document.getElementById('shopify-block-{{ block.id }}');
|
|
184
185
|
|
|
185
186
|
if (!blockRoot || blockRoot.dataset.bottomPopupBound === 'true') {
|
|
@@ -193,7 +194,7 @@
|
|
|
193
194
|
var overlay = blockRoot.querySelector('[data-modal-overlay]');
|
|
194
195
|
var modalTarget = '#{{ modal_id }}';
|
|
195
196
|
var triggers = document.querySelectorAll('[data-zz-modal-target="' + modalTarget + '"]');
|
|
196
|
-
|
|
197
|
+
console.log('triggers----------triggers',triggers);
|
|
197
198
|
if (!modal) {
|
|
198
199
|
return;
|
|
199
200
|
}
|
|
@@ -228,7 +229,8 @@
|
|
|
228
229
|
});
|
|
229
230
|
}
|
|
230
231
|
});
|
|
231
|
-
|
|
232
|
+
|
|
233
|
+
});
|
|
232
234
|
</script>
|
|
233
235
|
|
|
234
236
|
{% schema %}
|
|
@@ -195,6 +195,11 @@
|
|
|
195
195
|
"id": "modal_id",
|
|
196
196
|
"label": "按钮触发modal的id",
|
|
197
197
|
},
|
|
198
|
+
{
|
|
199
|
+
"type": "text",
|
|
200
|
+
"id": "custom_class",
|
|
201
|
+
"label": "自定义类名",
|
|
202
|
+
},
|
|
198
203
|
{
|
|
199
204
|
"type": "text",
|
|
200
205
|
"id": "click_event_class_name",
|
|
@@ -216,6 +221,10 @@
|
|
|
216
221
|
|
|
217
222
|
{% assign btn_class = 'zz-button' | append: block.id %}
|
|
218
223
|
|
|
224
|
+
{% if block.settings.custom_class != blank %}
|
|
225
|
+
{% assign btn_class = btn_class | append: ' ' | append: block.settings.custom_class %}
|
|
226
|
+
{% endif %}
|
|
227
|
+
|
|
219
228
|
<style>
|
|
220
229
|
|
|
221
230
|
{% if block.settings.mobile_width == 'full' %}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<div class='media-box tw-relative tw-rounded-[10px] lg:tw-rounded-[16px] '>
|
|
2
|
+
{% if block.settings.video_pc != blank %}
|
|
3
|
+
{% if block.settings.video_url_pc != blank %}
|
|
4
|
+
{% assign pc_video = block.settings.video_url_pc %}
|
|
5
|
+
{% else %}
|
|
6
|
+
{% assign pc_video = block.settings.video_pc %}
|
|
7
|
+
{% endif %}
|
|
8
|
+
{% render 'zz-video',
|
|
9
|
+
pc_video: pc_video,
|
|
10
|
+
pc_poster: block.settings.poster_pc,
|
|
11
|
+
mb_video: block.settings.video_mb,
|
|
12
|
+
mb_poster: block.settings.poster_mb,
|
|
13
|
+
lazy: true,
|
|
14
|
+
class: 'image-video-box tw-w-full tw-h-auto tw-rounded-[10px] lg:tw-rounded-[16px]',
|
|
15
|
+
autoplay: true,
|
|
16
|
+
loop: true,
|
|
17
|
+
muted: true,
|
|
18
|
+
module_id: block.settings.block_module_id
|
|
19
|
+
%}
|
|
20
|
+
{% else %}
|
|
21
|
+
{%
|
|
22
|
+
render 'zz-img',
|
|
23
|
+
pc_image: block.settings.poster_pc,
|
|
24
|
+
mb_image: block.settings.poster_mb,
|
|
25
|
+
image_alt: block.settings.heading | escape,
|
|
26
|
+
class_name: 'image-video-box tw-rounded-[10px] lg:tw-rounded-[16px]',
|
|
27
|
+
%}
|
|
28
|
+
{% endif %}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='active-box-content max-lg:tw-mt-[2rem] lg:tw-mt-[32px]'>
|
|
33
|
+
{% render 'zz-h5',
|
|
34
|
+
title: block.settings.heading,
|
|
35
|
+
title_color: block.settings.title_color,
|
|
36
|
+
class_name: 'box-title tw-text-center lg:tw-text-left tw-text-[16px] lg:tw-text-[24px]'
|
|
37
|
+
%}
|
|
38
|
+
<div class='active-box-desc tw-mt-[8px] lg:tw-mt-[20px]'>
|
|
39
|
+
{% render 'zz-content-text',
|
|
40
|
+
text: block.settings.row_content,
|
|
41
|
+
mb_text: block.settings.row_content,
|
|
42
|
+
pc_font_size: 16,
|
|
43
|
+
mobile_font_size: 12,
|
|
44
|
+
text_color: block.settings.content_color,
|
|
45
|
+
class_name: 'box-content-text max-lg:tw-text-center lg:tw-text-left tw-text-[12px] lg:tw-text-[16px]',
|
|
46
|
+
%}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
{% schema %}
|
|
52
|
+
{
|
|
53
|
+
"name": "Img Video Text",
|
|
54
|
+
"class": "zz-img-video-text",
|
|
55
|
+
"settings": [
|
|
56
|
+
{
|
|
57
|
+
"type": "text",
|
|
58
|
+
"id": "video_url_pc",
|
|
59
|
+
"label": "Video url PC",
|
|
60
|
+
"info": "使用cdn视频时,填写视频url。防止大屏幕视频模糊"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "video",
|
|
64
|
+
"id": "video_pc",
|
|
65
|
+
"label": "Video"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "image_picker",
|
|
69
|
+
"id": "poster_pc",
|
|
70
|
+
"label": "Poster"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "video",
|
|
74
|
+
"id": "video_mb",
|
|
75
|
+
"label": "Video(Mobile)"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "image_picker",
|
|
79
|
+
"id": "poster_mb",
|
|
80
|
+
"label": "Poster(Mobile)"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "text",
|
|
84
|
+
"id": "heading",
|
|
85
|
+
"label": "标题"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "color",
|
|
89
|
+
"id": "title_color",
|
|
90
|
+
"default": "#2D2D2D",
|
|
91
|
+
"label": "标题颜色"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "richtext",
|
|
95
|
+
"id": "row_content",
|
|
96
|
+
"label": "description"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "color",
|
|
100
|
+
"id": "content_color",
|
|
101
|
+
"default": "#B2B2B2",
|
|
102
|
+
"label": "内容颜色"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "text",
|
|
106
|
+
"id": "block_module_id",
|
|
107
|
+
"label": "唯一业务id",
|
|
108
|
+
"info": "需要唯一,埋点统计"
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
],
|
|
112
|
+
"presets": [
|
|
113
|
+
{
|
|
114
|
+
"name": "Img Video Text",
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
{% endschema %}
|
|
119
|
+
|
|
120
|
+
|
package/package.json
CHANGED
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
height: calc(90vw / 16 * 9);
|
|
133
133
|
}
|
|
134
134
|
#shopify-section-{{ section.id }} .zz-banner-tab-swiper .swiper-pagination-bullets {
|
|
135
|
-
bottom:
|
|
135
|
+
bottom: 110px;
|
|
136
136
|
left: 50%;
|
|
137
137
|
transform: translateX(-50%);
|
|
138
138
|
width: auto;
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
title: block.settings.pc_title,
|
|
208
208
|
title_mb: block.settings.mb_title,
|
|
209
209
|
title_color: block.settings.text_color,
|
|
210
|
-
class_name: 'tab-content-title tw-text-center'
|
|
210
|
+
class_name: 'tab-content-title tw-text-center max-lg:tw-text-[2.1rem] max-lg:tw-text-left'
|
|
211
211
|
%}
|
|
212
212
|
<style>
|
|
213
213
|
#shopify-section-{{section.id}} .tab-content-title {
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
text: block.settings.pc_text,
|
|
229
229
|
mb_text: block.settings.mb_text,
|
|
230
230
|
text_color: block.settings.text_color,
|
|
231
|
-
class_name: 'tab-content-text tw-text-center'
|
|
231
|
+
class_name: 'tab-content-text tw-text-center max-lg:tw-text-left'
|
|
232
232
|
%}
|
|
233
233
|
<style>
|
|
234
234
|
#shopify-section-{{section.id}} .tab-content-text {
|