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.
Files changed (61) hide show
  1. package/README.md +12 -0
  2. package/assets/fade-in-content.js +169 -0
  3. package/assets/gsap.min.js +11 -0
  4. package/assets/http-request.js +73 -0
  5. package/assets/jquery.js +2 -0
  6. package/assets/lozad.js +10 -0
  7. package/assets/site-jump.js +52 -0
  8. package/assets/site-jumpV2.js +35 -0
  9. package/assets/swiper-bundle.min.css +13 -0
  10. package/assets/swiper-bundle.min.js +14 -0
  11. package/assets/swiper.css +331 -0
  12. package/assets/zz-components.css +323 -0
  13. package/assets/zz-components.js +166 -0
  14. package/blocks/zz-accessories-item.liquid +183 -0
  15. package/blocks/zz-accessories-swiper.liquid +223 -0
  16. package/blocks/zz-button.liquid +189 -0
  17. package/blocks/zz-content-description-html.liquid +199 -0
  18. package/blocks/zz-content-description.liquid +200 -0
  19. package/blocks/zz-flex-layout-bg-block.liquid +520 -0
  20. package/blocks/zz-flex-layout-block.liquid +545 -0
  21. package/blocks/zz-flex-layout-widget.liquid +318 -0
  22. package/blocks/zz-full-screen-swiper.liquid +444 -0
  23. package/blocks/zz-icon.liquid +46 -0
  24. package/blocks/zz-mail.liquid +135 -0
  25. package/blocks/zz-mb-swiper-pc-flex.liquid +270 -0
  26. package/blocks/zz-ratio-image.liquid +177 -0
  27. package/blocks/zz-ratio-video.liquid +112 -0
  28. package/blocks/zz-responsive-width-image.liquid +219 -0
  29. package/blocks/zz-responsive-width-video.liquid +163 -0
  30. package/blocks/zz-scroll-animate-bg-text.liquid +265 -0
  31. package/blocks/zz-scroll-cover.liquid +64 -0
  32. package/blocks/zz-tag.liquid +48 -0
  33. package/blocks/zz-text.liquid +225 -0
  34. package/blocks/zz-title.liquid +284 -0
  35. package/blocks/zz-video-button.liquid +81 -0
  36. package/blocks/zz-video-swiper-perview-item.liquid +216 -0
  37. package/blocks/zz-video-swiper-perview.liquid +582 -0
  38. package/component.config.json +4 -0
  39. package/package.json +23 -0
  40. package/scripts/postinstall-v2.js +47 -0
  41. package/scripts/postinstall.js +39 -0
  42. package/sections/zz-flex-layout-section.liquid +266 -0
  43. package/sections/zz-navigation-tab-v3.liquid +403 -0
  44. package/sections/zz-navigation-tab.liquid +410 -0
  45. package/sections/zz-video-collapse-swiper.liquid +522 -0
  46. package/sections/zz-video-tab-swiper.liquid +745 -0
  47. package/snippets/zz-button.liquid +70 -0
  48. package/snippets/zz-content-text.liquid +56 -0
  49. package/snippets/zz-h2.liquid +31 -0
  50. package/snippets/zz-h3.liquid +31 -0
  51. package/snippets/zz-h4.liquid +30 -0
  52. package/snippets/zz-h5.liquid +39 -0
  53. package/snippets/zz-h6.liquid +39 -0
  54. package/snippets/zz-icon.liquid +74 -0
  55. package/snippets/zz-img.liquid +44 -0
  56. package/snippets/zz-prev-next-btn.liquid +62 -0
  57. package/snippets/zz-spoke.liquid +142 -0
  58. package/snippets/zz-tag.liquid +22 -0
  59. package/snippets/zz-video-button.liquid +55 -0
  60. package/snippets/zz-video-md.liquid +117 -0
  61. package/snippets/zz-video.liquid +117 -0
