zz-shopify-components 0.36.1-beta.10 → 0.36.1-beta.11
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/assets/zz-components.css +11 -0
- package/blocks/zz-accessories-item.liquid +4 -0
- package/blocks/zz-button-v2.liquid +11 -1
- package/blocks/zz-content-description.liquid +7 -0
- package/package.json +1 -1
- package/sections/zz-FAQ.liquid +60 -18
- package/sections/zz-flex-layout-section.liquid +12 -0
- package/sections/zz-navigation-tab-v3.liquid +17 -10
- package/snippets/zz-spoke.liquid +14 -3
package/assets/zz-components.css
CHANGED
|
@@ -522,6 +522,17 @@ body.zz-dialog-open {
|
|
|
522
522
|
display: none;
|
|
523
523
|
/* Chrome/Safari/Edge */
|
|
524
524
|
}
|
|
525
|
+
|
|
525
526
|
.zz-hidden {
|
|
526
527
|
display: none !important;
|
|
527
528
|
}
|
|
529
|
+
|
|
530
|
+
/* 时间线 进度线 */
|
|
531
|
+
.flex-layout-widget:not(:last-child) .timeline-step::after {
|
|
532
|
+
content: " ";
|
|
533
|
+
position: absolute;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.timeline-step {
|
|
537
|
+
position: relative;
|
|
538
|
+
}
|
|
@@ -65,6 +65,10 @@
|
|
|
65
65
|
{% else %}
|
|
66
66
|
href="javascript:void(0);"
|
|
67
67
|
{% endif %}
|
|
68
|
+
{% if block.settings.btn_id contains '151-page' %}
|
|
69
|
+
data-visibility-rule="country_exclude"
|
|
70
|
+
data-visibility-countries="United States"
|
|
71
|
+
{% endif %}
|
|
68
72
|
>
|
|
69
73
|
{{ block.settings.btn_text }}
|
|
70
74
|
</a>
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"label": "按钮文字",
|
|
10
10
|
"default": "按钮"
|
|
11
11
|
},
|
|
12
|
-
|
|
13
12
|
{
|
|
14
13
|
"type": "select",
|
|
15
14
|
"id": "function_type",
|
|
@@ -270,6 +269,17 @@
|
|
|
270
269
|
|
|
271
270
|
|
|
272
271
|
<script>
|
|
272
|
+
{% if block.settings.custom_class == 'us-hide' %}
|
|
273
|
+
(() => {
|
|
274
|
+
const currentBlock = document.getElementById('shopify-block-{{ block.id }}')
|
|
275
|
+
if (currentBlock) {
|
|
276
|
+
console.log('us-hide',currentBlock)
|
|
277
|
+
currentBlock.setAttribute('data-visibility-rule', 'country_exclude')
|
|
278
|
+
currentBlock.setAttribute('data-visibility-countries', 'United States')
|
|
279
|
+
}
|
|
280
|
+
})()
|
|
281
|
+
{% endif %}
|
|
282
|
+
|
|
273
283
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
274
284
|
const btn = document.getElementsByClassName('{{ btn_class }}')
|
|
275
285
|
if(btn && btn[0]) {
|
|
@@ -33,6 +33,12 @@
|
|
|
33
33
|
],
|
|
34
34
|
"default": "400"
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"type": "checkbox",
|
|
38
|
+
"id": "italic",
|
|
39
|
+
"label": "是否斜体 (Italic)",
|
|
40
|
+
"default": false
|
|
41
|
+
},
|
|
36
42
|
{
|
|
37
43
|
"type": "header",
|
|
38
44
|
"content": "PC Settings"
|
|
@@ -229,6 +235,7 @@
|
|
|
229
235
|
mobile_text_align: block.settings.mobile_text_align,
|
|
230
236
|
pc_font_line_height: block.settings.pc_font_line_height,
|
|
231
237
|
mobile_font_line_height: block.settings.mobile_font_line_height,
|
|
238
|
+
italic: block.settings.italic,
|
|
232
239
|
separate_display: block.settings.separate_display,
|
|
233
240
|
%}
|
|
234
241
|
|
package/package.json
CHANGED
package/sections/zz-FAQ.liquid
CHANGED
|
@@ -30,6 +30,17 @@
|
|
|
30
30
|
#shopify-section-{{ section.id }} .tw-daisy-collapse:last-child {
|
|
31
31
|
border-bottom: none;
|
|
32
32
|
}
|
|
33
|
+
#shopify-section-{{ section.id }} .row_content strong {
|
|
34
|
+
color: {{ section.settings.collapsible_highlight_color }};
|
|
35
|
+
}
|
|
36
|
+
#shopify-section-{{ section.id }} .row_content ul {
|
|
37
|
+
list-style: disc;
|
|
38
|
+
padding-left: 1.5em;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
#shopify-section-{{ section.id }} .row_content li {
|
|
42
|
+
display: list-item;
|
|
43
|
+
}
|
|
33
44
|
|
|
34
45
|
@media screen and (min-width: 1024px) {
|
|
35
46
|
#shopify-section-{{ section.id }} {
|
|
@@ -46,31 +57,50 @@
|
|
|
46
57
|
{% if section.settings.is_exposure != false %}
|
|
47
58
|
data-track-zz-exposure="true"
|
|
48
59
|
{% endif %}
|
|
49
|
-
data-zz-module-name="faq
|
|
60
|
+
data-zz-module-name="faq"
|
|
50
61
|
class="faq-custom max-lg:tw-px-[20px] lg:tw-mx-auto lg:tw-w-[95.3125vw] xl:tw-w-[1220px] fade-in-box">
|
|
51
|
-
{% render '
|
|
62
|
+
{% render 'zz-h2',
|
|
52
63
|
title_color: section.settings.title_color,
|
|
53
64
|
title: section.settings.title,
|
|
54
65
|
title_mb: section.settings.title_mb,
|
|
55
|
-
class_name: 'tw-text-center lg:tw-text-[60px] xl:tw-text-[60px]'
|
|
66
|
+
class_name: 'faq-title tw-text-center lg:tw-text-[60px] xl:tw-text-[60px]'
|
|
56
67
|
%}
|
|
57
68
|
<div class="zz-faq-list tw-mt-[30px] lg:tw-mt-[5vw] xl:tw-mt-[64px] tw-px-[16px] tw-pb-[20px] lg:tw-px-[3.75vw] lg:tw-py-[4.6875vw] xl:tw-px-[48px] xl:tw-py-[60px] tw-rounded-[10px] lg:tw-rounded-[16px]">
|
|
58
69
|
<div class="tw-daisy-join tw-daisy-join-vertical tw-w-full ">
|
|
59
|
-
{%
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{{
|
|
70
|
+
{% if section.settings.faq_metaobjects != blank %}
|
|
71
|
+
{% for faq_item in section.settings.faq_metaobjects.faq_item.value %}
|
|
72
|
+
<div class="tw-daisy-collapse collapse-arrow tw-daisy-join-item tw-border-b {% if section.settings.collapsible_arrow_style == 'light' %} tw-border-[#ffffff]/15 {% else %} tw-border-[#000000]/15 {% endif %}">
|
|
73
|
+
<input type="radio" name="my-accordion-{{ section.id }}" value="{{ forloop.index }}" {% if forloop.first %}checked data-last-checked="true"{% endif %} style="cursor: pointer;" />
|
|
74
|
+
<div class="tw-daisy-collapse-title tw-py-[20px] tw-pl-0 tw-pr-[40px] tw-text-[13px] lg:tw-text-[16px] tw-font-medium tw-leading-[1.5] lg:tw-leading-[30px]"
|
|
75
|
+
style="color:{{ section.settings.collapsible_title_color }}">
|
|
76
|
+
{{ faq_item.title.value }}
|
|
77
|
+
</div>
|
|
78
|
+
<div class="tw-p-0 tw-pr-[40px] tw-daisy-collapse-content">
|
|
79
|
+
<div class="row_content tw-pb-[1rem] tw-text-[13px] lg:tw-text-[16px] tw-leading-[1.5] lg:tw-leading-[30px]"
|
|
80
|
+
style="color:{{ section.settings.collapsible_content_color }}">
|
|
81
|
+
{{ faq_item.description | metafield_tag }}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
65
84
|
</div>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
85
|
+
{% endfor %}
|
|
86
|
+
{% else %}
|
|
87
|
+
{% for block in section.blocks %}
|
|
88
|
+
<div class="tw-daisy-collapse collapse-arrow tw-daisy-join-item tw-border-b {% if section.settings.collapsible_arrow_style == 'light' %} tw-border-[#ffffff]/15 {% else %} tw-border-[#000000]/15 {% endif %}">
|
|
89
|
+
<input type="radio" name="my-accordion-{{ section.id }}" value="{{ forloop.index }}" {% if forloop.first %}checked data-last-checked="true"{% endif %} style="cursor: pointer;" />
|
|
90
|
+
<div class="tw-daisy-collapse-title tw-py-[20px] tw-pl-0 tw-pr-[40px] tw-text-[13px] lg:tw-text-[16px] tw-font-medium tw-leading-[1.5] lg:tw-leading-[30px]"
|
|
91
|
+
style="color:{{ section.settings.collapsible_title_color }}">
|
|
92
|
+
{{ block.settings.heading }}
|
|
93
|
+
</div>
|
|
94
|
+
<div class="tw-p-0 tw-pr-[40px] tw-daisy-collapse-content">
|
|
95
|
+
<div class="row_content tw-pb-[1rem] tw-text-[13px] lg:tw-text-[16px] tw-leading-[1.5] lg:tw-leading-[30px]"
|
|
96
|
+
style="color:{{ section.settings.collapsible_content_color }}">
|
|
97
|
+
{{ block.settings.row_content }}
|
|
98
|
+
</div>
|
|
70
99
|
</div>
|
|
71
100
|
</div>
|
|
72
|
-
|
|
73
|
-
{%
|
|
101
|
+
{% endfor %}
|
|
102
|
+
{% endif %}
|
|
103
|
+
|
|
74
104
|
</div>
|
|
75
105
|
</div>
|
|
76
106
|
</div>
|
|
@@ -126,7 +156,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
126
156
|
{
|
|
127
157
|
"type": "color",
|
|
128
158
|
"id": "content_bg_color",
|
|
129
|
-
"default": "#
|
|
159
|
+
"default": "#191919",
|
|
130
160
|
"label": "内容背景色"
|
|
131
161
|
},
|
|
132
162
|
{
|
|
@@ -145,6 +175,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
145
175
|
"default": "#FFFFFF",
|
|
146
176
|
"label": "标题颜色"
|
|
147
177
|
},
|
|
178
|
+
{
|
|
179
|
+
"type": "metaobject",
|
|
180
|
+
"id": "faq_metaobjects",
|
|
181
|
+
"label": "FAQ 元数据列表(Richtext)",
|
|
182
|
+
"metaobject_type": "faq_richtext_list"
|
|
183
|
+
},
|
|
148
184
|
{
|
|
149
185
|
"type": "select",
|
|
150
186
|
"id": "collapsible_arrow_style",
|
|
@@ -160,13 +196,19 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
160
196
|
"id": "collapsible_title_color",
|
|
161
197
|
"label": "折叠行标题颜色",
|
|
162
198
|
"default": "#FFFFFF",
|
|
163
|
-
},
|
|
164
|
-
|
|
199
|
+
},
|
|
200
|
+
{
|
|
165
201
|
"type": "color",
|
|
166
202
|
"id": "collapsible_content_color",
|
|
167
203
|
"label": "折叠行内容颜色",
|
|
168
204
|
"default": "#666666",
|
|
169
205
|
},
|
|
206
|
+
{
|
|
207
|
+
"type": "color",
|
|
208
|
+
"id": "collapsible_highlight_color",
|
|
209
|
+
"label": "折叠行内容颜色高亮颜色",
|
|
210
|
+
"default": "#ffffff",
|
|
211
|
+
},
|
|
170
212
|
{
|
|
171
213
|
"type": "header",
|
|
172
214
|
"content": "t:sections.all.padding.section_padding_heading"
|
|
@@ -216,6 +216,12 @@
|
|
|
216
216
|
"id": "visibility_countries",
|
|
217
217
|
"label": "国家/Market 列表",
|
|
218
218
|
"info": "支持国家ISO码与国家选择器中国家配置"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"type": "checkbox",
|
|
222
|
+
"id": "hide_site_footer",
|
|
223
|
+
"label": "隐藏全站 Footer",
|
|
224
|
+
"default": false
|
|
219
225
|
}
|
|
220
226
|
],
|
|
221
227
|
"blocks": [
|
|
@@ -293,6 +299,12 @@
|
|
|
293
299
|
{% endunless %}
|
|
294
300
|
}
|
|
295
301
|
}
|
|
302
|
+
|
|
303
|
+
{% if section.settings.hide_site_footer %}
|
|
304
|
+
.footer {
|
|
305
|
+
display: none !important;
|
|
306
|
+
}
|
|
307
|
+
{% endif %}
|
|
296
308
|
</style>
|
|
297
309
|
{% liquid
|
|
298
310
|
assign current_iso_code = localization.country.iso_code
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"label": "背景颜色",
|
|
10
10
|
"default": "#000000"
|
|
11
11
|
},
|
|
12
|
+
{
|
|
13
|
+
"type": "number",
|
|
14
|
+
"id": "mobile_top_offset",
|
|
15
|
+
"label": "移动端顶部偏移(px)",
|
|
16
|
+
"default": 50,
|
|
17
|
+
"info": "移动端导航栏吸顶时距离页面顶部的距离。"
|
|
18
|
+
},
|
|
12
19
|
{
|
|
13
20
|
"type": "number",
|
|
14
21
|
"id": "show_after_scroll_vh",
|
|
@@ -116,7 +123,7 @@
|
|
|
116
123
|
<div class="zz-navigation-pc-tab max-lg:tw-hidden lg:tw-h-[64px] tw-flex tw-items-center tw-justify-between tw-max-w-[1660px] lg:tw-px-[20px] tw-w-full tw-mx-auto">
|
|
117
124
|
<img
|
|
118
125
|
class="zz-navigation-pc-logo tw-w-[134px] tw-h-[12px]"
|
|
119
|
-
src="{{ section.settings.icon | image_url: width:
|
|
126
|
+
src="{{ section.settings.icon | image_url: width: 1000 }}" alt="{{ section.settings.icon.alt }}" width="134" height="12">
|
|
120
127
|
<div class="zz-navigation-pc-item-box tw-flex tw-items-center tw-overflow-x-scroll tw-ml-[40px] tw-pr-[60px]">
|
|
121
128
|
{%- if section.blocks.size > 0 -%}
|
|
122
129
|
{% for block in section.blocks %}
|
|
@@ -139,7 +146,7 @@
|
|
|
139
146
|
|
|
140
147
|
</div>
|
|
141
148
|
{% if section.settings.btn_text != blank %}
|
|
142
|
-
<div class="tw-flex-shrink-0 tw-relative">
|
|
149
|
+
<div class="tw-flex-shrink-0 tw-relative" {% if section.settings.tab_tracking_category == '151' %}data-visibility-rule="country_exclude" data-visibility-countries="United States"{% endif %}>
|
|
143
150
|
{%- if section.blocks.size > 0 -%}
|
|
144
151
|
<div class="cover-box tw-absolute tw-top-0 tw-left-[-50px] tw-w-[50px] tw-h-full"> </div>
|
|
145
152
|
|
|
@@ -164,8 +171,8 @@
|
|
|
164
171
|
<div class="mb-navigation-box-item zz-navigation-mb-item-box tw-flex tw-items-center tw-gap-[24px] tw-pr-[120px] tw-h-[52px] tw-overflow-x-scroll">
|
|
165
172
|
{%- if section.blocks.size == 0 -%}
|
|
166
173
|
<img
|
|
167
|
-
class="zz-navigation-mb-logo tw-w-[134px] tw-h-[12px]"
|
|
168
|
-
src="{{ section.settings.icon | image_url: width:
|
|
174
|
+
class="zz-navigation-mb-logo tw-w-[134px] tw-h-[12px] tw-object-contain"
|
|
175
|
+
src="{{ section.settings.icon | image_url: width: 1000 }}" alt="{{ section.settings.icon.alt }}" width="134" height="12">
|
|
169
176
|
{%- endif -%}
|
|
170
177
|
{% for block in section.blocks %}
|
|
171
178
|
<div
|
|
@@ -181,7 +188,7 @@
|
|
|
181
188
|
</div>
|
|
182
189
|
{% endfor %}
|
|
183
190
|
</div>
|
|
184
|
-
<div class="tw-flex-shrink-0 tw-relative">
|
|
191
|
+
<div class="tw-flex-shrink-0 tw-relative" {% if section.settings.tab_tracking_category == '151' %}data-visibility-rule="country_exclude" data-visibility-countries="United States"{% endif %}>
|
|
185
192
|
{%- if section.blocks.size > 0 -%}
|
|
186
193
|
<div class="cover-box tw-absolute tw-top-0 tw-left-[-40px] tw-w-[40px] tw-h-full"> </div>
|
|
187
194
|
{%- endif -%}
|
|
@@ -201,6 +208,7 @@
|
|
|
201
208
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
202
209
|
const isDesktop = window.innerWidth > 1024;
|
|
203
210
|
const currentSection = document.getElementById('shopify-section-{{section.id}}');
|
|
211
|
+
const mobileTopOffset = {{ section.settings.mobile_top_offset | default: 50 }};
|
|
204
212
|
|
|
205
213
|
// 滚动显示逻辑
|
|
206
214
|
const showAfterVh = {{ section.settings.show_after_scroll_vh | default: 0 }};
|
|
@@ -301,8 +309,7 @@
|
|
|
301
309
|
if(isDesktop) {
|
|
302
310
|
currentSection.style.top = iptipsBoxHeight + 'px';
|
|
303
311
|
} else {
|
|
304
|
-
|
|
305
|
-
currentSection.style.top = iptipsBoxHeight + 50 + 'px';
|
|
312
|
+
currentSection.style.top = iptipsBoxHeight + mobileTopOffset + 'px';
|
|
306
313
|
}
|
|
307
314
|
|
|
308
315
|
} else {
|
|
@@ -310,7 +317,7 @@
|
|
|
310
317
|
if(isDesktop) {
|
|
311
318
|
currentSection.style.top = '0px';
|
|
312
319
|
} else {
|
|
313
|
-
currentSection.style.top = '
|
|
320
|
+
currentSection.style.top = mobileTopOffset + 'px';
|
|
314
321
|
}
|
|
315
322
|
}
|
|
316
323
|
} else {
|
|
@@ -442,7 +449,7 @@
|
|
|
442
449
|
@media screen and (max-width: 1024px) {
|
|
443
450
|
#shopify-section-{{ section.id }} {
|
|
444
451
|
z-index: 499;
|
|
445
|
-
top:
|
|
452
|
+
top: {{ section.settings.mobile_top_offset | default: 50 }}px;
|
|
446
453
|
}
|
|
447
454
|
#shopify-section-{{ section.id }} .{{ btn_class }} {
|
|
448
455
|
height: 28px;
|
|
@@ -478,4 +485,4 @@
|
|
|
478
485
|
}
|
|
479
486
|
|
|
480
487
|
|
|
481
|
-
</style>
|
|
488
|
+
</style>
|
package/snippets/zz-spoke.liquid
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
logo_alt: 图标 alt
|
|
24
24
|
{% endcomment %}
|
|
25
25
|
|
|
26
|
-
{% if pc_video != blank or pc_image !=
|
|
26
|
+
{% if force_media or pc_video != blank or pc_image != blank %}
|
|
27
27
|
{% assign only_content = false %}
|
|
28
28
|
{% assign class_name = class_name
|
|
29
29
|
| default: 'tw-w-[162px] tw-h-[271px] lg:tw-w-[351px] lg:tw-h-[550px]'
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
{% if only_content == false %}
|
|
61
61
|
{% comment %} 视频/图片 {% endcomment %}
|
|
62
62
|
<div
|
|
63
|
-
class='zz-spoke-block-media tw-w-full {{media_class}}'
|
|
63
|
+
class='zz-spoke-block-media tw-relative tw-w-full {{media_class}}'
|
|
64
64
|
>
|
|
65
65
|
{% if pc_video != blank %}
|
|
66
66
|
{% render 'zz-video',
|
|
@@ -81,6 +81,17 @@
|
|
|
81
81
|
mb_width: 480
|
|
82
82
|
%}
|
|
83
83
|
{% endif %}
|
|
84
|
+
{% if logo != blank %}
|
|
85
|
+
<div class='tw-absolute tw-left-[50%] -tw-translate-x-[50%] tw-bottom-[10px] tw-z-[1] {{ logo_class }}'>
|
|
86
|
+
{% render 'zz-img',
|
|
87
|
+
pc_image: logo,
|
|
88
|
+
mb_image: logo,
|
|
89
|
+
image_alt: logo_alt,
|
|
90
|
+
pc_width: 120,
|
|
91
|
+
mb_width: 120
|
|
92
|
+
%}
|
|
93
|
+
</div>
|
|
94
|
+
{% endif %}
|
|
84
95
|
{% comment %}
|
|
85
96
|
{% if user_intro != blank %}
|
|
86
97
|
<div class='tw-absolute tw-left-0 tw-right-0 tw-bottom-0 lg:tw-top-0'>
|
|
@@ -119,7 +130,7 @@
|
|
|
119
130
|
</div>
|
|
120
131
|
{% endif %}
|
|
121
132
|
</div>
|
|
122
|
-
{% if logo != blank %}
|
|
133
|
+
{% if only_content and logo != blank %}
|
|
123
134
|
<div class='tw-absolute tw-left-[50%] -tw-translate-x-[50%] tw-bottom-[10px] {{ logo_class }}'>
|
|
124
135
|
{% render 'zz-img',
|
|
125
136
|
pc_image: logo,
|