zz-shopify-components 0.0.21 → 0.0.22

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +21 -21
  2. package/README.md +56 -56
  3. package/assets/ScrollTrigger.min.js +11 -11
  4. package/assets/gsap.min.js +11 -11
  5. package/assets/jquery.js +2 -2
  6. package/assets/lazy-video.js +2 -2
  7. package/assets/lazyload.min.js +1 -1
  8. package/assets/lozad.js +10 -10
  9. package/assets/site-jump.js +52 -52
  10. package/assets/site-jumpV2.js +35 -35
  11. package/assets/swiper-bundle.min.css +12 -12
  12. package/assets/swiper-bundle.min.js +13 -13
  13. package/assets/swiper.css +330 -330
  14. package/assets/zz-components.css +322 -322
  15. package/assets/zz-components.js +166 -166
  16. package/assets/zz-fade-in-content.js +169 -169
  17. package/blocks/zz-accessories-item.liquid +188 -188
  18. package/blocks/zz-accessories-swiper.liquid +223 -223
  19. package/blocks/zz-button.liquid +216 -216
  20. package/blocks/zz-content-description-html.liquid +201 -201
  21. package/blocks/zz-content-description.liquid +209 -209
  22. package/blocks/zz-flex-layout-bg-block.liquid +524 -524
  23. package/blocks/zz-flex-layout-block.liquid +548 -548
  24. package/blocks/zz-flex-layout-widget.liquid +321 -321
  25. package/blocks/zz-full-screen-swiper.liquid +447 -447
  26. package/blocks/zz-icon.liquid +46 -46
  27. package/blocks/zz-mail.liquid +135 -135
  28. package/blocks/zz-mb-swiper-pc-flex.liquid +273 -273
  29. package/blocks/zz-price-tag-mini.liquid +100 -106
  30. package/blocks/zz-price-tag.liquid +41 -41
  31. package/blocks/zz-ratio-image.liquid +181 -181
  32. package/blocks/zz-ratio-video.liquid +115 -115
  33. package/blocks/zz-responsive-width-image.liquid +222 -222
  34. package/blocks/zz-responsive-width-video.liquid +166 -166
  35. package/blocks/zz-scroll-animate-bg-text.liquid +268 -268
  36. package/blocks/zz-scroll-cover.liquid +67 -67
  37. package/blocks/zz-tag.liquid +50 -50
  38. package/blocks/zz-text.liquid +227 -227
  39. package/blocks/zz-title.liquid +287 -287
  40. package/blocks/zz-video-button.liquid +84 -84
  41. package/blocks/zz-video-swiper-perview-item.liquid +221 -221
  42. package/blocks/zz-video-swiper-perview.liquid +585 -585
  43. package/component.config.json +7 -7
  44. package/package.json +1 -1
  45. package/scripts/postinstall-v1.js +39 -39
  46. package/scripts/postinstall-v2.js +47 -47
  47. package/scripts/postinstall-v3.js +51 -51
  48. package/scripts/publish-npm.js +43 -43
  49. package/sections/zz-flex-layout-section.liquid +269 -269
  50. package/sections/zz-navigation-tab-v3.liquid +407 -407
  51. package/sections/zz-navigation-tab.liquid +411 -411
  52. package/sections/zz-shopping-card-list.liquid +399 -399
  53. package/sections/zz-video-collapse-swiper.liquid +522 -522
  54. package/sections/zz-video-tab-swiper.liquid +748 -748
  55. package/snippets/zz-button.liquid +70 -70
  56. package/snippets/zz-content-h3.liquid +15 -15
  57. package/snippets/zz-content-text.liquid +56 -56
  58. package/snippets/zz-h2.liquid +31 -31
  59. package/snippets/zz-h3.liquid +31 -31
  60. package/snippets/zz-h4.liquid +30 -30
  61. package/snippets/zz-h5.liquid +39 -39
  62. package/snippets/zz-h6.liquid +39 -39
  63. package/snippets/zz-icon-next.liquid +17 -17
  64. package/snippets/zz-icon-prev.liquid +17 -17
  65. package/snippets/zz-icon.liquid +74 -74
  66. package/snippets/zz-img.liquid +44 -44
  67. package/snippets/zz-prev-next-btn.liquid +62 -62
  68. package/snippets/zz-price-tag.liquid +22 -22
  69. package/snippets/zz-spoke.liquid +142 -142
  70. package/snippets/zz-tag.liquid +22 -22
  71. package/snippets/zz-video-button.liquid +54 -54
  72. package/snippets/zz-video-md.liquid +117 -117
  73. package/snippets/zz-video.liquid +117 -117
