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,70 @@
1
+ {% comment %}
2
+ 按钮配置选项:
3
+ type:按钮类型
4
+ - primary:主要按钮
5
+ - default:默认按钮
6
+ - round:圆角按钮
7
+ - link:链接按钮
8
+
9
+ color:按钮颜色
10
+ - black:黑色
11
+ - white:白色
12
+ - orange:橙色
13
+
14
+ size:按钮尺寸
15
+ - large:大号
16
+ - medium:中号(默认)
17
+ - small:小号
18
+
19
+ 其他参数:
20
+ - href:链接地址
21
+ - backdrop_filter:毛玻璃效果 true/false
22
+ - icon:图标名称
23
+ - text:按钮文字
24
+ - class_name:自定义类名
25
+ {% endcomment %}
26
+
27
+ {% assign btn_type = type | default: 'primary' %}
28
+ {% assign btn_color = color | default: 'black' %}
29
+ {% assign btn_size = size | default: 'medium' %}
30
+ {% assign icon_size = icon_size | default: 15 %}
31
+
32
+ <style>
33
+ .zz-btn-icon {
34
+ display: flex;
35
+ }
36
+ </style>
37
+
38
+ {% if href %}
39
+ {% if btn_type == 'link' %}
40
+ <a href="{{ href | default: '#' }}" class="zz-btn-link tw-text-[#378DDD] tw-inline-flex tw-items-center tw-text-[12px] lg:tw-text-[14px] tw-no-underline zz-btn-link-{{ btn_size }} {{ class_name }}">
41
+ <span class="zz-btn-text">{{ text }}</span>
42
+ {% if postfix_icon %}<span class="zz-btn-icon" style="margin-left: {{ icon_left_margin }}px; margin-right: {{ icon_right_margin }}px;">
43
+ {% render 'zz-icon', icon_name: postfix_icon, icon_size: icon_size %}
44
+ </span>{% endif %}
45
+ </a>
46
+ {% else %}
47
+ <a
48
+ href="{{ href | default: '#' }}"
49
+ class="zz-btn zz-btn-{{ btn_type }} zz-btn-{{ btn_color }} zz-btn-{{ btn_size }} {{ class_name }}"
50
+ {% if backdrop_filter %}
51
+ style="backdrop-filter: blur(12px);background: #FFFFFF0F;"
52
+ {% endif %}
53
+ >
54
+ {% if icon %}<span class="zz-btn-icon">{{ icon }}</span>{% endif %}
55
+ <span class="zz-btn-text">{{ text }}</span>
56
+ </a>
57
+ {% endif %}
58
+
59
+ {% else %}
60
+
61
+ <button
62
+ class="zz-btn zz-btn-{{ btn_type }} zz-btn-{{ btn_color }} zz-btn-{{ btn_size }} {{ class_name }}"
63
+ {% if backdrop_filter %}
64
+ style="backdrop-filter: blur(12px);background: #FFFFFF0F;"
65
+ {% endif %}
66
+ >
67
+ {% if icon %}<span class="zz-btn-icon">{{ icon }}</span>{% endif %}
68
+ <span class="zz-btn-text">{{ text }}</span>
69
+ </button>
70
+ {% endif %}
@@ -0,0 +1,56 @@
1
+ {% comment %}
2
+ text: 内容
3
+ mb_text: 移动端内容
4
+ color: 标题颜色
5
+ highlight_color: 高亮颜色
6
+ link_color: 链接颜色
7
+ class_name: 增加类名
8
+ pc_font_size: pc端字体大小
9
+ mobile_font_size: 移动端字体大小
10
+ pc_text_align: pc端对齐方式
11
+ font_weight: 字体粗细
12
+ mobile_text_align: 移动端对齐方式
13
+ {% endcomment %}
14
+
15
+ {% if text != blank %}
16
+ <div class="content-text content-text-pc max-lg:tw-hidden tw-text-[#170B01B2] tw-text-[16px] tw-leading-[1.5] tw-text-left {{ class_name }} "
17
+ style="color: {{ text_color }};font-weight: {{ font_weight }};
18
+ font-size: {{ pc_font_size }}px;
19
+ text-align: {{ pc_text_align }};
20
+ {% if pc_font_line_height %}line-height: {{ pc_font_line_height }};{% endif %}"
21
+ >
22
+ {{ text }}
23
+ </div>
24
+ {% endif %}
25
+
26
+ {% if mb_text != blank %}
27
+ <div
28
+ class="content-text content-text-mobile lg:tw-hidden tw-text-[#170B01B2] tw-text-[14px] tw-leading-[1.5] tw-text-left {{ class_name }}"
29
+ style="color: {{ text_color }};font-weight: {{ font_weight }};
30
+ font-size: {{ mobile_font_size }}px;
31
+ text-align: {{ mobile_text_align }};
32
+ {% if mobile_font_line_height %}line-height: {{ mobile_font_line_height }};{% endif %}"
33
+ >
34
+ {{ mb_text | default: text }}
35
+ </div>
36
+ {% endif %}
37
+
38
+
39
+
40
+
41
+ <style>
42
+
43
+ {% if highlight_color %}
44
+ #shopify-section-{{ section.id }} .content-text strong {
45
+ color: {{ highlight_color }};
46
+ font-weight: inherit;
47
+ }
48
+ {% endif %}
49
+ {% if link_color %}
50
+ #shopify-section-{{ section.id }} .content-text a {
51
+ color: {{ link_color }};
52
+ text-decoration: underline;
53
+ }
54
+ {% endif %}
55
+
56
+ </style>
@@ -0,0 +1,31 @@
1
+ {% comment %}
2
+ title: 标题
3
+ title_mb: 移动端标题
4
+ title_color_gradient: 标题颜色渐变
5
+ title_color: 标题颜色
6
+ class_name: 增加类名
7
+ italic: 斜体
8
+ {% endcomment %}
9
+ {%- capture heading_color -%}
10
+ {%- if title_color_gradient != blank %}
11
+ background-image: {{ title_color_gradient }};
12
+ -webkit-background-clip: text;
13
+ color: transparent;
14
+ {%- elsif title_color != blank -%}
15
+ color: {{ title_color }};
16
+ {%- endif %}
17
+ {%- endcapture %}
18
+
19
+ <h2
20
+ class='{{ class_name }} zz-title-hx title-h2 max-lg:tw-hidden tw-m-0 tw-w-[full] lg:tw-text-[60px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
21
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
22
+ >
23
+ {{ title }}
24
+ </h2>
25
+ <h2
26
+ class='{{ class_name }} zz-title-hx title-h2 lg:tw-hidden tw-m-0 tw-w-[full] tw-text-[28px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
27
+ style='{{ heading_color }} {% if font_weight_mb == 'custom' %}font-weight: {{ font_weight_mb_custom }};{% endif %}'
28
+ >
29
+ {{ title_mb | default: title }}
30
+ </h2>
31
+
@@ -0,0 +1,31 @@
1
+ {% comment %}
2
+ title: 标题
3
+ title_mb: 移动端标题
4
+ title_color_gradient: 标题颜色渐变
5
+ title_color: 标题颜色
6
+ class_name: 增加类名
7
+ italic: 斜体
8
+ {% endcomment %}
9
+ {%- capture heading_color -%}
10
+ {%- if title_color_gradient != blank %}
11
+ background-image: {{ title_color_gradient }};
12
+ -webkit-background-clip: text;
13
+ color: transparent;
14
+ {%- elsif title_color != blank -%}
15
+ color: {{ title_color }};
16
+ {%- endif %}
17
+ {%- endcapture %}
18
+
19
+ <h3
20
+ class='{{ class_name }} zz-title-hx title-h3 max-lg:tw-hidden tw-m-0 tw-w-[full] lg:tw-text-[48px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
21
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
22
+ >
23
+ {{ title }}
24
+ </h3>
25
+ <h3
26
+ class='{{ class_name }} zz-title-hx title-h3 lg:tw-hidden tw-m-0 tw-w-[full] tw-text-[24px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
27
+ style='{{ heading_color }} {% if font_weight_mb == 'custom' %}font-weight: {{ font_weight_mb_custom }};{% endif %}'
28
+ >
29
+ {{ title_mb | default: title }}
30
+ </h3>
31
+
@@ -0,0 +1,30 @@
1
+ {% comment %}
2
+ title: 标题
3
+ title_mb: 移动端标题
4
+ title_color_gradient: 标题颜色渐变
5
+ title_color: 标题颜色
6
+ class_name: 增加类名
7
+ {% endcomment %}
8
+ {%- capture heading_color -%}
9
+ {%- if title_color_gradient != blank %}
10
+ background-image: {{ title_color_gradient }};
11
+ -webkit-background-clip: text;
12
+ color: transparent;
13
+ {%- elsif title_color != blank -%}
14
+ color: {{ title_color }};
15
+ {%- endif %}
16
+ {%- endcapture %}
17
+
18
+ <h4
19
+ class='{{ class_name }} zz-title-hx title-h4 max-lg:tw-hidden tw-m-0 tw-w-[full] lg:tw-text-[40px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
20
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
21
+ >
22
+ {{ title }}
23
+ </h4>
24
+ <h4
25
+ class='{{ class_name }} zz-title-hx title-h4 lg:tw-hidden tw-m-0 tw-w-[full] tw-text-[20px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
26
+ style='{{ heading_color }} {% if font_weight_mb == 'custom' %}font-weight: {{ font_weight_mb_custom }};{% endif %}'
27
+ >
28
+ {{ title_mb | default: title }}
29
+ </h4>
30
+
@@ -0,0 +1,39 @@
1
+ {% comment %}
2
+ title: 标题
3
+ title_mb: 移动端标题
4
+ title_color_gradient: 标题颜色渐变
5
+ title_color: 标题颜色
6
+ class_name: 增加类名
7
+ {% endcomment %}
8
+ {%- capture heading_color -%}
9
+ {%- if title_color_gradient != blank %}
10
+ background-image: {{ title_color_gradient }};
11
+ -webkit-background-clip: text;
12
+ color: transparent;
13
+ {%- elsif title_color != blank -%}
14
+ color: {{ title_color }};
15
+ {%- endif %}
16
+ {%- endcapture %}
17
+
18
+ {% if title_mb == blank %}
19
+ <h5
20
+ class='{{ class_name }} zz-title-hx title-h5 tw-m-0 tw-w-[full] tw-text-[16px] lg:tw-text-[32px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
21
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
22
+ >
23
+ {{ title }}
24
+ </h5>
25
+ {% else %}
26
+ <h5
27
+ class='{{ class_name }} zz-title-hx title-h5 max-lg:tw-hidden tw-m-0 tw-w-[full] lg:tw-text-[32px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
28
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
29
+ >
30
+ {{ title }}
31
+ </h5>
32
+ <h5
33
+ class='{{ class_name }} zz-title-hx title-h5 lg:tw-hidden tw-m-0 tw-w-[full] tw-text-[16px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
34
+ style='{{ heading_color }} {% if font_weight_mb == 'custom' %}font-weight: {{ font_weight_mb_custom }};{% endif %}'
35
+ >
36
+ {{ title_mb }}
37
+ </h5>
38
+ {% endif %}
39
+
@@ -0,0 +1,39 @@
1
+ {% comment %}
2
+ title: 标题
3
+ title_mb: 移动端标题
4
+ title_color_gradient: 标题颜色渐变
5
+ title_color: 标题颜色
6
+ class_name: 增加类名
7
+ {% endcomment %}
8
+ {%- capture heading_color -%}
9
+ {%- if title_color_gradient != blank %}
10
+ background-image: {{ title_color_gradient }};
11
+ -webkit-background-clip: text;
12
+ color: transparent;
13
+ {%- elsif title_color != blank -%}
14
+ color: {{ title_color }};
15
+ {%- endif %}
16
+ {%- endcapture %}
17
+
18
+ {% if title_mb == blank %}
19
+ <h6
20
+ class='{{ class_name }} zz-title-hx title-h6 tw-m-0 tw-w-[full] tw-text-[14px] lg:tw-text-[24px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
21
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
22
+ >
23
+ {{ title }}
24
+ </h6>
25
+ {% else %}
26
+ <h6
27
+ class='{{ class_name }} zz-title-hx title-h6 max-lg:tw-hidden tw-m-0 tw-w-[full] lg:tw-text-[24px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
28
+ style='{{ heading_color }} {% if font_weight == 'custom' %}font-weight: {{ font_weight_custom }};{% endif %}'
29
+ >
30
+ {{ title }}
31
+ </h6>
32
+ <h6
33
+ class='{{ class_name }} zz-title-hx title-h6 lg:tw-hidden tw-m-0 tw-w-[full] tw-text-[14px] tw-leading-[1.2] tw-tracking-normal {% if italic %}tw-italic{% endif %}'
34
+ style='{{ heading_color }} {% if font_weight_mb == 'custom' %}font-weight: {{ font_weight_mb_custom }};{% endif %}'
35
+ >
36
+ {{ title_mb }}
37
+ </h6>
38
+ {% endif %}
39
+
@@ -0,0 +1,74 @@
1
+ {% comment %}
2
+ 按钮配置选项:
3
+ type:按钮类型
4
+ - primary:主要按钮
5
+ - default:默认按钮
6
+ - round:圆角按钮
7
+ - link:链接按钮
8
+
9
+ color:按钮颜色
10
+ - black:黑色
11
+ - white:白色
12
+ - orange:橙色
13
+
14
+ size:按钮尺寸
15
+ - large:大号
16
+ - medium:中号(默认)
17
+ - small:小号
18
+
19
+ 其他参数:
20
+ - href:链接地址
21
+ - backdrop_filter:毛玻璃效果 true/false
22
+ - icon:图标名称
23
+ - text:按钮文字
24
+ - class_name:自定义类名
25
+ {% endcomment %}
26
+
27
+ {% assign icon_name = icon_name | default: 'download' %}
28
+ {% assign icon_color = icon_color | default: 'currentColor' %}
29
+ {% assign icon_size = icon_size | default: '15' %}
30
+
31
+ {% if icon_name == 'download' %}
32
+ <svg
33
+ width='{{ icon_size }}px'
34
+ height='{{ icon_size }}px'
35
+ viewBox='0 0 15 15'
36
+ fill='none'
37
+ xmlns='http://www.w3.org/2000/svg'
38
+ >
39
+ <path d="M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path>
40
+ </svg>
41
+ {% elsif icon_name == 'arrow-right' %}
42
+ <svg
43
+ width='{{ icon_size }}px'
44
+ height='{{ icon_size }}px'
45
+ viewBox='0 0 15 15'
46
+ fill='none'
47
+ xmlns='http://www.w3.org/2000/svg'
48
+ >
49
+ <path d="M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path>
50
+ </svg>
51
+ {% elsif icon_name == 'mail' %}
52
+ <svg
53
+ width='{{ icon_size }}px'
54
+ height='{{ icon_size }}px'
55
+ viewBox='0 0 15 15'
56
+ fill='none'
57
+ xmlns='http://www.w3.org/2000/svg'
58
+ >
59
+ <path d="M1 2C0.447715 2 0 2.44772 0 3V12C0 12.5523 0.447715 13 1 13H14C14.5523 13 15 12.5523 15 12V3C15 2.44772 14.5523 2 14 2H1ZM1 3L14 3V3.92494C13.9174 3.92486 13.8338 3.94751 13.7589 3.99505L7.5 7.96703L1.24112 3.99505C1.16621 3.94751 1.0826 3.92486 1 3.92494V3ZM1 4.90797V12H14V4.90797L7.74112 8.87995C7.59394 8.97335 7.40606 8.97335 7.25888 8.87995L1 4.90797Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path>
60
+ </svg>
61
+ {% elsif icon_name == "copy" %}
62
+ <svg
63
+ width='{{ icon_size }}px'
64
+ height='{{ icon_size }}px'
65
+ viewBox='0 0 25 25'
66
+ fill='none'
67
+ xmlns='http://www.w3.org/2000/svg'
68
+ >
69
+ <path d="M10 8.76172V7.26172C10 6.98558 10.2239 6.76172 10.5 6.76172H17.5C17.7761 6.76172 18 6.98558 18 7.26172V16.7617C18 17.0379 17.7761 17.2617 17.5 17.2617H15.7778" stroke="currentColor" stroke-linecap="round"/>
70
+ <rect x="8" y="8.76172" width="8" height="10" rx="0.5" stroke="currentColor"/>
71
+ <path d="M10 11.7617H13" stroke="currentColor" stroke-linecap="round"/>
72
+ <path d="M10 14.7617H12" stroke="currentColor" stroke-linecap="round"/>
73
+ </svg>
74
+ {% endif %}
@@ -0,0 +1,44 @@
1
+ {% comment %}
2
+ pc_image: pc 端图片
3
+ mb_image: 移动端图片
4
+ image_alt: 图片描述
5
+ class_name: 增加类名
6
+ close_lazy: 是否关闭懒加载 true 关闭 false 开启
7
+ pc_width: pc 端宽度, 做图片尺寸优化
8
+ mb_width: 移动端宽度, 做图片尺寸优化
9
+ {% endcomment %}
10
+ {%- assign pc_width = pc_width | default: 1800 -%}
11
+ {%- assign mb_width = mb_width | default: 800 -%}
12
+
13
+ {%- assign pc_classes = class_name | append: ' max-lg:tw-hidden tw-w-full tw-h-auto tw-object-cover' -%}
14
+ {%- assign mb_classes = class_name | append: ' lg:tw-hidden tw-w-full tw-h-auto tw-object-cover' -%}
15
+
16
+ {%- if close_lazy == true -%}
17
+ {%- assign lazy_load = 'eager' -%}
18
+ {%- else -%}
19
+ {%- assign lazy_load = 'lazy' -%}
20
+ {%- endif -%}
21
+
22
+ {%- if pc_image -%}
23
+ {{
24
+ pc_image
25
+ | image_url: width: pc_width
26
+ | image_tag:
27
+ alt: image_alt,
28
+ class: pc_classes,
29
+ widths: '800, 1000, 1200, 1500, 1800 2000',
30
+ loading: lazy_load
31
+ }}
32
+ {%- endif -%}
33
+ {%- if mb_image -%}
34
+ {{
35
+ mb_image
36
+ | image_url: width: mb_width
37
+ | image_tag:
38
+ alt: image_alt,
39
+ class: mb_classes,
40
+ widths: '400, 600, 800',
41
+ loading: lazy_load
42
+ }}
43
+ {%- endif -%}
44
+
@@ -0,0 +1,62 @@
1
+ {% comment %}
2
+ type: 类型 prev | next
3
+ color_type: 颜色类型 dark | light
4
+ class_name: 增加类名
5
+ {% endcomment %}
6
+ {% if type == 'prev' %}
7
+ {% if color_type == 'light' %}
8
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
9
+ <foreignObject x="-12" y="-12" width="72" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(6px);clip-path:url(#bgblur_0_15512_12512_clip_path);height:100%;width:100%"></div></foreignObject><rect data-figma-bg-blur-radius="12" width="48" height="48" rx="24" fill="white" fill-opacity="0.3"/>
10
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19 24L26.0711 16.9289L26.0608 19.1149L21.1757 24L26.0711 28.8718L26.0711 31.0711L19 24Z" fill="white"/>
11
+ <defs>
12
+ <clipPath id="bgblur_0_15512_12512_clip_path" transform="translate(12 12)"><rect width="48" height="48" rx="24"/>
13
+ </clipPath></defs>
14
+ </svg>
15
+ {% else %}
16
+ <svg
17
+ width='36'
18
+ height='36'
19
+ viewBox='0 0 36 36'
20
+ fill='none'
21
+ xmlns='http://www.w3.org/2000/svg'
22
+ >
23
+ <foreignObject x="-12" y="-12" width="60" height="60"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(6px);clip-path:url(#bgblur_0_12868_2987_clip_path);height:100%;width:100%"></div></foreignObject><g data-figma-bg-blur-radius="12">
24
+ <rect width="36" height="36" rx="18" fill="black" fill-opacity="0.03"/>
25
+ <rect x="0.5" y="0.5" width="35" height="35" rx="17.5" stroke="black" stroke-opacity="0.06"/>
26
+ </g>
27
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13 18L20.0711 10.9289L20.0608 13.1149L15.1757 18L20.0711 22.8718L20.0711 25.0711L13 18Z" fill="black"/>
28
+ <defs>
29
+ <clipPath id="bgblur_0_12868_2987_clip_path" transform="translate(12 12)"><rect width="36" height="36" rx="18"/>
30
+ </clipPath></defs>
31
+ </svg>
32
+
33
+ {% endif %}
34
+ {% else %}
35
+ {% if color_type == 'light' %}
36
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
37
+ <foreignObject x="-12" y="-12" width="72" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(6px);clip-path:url(#bgblur_0_15512_12506_clip_path);height:100%;width:100%"></div></foreignObject><rect data-figma-bg-blur-radius="12" width="48" height="48" rx="24" fill="white" fill-opacity="0.3"/>
38
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M29 24L21.9289 16.9289L21.9392 19.1149L26.8243 24L21.9289 28.8718L21.9289 31.0711L29 24Z" fill="white"/>
39
+ <defs>
40
+ <clipPath id="bgblur_0_15512_12506_clip_path" transform="translate(12 12)"><rect width="48" height="48" rx="24"/>
41
+ </clipPath></defs>
42
+ </svg>
43
+
44
+ {% else %}
45
+ <svg
46
+ width='36'
47
+ height='36'
48
+ viewBox='0 0 36 36'
49
+ fill='none'
50
+ xmlns='http://www.w3.org/2000/svg'
51
+ >
52
+ <foreignObject x="-11.9957" y="-12" width="60" height="60"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(6px);clip-path:url(#bgblur_0_12868_2998_clip_path);height:100%;width:100%"></div></foreignObject><g data-figma-bg-blur-radius="12">
53
+ <rect x="0.0043335" width="36" height="36" rx="18" fill="black" fill-opacity="0.03"/>
54
+ <rect x="0.504333" y="0.5" width="35" height="35" rx="17.5" stroke="black" stroke-opacity="0.06"/>
55
+ </g>
56
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M23.0043 18L15.9333 10.9289L15.9435 13.1149L20.8286 18L15.9333 22.8718L15.9333 25.0711L23.0043 18Z" fill="black"/>
57
+ <defs>
58
+ <clipPath id="bgblur_0_12868_2998_clip_path" transform="translate(11.9957 12)"><rect x="0.0043335" width="36" height="36" rx="18"/>
59
+ </clipPath></defs>
60
+ </svg>
61
+ {% endif %}
62
+ {% endif %}
@@ -0,0 +1,142 @@
1
+ {% comment %}
2
+ 背书
3
+ bg_color: 背景色
4
+ pc_image: pc 端图片/视频封面
5
+ mb_image: 移动端图片/视频封面
6
+ pc_video: pc 端视频
7
+ mb_video: 移动端视频
8
+ media_class: 图片/视频类名(设置高)
9
+ pc_media_pos: pc 端视频位置 'top'|'bottom',默认 top
10
+ mb_media_pos: 移动端视频位置 'top'|'bottom',默认 top
11
+ class_name: 自定义类名(设置宽高)
12
+
13
+ user_name: 用户名
14
+ name_class: 名字类名(设置文字大小和颜色)
15
+ user_account: 账号
16
+ account_class: 账号类名
17
+ user_avatar: 用户头像
18
+ content: 内容
19
+ content_class: 内容类名(设置文字大小和颜色)
20
+
21
+ logo: 图标
22
+ logo_class: 图标类名
23
+ logo_alt: 图标 alt
24
+ {% endcomment %}
25
+
26
+ {% if pc_video != blank or pc_image != black %}
27
+ {% assign only_content = false %}
28
+ {% assign class_name = class_name
29
+ | default: 'tw-w-[162px] tw-h-[271px] lg:tw-w-[351px] lg:tw-h-[550px]'
30
+ %}
31
+ {% if content != blank %}
32
+ {% assign media_class = media_class
33
+ | default: 'tw-h-[152px] lg:tw-h-[397px]'
34
+ %}
35
+ {% else %}
36
+ {% assign media_class = media_class
37
+ | default: 'tw-h-[221px] lg:tw-h-[468px]'
38
+ %}
39
+ {% endif %}
40
+ {% else %}
41
+ {% assign only_content = true %}
42
+ {% assign class_name = class_name
43
+ | default: 'tw-w-[162px] tw-h-[175px] lg:tw-w-[351px] lg:tw-h-[265px]'
44
+ %}
45
+ {% endif %}
46
+
47
+ {% assign pc_media_pos = pc_media_pos | default: 'top' %}
48
+ {% assign mb_media_pos = mb_media_pos | default: 'top' %}
49
+ {% assign bg_color = bg_color | default: 'rgba(255,255,255,0.1)' %}
50
+ {% assign name_class = name_class
51
+ | default: 'max-lg:tw-text-[10px] lg:tw-text-[14px] tw-text-white'
52
+ %}
53
+ {% assign account_class = account_class | default: 'tw-opacity-50' %}
54
+ {% assign content_class = content_class
55
+ | default: 'max-lg:tw-text-[9px] lg:tw-text-[14px] tw-tracking-[0.01] tw-text-white'
56
+ %}
57
+ {% assign logo_class = logo_class | default: 'tw-w-[39px] lg:tw-w-[45px]' %}
58
+
59
+ <div class='zz-spoke-block tw-relative tw-flex {% if pc_media_pos == 'top' %}lg:tw-flex-col {% else %}lg:tw-flex-col-reverse {% endif %} {% if mb_media_pos == 'top' %}max-lg:tw-flex-col {% else %}max-lg:tw-flex-col-reverse {% endif %} tw-rounded-[10px] lg:tw-rounded-[16px] tw-overflow-hidden tw-justify-between {{ class_name }}'>
60
+ {% if only_content == false %}
61
+ {% comment %} 视频/图片 {% endcomment %}
62
+ <div
63
+ class='zz-spoke-block-media tw-w-full {{media_class}}'
64
+ >
65
+ {% if pc_video != blank %}
66
+ {% render 'zz-video',
67
+ pc_video: pc_video,
68
+ pc_poster: pc_image,
69
+ mb_video: mb_video,
70
+ mb_poster: mb_image,
71
+ pc_posterWidth: 700,
72
+ mb_poster_width: 480,
73
+ class: 'click-video-play-pause tw-w-full tw-h-full tw-cursor-pointer tw-object-cover'
74
+ %}
75
+ {% else %}
76
+ {% render 'zz-img',
77
+ pc_image: pc_image,
78
+ mb_image: mb_image,
79
+ image_alt: image_alt,
80
+ pc_width: 700,
81
+ mb_width: 480
82
+ %}
83
+ {% endif %}
84
+ {% comment %}
85
+ {% if user_intro != blank %}
86
+ <div class='tw-absolute tw-left-0 tw-right-0 tw-bottom-0 lg:tw-top-0'>
87
+ <div class='max-lg:tw-text-[12px] lg:tw-text-[14px] tw-leading-[1.2] tw-font-bold tw-text-white'>
88
+ {{ user_name | upcase }}
89
+ </div>
90
+ <div class='tw-mt-[4px] max-lg:tw-text-[10px] lg:tw-text-[14px] tw-font-medium tw-text-white/70 lg:tw-text-white/60'>
91
+ {{ user_intro | upcase }}
92
+ </div>
93
+ </div>
94
+ {% endif %}
95
+ {% endcomment %}
96
+ </div>
97
+ {% endif %}
98
+ <div class='zz-spoke-block-content tw-relative tw-p-[10px] tw-pr-[0px] lg:tw-pl-[24px] lg:tw-pr-[30px] lg:tw-py-[20px] tw-w-full tw-h-fit tw-rounded-[10px] lg:tw-rounded-[16px] tw-overflow-hidden {% if only_content %}tw-pb-[32px] lg:tw-pb-[40px] {% else %}tw-pb-[10px] lg:tw-pb-[20px]{% endif %}'>
99
+ <div class='tw-flex tw-items-center'>
100
+ <div class='tw-w-[20px] tw-min-w-[20px] tw-h-[20px] lg:tw-w-[36px] lg:tw-min-w-[36px] lg:tw-h-[36px]'>
101
+ {% render 'zz-img',
102
+ pc_image: user_avatar,
103
+ mb_image: user_avatar,
104
+ image_alt: user_name,
105
+ pc_width: 72,
106
+ mb_width: 60
107
+ %}
108
+ </div>
109
+ <div class='tw-ml-[10px] tw-leading-[1.5] tw-font-bold {{ name_class }}'>
110
+ {{ user_name }}
111
+ <span class='tw-block tw-font-medium tw-leading-[1.5] {{ account_class }}'>
112
+ {{- user_account -}}
113
+ </span>
114
+ </div>
115
+ </div>
116
+ {% if content != blank %}
117
+ <div class='tw-mt-[8px] lg:tw-mt-[14px] tw-leading-[1.5] {{ content_class }}'>
118
+ {{ content }}
119
+ </div>
120
+ {% endif %}
121
+ </div>
122
+ {% if logo != blank %}
123
+ <div class='tw-absolute tw-left-[50%] -tw-translate-x-[50%] tw-bottom-[10px] {{ logo_class }}'>
124
+ {% render 'zz-img',
125
+ pc_image: logo,
126
+ mb_image: logo,
127
+ image_alt: logo_alt,
128
+ pc_width: 120,
129
+ mb_width: 120
130
+ %}
131
+ </div>
132
+ {% endif %}
133
+ </div>
134
+
135
+ <style>
136
+ .zz-spoke-block {
137
+ background-color: {{ bg_color }};
138
+ }
139
+ .zz-spoke-block p {
140
+ margin: 0;
141
+ }
142
+ </style>
@@ -0,0 +1,22 @@
1
+ {% comment %}
2
+ tag: 标签
3
+ tag_bg_color_gradient: 标签背景颜色渐变
4
+ tag_bg_color: 标签背景颜色
5
+ tag_color: 标签颜色
6
+ class_name: 增加类名
7
+ {% endcomment %}
8
+
9
+ {%- capture tag_bg_color -%}
10
+ {%- if tag_bg_color_gradient != blank %}
11
+ {{ tag_bg_color_gradient }}
12
+ {%- else -%}
13
+ {{ tag_bg_color }}
14
+ {%- endif %}
15
+ {%- endcapture %}
16
+ {% assign tag_color = tag_color %}
17
+ <div
18
+ class='{{ class_name }} zz-tag tw-z-[1] tw-w-fit tw-relative tw-italic tw-font-bold max-lg:tw-h-[24px] tw-text-[16px] tw-leading-[24px] tw-px-[16px] lg:tw-h-[32px] lg:tw-text-[20px] lg:tw-px-[28px] lg:tw-leading-[32px]'
19
+ style='color: {{ tag_color }}; --zz-tag-bg-color: {{ tag_bg_color }};'
20
+ >
21
+ {{ tag }}
22
+ </div>