@@ -0,0 +1,55 @@
1
+
2
+ {% comment %}
3
+ video: 视频
4
+ poster: 封面
5
+ color:按钮颜色
6
+ - black:黑色
7
+ - white:白色
8
+ - orange:橙色
9
+
10
+ size:按钮尺寸
11
+ - large:大号
12
+ - medium:中号(默认)
13
+ - small:小号
14
+
15
+ 其他参数:
16
+ - href:链接地址
17
+ - icon:图标名称
18
+ - text:按钮文字
19
+ - class_name:自定义类名
20
+ {% endcomment %}
21
+
22
+ <zz-video-button>
23
+
24
+ {% assign btn_class_name = class_name | append: ' togglePopup' %}
25
+ {% render 'zz-button',
26
+ type: 'default',
27
+ color: color,
28
+ text: text,
29
+ size: size,
30
+ backdrop_filter: true,
31
+ class_name: btn_class_name,
32
+ icon: '<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
33
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.635 6.42979C14.5112 6.91507 14.5112 8.08492 13.635 8.57021L6.84517 12.331C5.94149 12.8315 4.79058 12.232 4.79058 11.2608L4.79058 3.73925C4.79058 2.768 5.94148 2.16851 6.84517 2.66904L13.635 6.42979Z" fill="white"/>
34
+ </svg>
35
+ '
36
+ %}
37
+
38
+ <div
39
+ class='togglePopup popup tw-flex !tw-hidden tw-bg-[rgba(0,0,0,0.9)] tw-items-center tw-justify-center tw-fixed tw-top-0 tw-left-0 tw-right-0 tw-bottom-0 tw-z-[999] tw-overflow-hidden'
40
+ >
41
+ <div class="tw-max-w-[960px]">
42
+ {% render 'zz-video',
43
+ pc_video: video,
44
+ pc_poster: poster,
45
+ lazy: false,
46
+ class: ' tw-w-full tw-h-auto',
47
+ autoplay: false,
48
+ loop: true,
49
+ %}
50
+
51
+ </div>
52
+
53
+ </div>
54
+ </zz-video-button>
55
+
@@ -0,0 +1,117 @@
1
+ {% comment %}
2
+ pc_video: 视频地址
3
+ pc_poster: 视频封面
4
+ mb_video: 视频地址
5
+ mb_poster: 视频封面
6
+ lazy: 是否懒加载
7
+ pc_posterWidth: 视频封面宽度
8
+ mb_poster_width: 视频封面宽度
9
+ class: 视频类名
10
+ autoplay: 是否自动播放
11
+ loop: 是否循环播放
12
+ muted: 是否静音
13
+ separate_display: 区分显示pc还是mb, true时 没有配置PC与mb将不会显示。不会使用PC的配置来配置mb
14
+ {% endcomment %}
15
+
16
+ {% if separate_display == true %}
17
+ {% assign separate_display = true %}
18
+ {% else %}
19
+ {% assign separate_display = false %}
20
+ {% endif %}
21
+
22
+ {% if pc_video and pc_poster %}
23
+ {% assign pc_src = pc_video %}
24
+ {% if pc_video.media_type == 'video' %}
25
+ {% assign pc_src = pc_video.sources[1].url %}
26
+ {% endif %}
27
+
28
+ {% assign video_poster_width = pc_posterWidth | default: 1500 %}
29
+ {% assign video_poster = pc_poster
30
+ | image_url: width: video_poster_width
31
+ %}
32
+ <video
33
+ {% if class %}
34
+ class='{{class}} lozad zz-video {% if autoplay %} video-play-pause {% endif %} {% if mb_video != blank and separate_display == false %} max-md:tw-hidden {% endif %}'
35
+ {% endif %}
36
+ {% if autoplay %}
37
+ autoplay
38
+ {% endif %}
39
+ {% if loop %}
40
+ loop
41
+ {% endif %}
42
+ {% if muted %}
43
+ muted
44
+ {% endif %}
45
+ {% if controls %}
46
+ controls
47
+ {% endif %}
48
+ {% if lazy %}
49
+ data-poster='{{video_poster | default: ''}}'
50
+ {% else %}
51
+ poster='{{video_poster | default: ''}}'
52
+ {% endif %}
53
+ webkit-playsinline
54
+ playsinline
55
+ x5-video-player-type='h5'
56
+
57
+ >
58
+ <source type='video/mp4'
59
+ data-src='{{pc_src}}'
60
+ {% if lazy %}
61
+ data-src='{{pc_src}}'
62
+ {% else %}
63
+ src='{{ pc_src }}'
64
+ {% endif %}
65
+ >
66
+
67
+ </video>
68
+ {% endif %}
69
+
70
+ {% if mb_video and mb_poster %}
71
+ {% assign mb_src = mb_video %}
72
+ {% if mb_video.media_type == 'video' %}
73
+ {% assign mb_src = mb_video.sources[1].url %}
74
+ {% endif %}
75
+
76
+ {% assign mb_video_poster_width = mb_poster_width | default: 1500 %}
77
+ {% assign mb_video_poster = mb_poster
78
+ | image_url: width: mb_video_poster_width
79
+ %}
80
+ <video
81
+ {% if class %}
82
+ class='{{class}} lozad zz-video {% if autoplay %} video-play-pause {% endif %} md:tw-hidden'
83
+ {% endif %}
84
+ {% if autoplay %}
85
+ autoplay
86
+ {% endif %}
87
+ {% if loop %}
88
+ loop
89
+ {% endif %}
90
+ {% if muted %}
91
+ muted
92
+ {% endif %}
93
+ {% if controls %}
94
+ controls
95
+ {% endif %}
96
+ {% if lazy %}
97
+ data-poster='{{mb_video_poster | default: ''}}'
98
+ {% else %}
99
+ poster='{{mb_video_poster | default: ''}}'
100
+ {% endif %}
101
+ webkit-playsinline
102
+ playsinline
103
+ x5-video-player-type='h5'
104
+
105
+ >
106
+ <source type='video/mp4'
107
+ data-src='{{mb_src}}'
108
+ {% if lazy %}
109
+ data-src='{{mb_src}}'
110
+ {% else %}
111
+ src='{{ mb_src }}'
112
+ {% endif %}
113
+ >
114
+
115
+ </video>
116
+ {% endif %}
117
+
@@ -0,0 +1,117 @@
1
+ {% comment %}
2
+ pc_video: 视频地址
3
+ pc_poster: 视频封面
4
+ mb_video: 视频地址
5
+ mb_poster: 视频封面
6
+ lazy: 是否懒加载
7
+ pc_posterWidth: 视频封面宽度
8
+ mb_poster_width: 视频封面宽度
9
+ class: 视频类名
10
+ autoplay: 是否自动播放
11
+ loop: 是否循环播放
12
+ muted: 是否静音
13
+ separate_display: 区分显示pc还是mb, true时 没有配置PC与mb将不会显示。不会使用PC的配置来配置mb
14
+ {% endcomment %}
15
+
16
+ {% if separate_display == true %}
17
+ {% assign separate_display = true %}
18
+ {% else %}
19
+ {% assign separate_display = false %}
20
+ {% endif %}
21
+
22
+ {% if pc_video and pc_poster %}
23
+ {% assign pc_src = pc_video %}
24
+ {% if pc_video.media_type == 'video' %}
25
+ {% assign pc_src = pc_video.sources[1].url %}
26
+ {% endif %}
27
+
28
+ {% assign video_poster_width = pc_posterWidth | default: 1500 %}
29
+ {% assign video_poster = pc_poster
30
+ | image_url: width: video_poster_width
31
+ %}
32
+ <video
33
+ {% if class %}
34
+ class='{{class}} lozad zz-video {% if autoplay %} video-play-pause {% endif %} {% if mb_video != blank and separate_display == false %} max-lg:tw-hidden {% endif %}'
35
+ {% endif %}
36
+ {% if autoplay %}
37
+ autoplay
38
+ {% endif %}
39
+ {% if loop %}
40
+ loop
41
+ {% endif %}
42
+ {% if muted %}
43
+ muted
44
+ {% endif %}
45
+ {% if controls %}
46
+ controls
47
+ {% endif %}
48
+ {% if lazy %}
49
+ data-poster='{{video_poster | default: ''}}'
50
+ {% else %}
51
+ poster='{{video_poster | default: ''}}'
52
+ {% endif %}
53
+ webkit-playsinline
54
+ playsinline
55
+ x5-video-player-type='h5'
56
+
57
+ >
58
+ <source type='video/mp4'
59
+ data-src='{{pc_src}}'
60
+ {% if lazy %}
61
+ data-src='{{pc_src}}'
62
+ {% else %}
63
+ src='{{ pc_src }}'
64
+ {% endif %}
65
+ >
66
+
67
+ </video>
68
+ {% endif %}
69
+
70
+ {% if mb_video and mb_poster %}
71
+ {% assign mb_src = mb_video %}
72
+ {% if mb_video.media_type == 'video' %}
73
+ {% assign mb_src = mb_video.sources[1].url %}
74
+ {% endif %}
75
+
76
+ {% assign mb_video_poster_width = mb_poster_width | default: 1500 %}
77
+ {% assign mb_video_poster = mb_poster
78
+ | image_url: width: mb_video_poster_width
79
+ %}
80
+ <video
81
+ {% if class %}
82
+ class='{{class}} lozad zz-video {% if autoplay %} video-play-pause {% endif %} lg:tw-hidden'
83
+ {% endif %}
84
+ {% if autoplay %}
85
+ autoplay
86
+ {% endif %}
87
+ {% if loop %}
88
+ loop
89
+ {% endif %}
90
+ {% if muted %}
91
+ muted
92
+ {% endif %}
93
+ {% if controls %}
94
+ controls
95
+ {% endif %}
96
+ {% if lazy %}
97
+ data-poster='{{mb_video_poster | default: ''}}'
98
+ {% else %}
99
+ poster='{{mb_video_poster | default: ''}}'
100
+ {% endif %}
101
+ webkit-playsinline
102
+ playsinline
103
+ x5-video-player-type='h5'
104
+
105
+ >
106
+ <source type='video/mp4'
107
+ data-src='{{mb_src}}'
108
+ {% if lazy %}
109
+ data-src='{{mb_src}}'
110
+ {% else %}
111
+ src='{{ mb_src }}'
112
+ {% endif %}
113
+ >
114
+
115
+ </video>
116
+ {% endif %}
117
+