@@ -1,115 +1,115 @@
1
- {% schema %}
2
- {
3
- "name": "Ratio Video",
4
- "class": "ratio-video",
5
- "settings": [
6
- {
7
- "type": "header",
8
- "content": "PC端设置"
9
- },
10
- {
11
- "type": "video",
12
- "id": "video_pc",
13
- "label": "PC端视频"
14
- },
15
- {
16
- "type": "image_picker",
17
- "id": "poster_pc",
18
- "label": "PC端视频 封面"
19
- },
20
- {
21
- "type": "range",
22
- "id": "pc_width",
23
- "min": 0,
24
- "max": 100,
25
- "step": 1,
26
- "unit": "%",
27
- "label": "PC端占父容器的百分比,单位%",
28
- "default": 50
29
- },
30
- {
31
- "type": "number",
32
- "id": "desktop_border_radius",
33
- "label": "PC端圆角",
34
- "default": 16,
35
- "info": "单位:px"
36
- },
37
- {
38
- "type": "header",
39
- "content": "移动端设置"
40
- },
41
- {
42
- "type": "video",
43
- "id": "video_mb",
44
- "label": "移动端视频"
45
- },
46
- {
47
- "type": "image_picker",
48
- "id": "poster_mb",
49
- "label": "移动端视频封面"
50
- },
51
-
52
- {
53
- "type": "range",
54
- "id": "mobile_width",
55
- "min": 0,
56
- "max": 100,
57
- "step": 1,
58
- "unit": "%",
59
- "label": "移动端占父容器的百分比,单位%",
60
- "default": 100
61
- },
62
- {
63
- "type": "number",
64
- "id": "mobile_border_radius",
65
- "label": "移动端圆角",
66
- "default": 10,
67
- "info": "单位:px"
68
- },
69
-
70
- ],
71
- "presets": [
72
- {
73
- "name": "Ratio Video"
74
- },
75
- {
76
- "name": "宽度比例视频",
77
-
78
- }
79
- ]
80
- }
81
- {% endschema %}
82
-
83
-
84
- {% render 'zz-video',
85
- pc_video: block.settings.video_pc,
86
- pc_poster: block.settings.poster_pc,
87
- mb_video: block.settings.video_mb,
88
- mb_poster: block.settings.poster_mb,
89
- lazy: true,
90
- class: 'ratio-video tw-w-full tw-h-auto',
91
- autoplay: true,
92
- loop: true,
93
- muted: true
94
- %}
95
-
96
- <style>
97
-
98
- #shopify-block-{{ block.id }} {
99
- width: {% if block.settings.mobile_width > 0 %}{{ block.settings.mobile_width }}%{% else %}100%{% endif %};
100
- border-radius: {{ block.settings.mobile_border_radius }}px;
101
- overflow: hidden;
102
- box-sizing: border-box;
103
- overflow: hidden;
104
- }
105
-
106
-
107
- @media screen and (min-width: 1024px) {
108
- #shopify-block-{{ block.id }} {
109
- width: {% if block.settings.pc_width > 0 %}{{ block.settings.pc_width }}%{% else %}100%{% endif %};
110
- border-radius: {{ block.settings.desktop_border_radius }}px;
111
- }
112
- }
113
-
114
-
115
- </style>
1
+ {% schema %}
2
+ {
3
+ "name": "Ratio Video",
4
+ "class": "ratio-video",
5
+ "settings": [
6
+ {
7
+ "type": "header",
8
+ "content": "PC端设置"
9
+ },
10
+ {
11
+ "type": "video",
12
+ "id": "video_pc",
13
+ "label": "PC端视频"
14
+ },
15
+ {
16
+ "type": "image_picker",
17
+ "id": "poster_pc",
18
+ "label": "PC端视频 封面"
19
+ },
20
+ {
21
+ "type": "range",
22
+ "id": "pc_width",
23
+ "min": 0,
24
+ "max": 100,
25
+ "step": 1,
26
+ "unit": "%",
27
+ "label": "PC端占父容器的百分比,单位%",
28
+ "default": 50
29
+ },
30
+ {
31
+ "type": "number",
32
+ "id": "desktop_border_radius",
33
+ "label": "PC端圆角",
34
+ "default": 16,
35
+ "info": "单位:px"
36
+ },
37
+ {
38
+ "type": "header",
39
+ "content": "移动端设置"
40
+ },
41
+ {
42
+ "type": "video",
43
+ "id": "video_mb",
44
+ "label": "移动端视频"
45
+ },
46
+ {
47
+ "type": "image_picker",
48
+ "id": "poster_mb",
49
+ "label": "移动端视频封面"
50
+ },
51
+
52
+ {
53
+ "type": "range",
54
+ "id": "mobile_width",
55
+ "min": 0,
56
+ "max": 100,
57
+ "step": 1,
58
+ "unit": "%",
59
+ "label": "移动端占父容器的百分比,单位%",
60
+ "default": 100
61
+ },
62
+ {
63
+ "type": "number",
64
+ "id": "mobile_border_radius",
65
+ "label": "移动端圆角",
66
+ "default": 10,
67
+ "info": "单位:px"
68
+ },
69
+
70
+ ],
71
+ "presets": [
72
+ {
73
+ "name": "Ratio Video"
74
+ },
75
+ {
76
+ "name": "宽度比例视频",
77
+
78
+ }
79
+ ]
80
+ }
81
+ {% endschema %}
82
+
83
+
84
+ {% render 'zz-video',
85
+ pc_video: block.settings.video_pc,
86
+ pc_poster: block.settings.poster_pc,
87
+ mb_video: block.settings.video_mb,
88
+ mb_poster: block.settings.poster_mb,
89
+ lazy: true,
90
+ class: 'ratio-video tw-w-full tw-h-auto',
91
+ autoplay: true,
92
+ loop: true,
93
+ muted: true
94
+ %}
95
+
96
+ <style>
97
+
98
+ #shopify-block-{{ block.id }} {
99
+ width: {% if block.settings.mobile_width > 0 %}{{ block.settings.mobile_width }}%{% else %}100%{% endif %};
100
+ border-radius: {{ block.settings.mobile_border_radius }}px;
101
+ overflow: hidden;
102
+ box-sizing: border-box;
103
+ overflow: hidden;
104
+ }
105
+
106
+
107
+ @media screen and (min-width: 1024px) {
108
+ #shopify-block-{{ block.id }} {
109
+ width: {% if block.settings.pc_width > 0 %}{{ block.settings.pc_width }}%{% else %}100%{% endif %};
110
+ border-radius: {{ block.settings.desktop_border_radius }}px;
111
+ }
112
+ }
113
+
114
+
115
+ </style>
@@ -1,223 +1,223 @@
1
- {% schema %}
2
- {
3
- "name": "Responsive Width Image",
4
- "class": "responsive-width-image",
5
- "settings": [
6
- {
7
- "type": "header",
8
- "content": "PC端设置"
9
- },
10
- {
11
- "type": "image_picker",
12
- "id": "desktop_image",
13
- "label": "PC端图片"
14
- },
15
- {
16
- "type": "number",
17
- "id": "desktop_width_xl",
18
- "label": "PC端宽度 大屏xl屏幕",
19
- "default": 800,
20
- "info": "单位:px"
21
- },
22
- {
23
- "type": "number",
24
- "id": "desktop_width_lg",
25
- "label": "PC端宽度 中等屏lg屏幕",
26
- "default": 600,
27
- "info": "单位:px"
28
- },
29
- {
30
- "type": "number",
31
- "id": "desktop_border_radius",
32
- "label": "PC端圆角",
33
- "default": 16,
34
- "info": "单位:px"
35
- },
36
- {
37
- "type": "header",
38
- "content": "移动端设置"
39
- },
40
- {
41
- "type": "image_picker",
42
- "id": "mobile_image",
43
- "label": "移动端图片"
44
- },
45
- {
46
- "type": "select",
47
- "id": "mb_width_type",
48
- "label": "移动端宽度类型",
49
- "options": [
50
- { "value": "mb_use_padding", "label": "使用内边距限制" },
51
- { "value": "mb_use_parent_ratio", "label": "父级比例限制" },
52
- { "value": "mb_use_width_px", "label": "宽度限制PX" }
53
- ],
54
- "default": "mb_use_padding"
55
- },
56
- {
57
- "type": "number",
58
- "id": "mobile_padding_x",
59
- "label": "移动端左右内边距",
60
- "default": 0,
61
- "info": "单位:px",
62
- "visible_if": "{{ block.settings.mb_width_type == 'mb_use_padding' }}"
63
- },
64
- {
65
- "type": "range",
66
- "id": "mobile_width",
67
- "min": 0,
68
- "max": 100,
69
- "step": 1,
70
- "unit": "%",
71
- "label": "移动端占父容器的百分比,单位%",
72
- "default": 100,
73
- "visible_if": "{{ block.settings.mb_width_type == 'mb_use_parent_ratio' }}"
74
- },
75
- {
76
- "type": "number",
77
- "id": "mb_width_px",
78
- "label": "移动端宽度 宽度限制PX",
79
- "default": 100,
80
- "info": "单位:px",
81
- "visible_if": "{{ block.settings.mb_width_type == 'mb_use_width_px' }}"
82
- },
83
- {
84
- "type": "number",
85
- "id": "mobile_border_radius",
86
- "label": "移动端圆角",
87
- "default": 10,
88
- "info": "单位:px"
89
- },
90
- {
91
- "type": "text",
92
- "id": "alt",
93
- "label": "alt",
94
- "default": "image loading"
95
- },
96
- {
97
- "type": "checkbox",
98
- "id": "has_link",
99
- "label": "是否有链接",
100
- "default": false
101
- },
102
- {
103
- "type": "select",
104
- "id": "function_type",
105
- "label": "功能类型",
106
- "options": [
107
- {
108
- "value": "link",
109
- "label": "链接"
110
- },
111
- {
112
- "value": "link_map",
113
- "label": "多国家映射"
114
- },
115
- ],
116
- "default": "link",
117
- "visible_if": "{{ block.settings.has_link == true }}"
118
- },
119
- {
120
- "type": "url",
121
- "id": "url",
122
- "label": "链接",
123
- "visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
124
- },
125
- {
126
- "type": "textarea",
127
- "id": "links",
128
- "label": "Sites Link Map",
129
- "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
130
- "visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
131
- },
132
- ],
133
- "presets": [
134
- {
135
- "name": "Responsive Width Image"
136
- },
137
- {
138
- "name": "宽度响应式图片",
139
- }
140
- ]
141
- }
142
- {% endschema %}
143
-
144
- {% assign image_class = 'zz-link-' | append: block.id %}
145
-
146
- <div class="responsive-width-container tw-w-full tw-box-border {{ image_class }}">
147
- {% render 'zz-img',
148
- pc_image: block.settings.desktop_image,
149
- mb_image: block.settings.mobile_image,
150
- image_alt: block.settings.alt | escape,
151
- class_name: 'responsive-width-image',
152
- %}
153
-
154
-
155
- </div>
156
-
157
-
158
- <style>
159
-
160
- #shopify-block-{{ block.id }} .responsive-width-container {
161
- box-sizing: border-box;
162
- overflow: hidden;
163
- {% if block.settings.has_link %}
164
- cursor: pointer;
165
- {% endif %}
166
-
167
- }
168
-
169
- @media screen and (max-width: 1023px) {
170
- #shopify-block-{{ block.id }} {
171
- {% if block.settings.mb_width_type == 'mb_use_padding' %}
172
- width: 100%;
173
- {% elsif block.settings.mb_width_type == 'mb_use_parent_ratio' %}
174
- width: {{ block.settings.mobile_width }}%
175
- {% elsif block.settings.mb_width_type == 'mb_use_width_px' %}
176
- width: {{ block.settings.mb_width_px }}px;
177
- {% endif %}
178
-
179
- }
180
- #shopify-block-{{ block.id }} .responsive-width-container {
181
- border-radius: {{ block.settings.mobile_border_radius }}px;
182
- {% if block.settings.mb_width_type == 'mb_use_padding' %}
183
- padding: 0 {{ block.settings.mobile_padding_x }}px;
184
- {% endif %}
185
- }
186
-
187
- }
188
- @media screen and (min-width: 1024px) {
189
- #shopify-block-{{ block.id }} .responsive-width-container {
190
- padding: 0px;
191
- width: {{ block.settings.desktop_width_lg }}px;
192
- border-radius: {{ block.settings.desktop_border_radius }}px;
193
- }
194
- }
195
- @media screen and (min-width: 1280px) {
196
- #shopify-block-{{ block.id }} .responsive-width-container {
197
- width: {{ block.settings.desktop_width_xl }}px;
198
- }
199
- }
200
-
201
- </style>
202
-
203
- {% if block.settings.has_link %}
204
- <script>
205
- document.addEventListener('DOMContentLoaded', (event) => {
206
- const btn = document.getElementsByClassName('{{ image_class }}')
207
- if(btn && btn[0]) {
208
- {% if block.settings.function_type == 'link_map' %}
209
- if(window.bindSiteJump) {
210
- bindSiteJump(btn[0], {{ block.settings.links | json }})
211
- }
212
- {% else %}
213
- // 监听点击事件
214
- btn[0].addEventListener('click', (event) => {
215
- event.preventDefault();
216
- window.location.href = '{{ block.settings.url }}';
217
- })
218
- {% endif %}
219
- }
220
-
221
- })
222
- </script>
1
+ {% schema %}
2
+ {
3
+ "name": "Responsive Width Image",
4
+ "class": "responsive-width-image",
5
+ "settings": [
6
+ {
7
+ "type": "header",
8
+ "content": "PC端设置"
9
+ },
10
+ {
11
+ "type": "image_picker",
12
+ "id": "desktop_image",
13
+ "label": "PC端图片"
14
+ },
15
+ {
16
+ "type": "number",
17
+ "id": "desktop_width_xl",
18
+ "label": "PC端宽度 大屏xl屏幕",
19
+ "default": 800,
20
+ "info": "单位:px"
21
+ },
22
+ {
23
+ "type": "number",
24
+ "id": "desktop_width_lg",
25
+ "label": "PC端宽度 中等屏lg屏幕",
26
+ "default": 600,
27
+ "info": "单位:px"
28
+ },
29
+ {
30
+ "type": "number",
31
+ "id": "desktop_border_radius",
32
+ "label": "PC端圆角",
33
+ "default": 16,
34
+ "info": "单位:px"
35
+ },
36
+ {
37
+ "type": "header",
38
+ "content": "移动端设置"
39
+ },
40
+ {
41
+ "type": "image_picker",
42
+ "id": "mobile_image",
43
+ "label": "移动端图片"
44
+ },
45
+ {
46
+ "type": "select",
47
+ "id": "mb_width_type",
48
+ "label": "移动端宽度类型",
49
+ "options": [
50
+ { "value": "mb_use_padding", "label": "使用内边距限制" },
51
+ { "value": "mb_use_parent_ratio", "label": "父级比例限制" },
52
+ { "value": "mb_use_width_px", "label": "宽度限制PX" }
53
+ ],
54
+ "default": "mb_use_padding"
55
+ },
56
+ {
57
+ "type": "number",
58
+ "id": "mobile_padding_x",
59
+ "label": "移动端左右内边距",
60
+ "default": 0,
61
+ "info": "单位:px",
62
+ "visible_if": "{{ block.settings.mb_width_type == 'mb_use_padding' }}"
63
+ },
64
+ {
65
+ "type": "range",
66
+ "id": "mobile_width",
67
+ "min": 0,
68
+ "max": 100,
69
+ "step": 1,
70
+ "unit": "%",
71
+ "label": "移动端占父容器的百分比,单位%",
72
+ "default": 100,
73
+ "visible_if": "{{ block.settings.mb_width_type == 'mb_use_parent_ratio' }}"
74
+ },
75
+ {
76
+ "type": "number",
77
+ "id": "mb_width_px",
78
+ "label": "移动端宽度 宽度限制PX",
79
+ "default": 100,
80
+ "info": "单位:px",
81
+ "visible_if": "{{ block.settings.mb_width_type == 'mb_use_width_px' }}"
82
+ },
83
+ {
84
+ "type": "number",
85
+ "id": "mobile_border_radius",
86
+ "label": "移动端圆角",
87
+ "default": 10,
88
+ "info": "单位:px"
89
+ },
90
+ {
91
+ "type": "text",
92
+ "id": "alt",
93
+ "label": "alt",
94
+ "default": "image loading"
95
+ },
96
+ {
97
+ "type": "checkbox",
98
+ "id": "has_link",
99
+ "label": "是否有链接",
100
+ "default": false
101
+ },
102
+ {
103
+ "type": "select",
104
+ "id": "function_type",
105
+ "label": "功能类型",
106
+ "options": [
107
+ {
108
+ "value": "link",
109
+ "label": "链接"
110
+ },
111
+ {
112
+ "value": "link_map",
113
+ "label": "多国家映射"
114
+ },
115
+ ],
116
+ "default": "link",
117
+ "visible_if": "{{ block.settings.has_link == true }}"
118
+ },
119
+ {
120
+ "type": "url",
121
+ "id": "url",
122
+ "label": "链接",
123
+ "visible_if": "{{ block.settings.function_type == 'link' and block.settings.has_link == true }}"
124
+ },
125
+ {
126
+ "type": "textarea",
127
+ "id": "links",
128
+ "label": "Sites Link Map",
129
+ "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
130
+ "visible_if": "{{ block.settings.function_type == 'link_map' and block.settings.has_link == true }}"
131
+ },
132
+ ],
133
+ "presets": [
134
+ {
135
+ "name": "Responsive Width Image"
136
+ },
137
+ {
138
+ "name": "宽度响应式图片",
139
+ }
140
+ ]
141
+ }
142
+ {% endschema %}
143
+
144
+ {% assign image_class = 'zz-link-' | append: block.id %}
145
+
146
+ <div class="responsive-width-container tw-w-full tw-box-border {{ image_class }}">
147
+ {% render 'zz-img',
148
+ pc_image: block.settings.desktop_image,
149
+ mb_image: block.settings.mobile_image,
150
+ image_alt: block.settings.alt | escape,
151
+ class_name: 'responsive-width-image',
152
+ %}
153
+
154
+
155
+ </div>
156
+
157
+
158
+ <style>
159
+
160
+ #shopify-block-{{ block.id }} .responsive-width-container {
161
+ box-sizing: border-box;
162
+ overflow: hidden;
163
+ {% if block.settings.has_link %}
164
+ cursor: pointer;
165
+ {% endif %}
166
+
167
+ }
168
+
169
+ @media screen and (max-width: 1023px) {
170
+ #shopify-block-{{ block.id }} {
171
+ {% if block.settings.mb_width_type == 'mb_use_padding' %}
172
+ width: 100%;
173
+ {% elsif block.settings.mb_width_type == 'mb_use_parent_ratio' %}
174
+ width: {{ block.settings.mobile_width }}%
175
+ {% elsif block.settings.mb_width_type == 'mb_use_width_px' %}
176
+ width: {{ block.settings.mb_width_px }}px;
177
+ {% endif %}
178
+
179
+ }
180
+ #shopify-block-{{ block.id }} .responsive-width-container {
181
+ border-radius: {{ block.settings.mobile_border_radius }}px;
182
+ {% if block.settings.mb_width_type == 'mb_use_padding' %}
183
+ padding: 0 {{ block.settings.mobile_padding_x }}px;
184
+ {% endif %}
185
+ }
186
+
187
+ }
188
+ @media screen and (min-width: 1024px) {
189
+ #shopify-block-{{ block.id }} .responsive-width-container {
190
+ padding: 0px;
191
+ width: {{ block.settings.desktop_width_lg }}px;
192
+ border-radius: {{ block.settings.desktop_border_radius }}px;
193
+ }
194
+ }
195
+ @media screen and (min-width: 1280px) {
196
+ #shopify-block-{{ block.id }} .responsive-width-container {
197
+ width: {{ block.settings.desktop_width_xl }}px;
198
+ }
199
+ }
200
+
201
+ </style>
202
+
203
+ {% if block.settings.has_link %}
204
+ <script>
205
+ document.addEventListener('DOMContentLoaded', (event) => {
206
+ const btn = document.getElementsByClassName('{{ image_class }}')
207
+ if(btn && btn[0]) {
208
+ {% if block.settings.function_type == 'link_map' %}
209
+ if(window.bindSiteJump) {
210
+ bindSiteJump(btn[0], {{ block.settings.links | json }})
211
+ }
212
+ {% else %}
213
+ // 监听点击事件
214
+ btn[0].addEventListener('click', (event) => {
215
+ event.preventDefault();
216
+ window.location.href = '{{ block.settings.url }}';
217
+ })
218
+ {% endif %}
219
+ }
220
+
221
+ })
222
+ </script>
223
223
  {% endif %}