zz-shopify-components 0.36.1-beta.0 → 0.36.1-beta.10

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.
@@ -314,8 +314,22 @@ class BuyNowBottomBar extends HTMLElement {
314
314
  // 计算折扣
315
315
  const discountEl = this.querySelectorAll('.price-discouter');
316
316
  if (discountEl.length > 0) {
317
- const percent = total_price.times(100).dividedBy(total_before);
318
- const discountPercent = 100 - percent;
317
+ const discountPercent = total_before
318
+ .minus(total_price)
319
+ .times(100)
320
+ .dividedBy(total_before)
321
+ .toNumber();
322
+ const percentRound = this.dataset.percentRound || 'floor';
323
+ let roundedDiscountPercent = discountPercent;
324
+
325
+ if (percentRound === 'round') {
326
+ roundedDiscountPercent = Math.round(discountPercent);
327
+ } else if (percentRound === 'ceil') {
328
+ roundedDiscountPercent = Math.ceil(discountPercent);
329
+ } else {
330
+ roundedDiscountPercent = Math.floor(discountPercent);
331
+ }
332
+
319
333
  const discountValue = total_before.minus(total_price);
320
334
 
321
335
  discountEl.forEach((el) => {
@@ -323,7 +337,7 @@ class BuyNowBottomBar extends HTMLElement {
323
337
  el.classList.remove('tw-hidden');
324
338
  el.textContent =
325
339
  this.dataset.discountType === 'percent'
326
- ? '- ' + Math.round(discountPercent) + '%'
340
+ ? '- ' + roundedDiscountPercent + '%'
327
341
  : 'Save ' + this.currency + discountValue;
328
342
  } else {
329
343
  el.classList.add('tw-hidden');
@@ -170,7 +170,11 @@
170
170
  </svg>
171
171
  </button>
172
172
 
173
- <div class="zz-bottom-popup__body zz-overflow-scrollbar-hidden">
173
+ <div
174
+ {% if block.settings.modal_id != blank %}
175
+ data-track-zz-scroll="{{ block.settings.modal_id }}"
176
+ {% endif %}
177
+ class="zz-bottom-popup__body zz-overflow-scrollbar-hidden">
174
178
  <div class="zz-bottom-popup__inner" id="{{ modal_id }}-title">
175
179
  {% content_for 'blocks' %}
176
180
  </div>
@@ -42,11 +42,10 @@
42
42
 
43
43
  align-items: center;
44
44
  justify-content: center;
45
+ background: #FFFFFF33;
45
46
  {% if block.settings.theme_color == 'white' %}
46
- background: #FFFFFF33;
47
47
  color: #FFFFFF;
48
48
  {% else %}
49
- background: #2D2D2D66;
50
49
  color:#2D2D2D;
51
50
  {% endif %}
52
51
 
@@ -0,0 +1,323 @@
1
+ {{ 'component-newsletter.css' | asset_url | stylesheet_tag }}
2
+
3
+ {%- style -%}
4
+ #shopify-block-{{ block.id }} {
5
+ width: 100%;
6
+ }
7
+ #shopify-block-{{ block.id }} .subscribe-consent {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 20px;
11
+ letter-spacing: 0px;
12
+ }
13
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form {
14
+ align-items: flex-start;
15
+ gap: 20px;
16
+ }
17
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form__field-wrapper {
18
+ max-width: 100%;
19
+ /* width: {{ block.settings.input_width }}px; */
20
+ }
21
+ #shopify-block-{{ block.id }} .subscribe-consent .field {
22
+ z-index: 0;
23
+ }
24
+ #shopify-block-{{ block.id }} .subscribe-consent .field__input {
25
+ box-sizing: border-box;
26
+ margin: 0;
27
+ padding: 10px 52px 10px 16px;
28
+ background: {{ block.settings.input_color }};
29
+ border: 1px solid {{ block.settings.input_border_color }};
30
+ border-radius: 3px;
31
+ font-size: 12px;
32
+ height: 36px;
33
+ color: {{ block.settings.input_text_color }};
34
+ box-shadow: none;
35
+ letter-spacing: 0px;
36
+ }
37
+ #shopify-block-{{ block.id }} .subscribe-consent input::placeholder {
38
+ opacity: 1;
39
+ color: {{ block.settings.placeholder_color }};
40
+ font-weight: 600;
41
+ }
42
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form__button {
43
+ top: 0;
44
+ right: 0;
45
+ width: 42px;
46
+ height: 36px;
47
+ padding: 0;
48
+ border-radius: 3px;
49
+ background: {{ block.settings.btn_color }};
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ transition: opacity 0.2s ease;
54
+ }
55
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form__button .icon-email {
56
+ width: 20px;
57
+ height: 20px;
58
+ }
59
+ #shopify-block-{{ block.id }} .subscribe-consent .field:after,
60
+ #shopify-block-{{ block.id }} .subscribe-consent .field:before {
61
+ box-shadow: none;
62
+ outline: none;
63
+ border: none;
64
+ }
65
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form__message {
66
+ color: {{ block.settings.input_text_color }};
67
+ }
68
+ #shopify-block-{{ block.id }} .subscribe-consent__agree {
69
+ display: flex;
70
+ align-items: flex-start;
71
+ gap: 5px;
72
+ cursor: pointer;
73
+ position: relative;
74
+ }
75
+ #shopify-block-{{ block.id }} .subscribe-consent__checkbox {
76
+ appearance: none;
77
+ -webkit-appearance: none;
78
+ position: absolute;
79
+ width: 16px;
80
+ height: 16px;
81
+ margin: 0;
82
+ opacity: 0;
83
+ cursor: pointer;
84
+ }
85
+ #shopify-block-{{ block.id }} .subscribe-consent__icon {
86
+ display: block;
87
+ flex: 0 0 auto;
88
+ width: 16px;
89
+ height: 16px;
90
+ position: relative;
91
+ pointer-events: none;
92
+ }
93
+ #shopify-block-{{ block.id }} .subscribe-consent__icon svg {
94
+ display: block;
95
+ position: absolute;
96
+ inset: 0;
97
+ }
98
+ #shopify-block-{{ block.id }} .subscribe-consent__icon--on {
99
+ opacity: 0;
100
+ }
101
+ #shopify-block-{{ block.id }} .subscribe-consent__checkbox:checked + .subscribe-consent__icon .subscribe-consent__icon--off {
102
+ opacity: 0;
103
+ }
104
+ #shopify-block-{{ block.id }} .subscribe-consent__checkbox:checked + .subscribe-consent__icon .subscribe-consent__icon--on {
105
+ opacity: 1;
106
+ }
107
+ #shopify-block-{{ block.id }} .subscribe-consent__checkbox:focus-visible + .subscribe-consent__icon {
108
+ outline: 1px solid {{ block.settings.consent_text_color }};
109
+ outline-offset: 2px;
110
+ border-radius: 2px;
111
+ }
112
+ #shopify-block-{{ block.id }} .subscribe-consent__text {
113
+ font-size: 12px;
114
+ line-height: 1.2;
115
+ color: {{ block.settings.consent_text_color }};
116
+ font-weight: 400;
117
+ }
118
+ #shopify-block-{{ block.id }} .subscribe-consent__text a {
119
+ color: inherit;
120
+ text-decoration: underline;
121
+ }
122
+ @media screen and (min-width: 1024px) {
123
+ #shopify-block-{{ block.id }} .subscribe-consent .field__input {
124
+ height: 48px;
125
+ font-size: 14px;
126
+ }
127
+ #shopify-block-{{ block.id }} .subscribe-consent .newsletter-form__button {
128
+ height: 48px;
129
+ }
130
+ }
131
+ {%- endstyle -%}
132
+
133
+ <div
134
+ class='newsletter subscribe-email subscribe-consent'
135
+ id='shopify-block-{{ block.id }}'
136
+ {{ block.shopify_attributes }}
137
+ >
138
+ {% form 'customer', class: 'newsletter-form' %}
139
+ <input type='hidden' name='contact[tags]' value='newsletter'>
140
+ <div
141
+ class='newsletter-form__field-wrapper'
142
+ {% if settings.animations_reveal_on_scroll %}
143
+ data-cascade
144
+ {% endif %}
145
+ >
146
+ <div class='field'>
147
+ <input
148
+ id='NewsletterForm--{{ block.id }}'
149
+ type='email'
150
+ name='contact[email]'
151
+ class='field__input'
152
+ value='{{ form.email }}'
153
+ aria-required='true'
154
+ autocorrect='off'
155
+ autocapitalize='off'
156
+ autocomplete='email'
157
+ {% if form.errors %}
158
+ autofocus
159
+ aria-invalid='true'
160
+ aria-describedby='Newsletter-error--{{ block.id }}'
161
+ {% elsif form.posted_successfully? %}
162
+ aria-describedby='Newsletter-success--{{ block.id }}'
163
+ {% endif %}
164
+ placeholder='{{ block.settings.placeholder }}'
165
+ required
166
+ >
167
+ <button
168
+ type='submit'
169
+ class='newsletter-form__button field__button'
170
+ name='commit'
171
+ id='Subscribe-{{ block.id }}'
172
+ aria-label='{{ 'newsletter.button_label' | t }}'
173
+ >
174
+ <span class='icon-email' aria-hidden='true'>
175
+ <svg
176
+ width='20'
177
+ height='20'
178
+ viewBox='0 0 20 20'
179
+ fill='none'
180
+ xmlns='http://www.w3.org/2000/svg'
181
+ >
182
+ <rect x='2.5' y='4.5' width='15' height='11' rx='1.5' stroke='{{ block.settings.btn_icon_color }}'></rect>
183
+ <path d='M3 5.5L9.4726 10.799C9.7822 11.0525 10.2278 11.0525 10.5374 10.799L17 5.5' stroke='{{ block.settings.btn_icon_color }}'></path>
184
+ </svg>
185
+ </span>
186
+ </button>
187
+ </div>
188
+ {%- if form.errors -%}
189
+ <small
190
+ class='newsletter-form__message form__message'
191
+ id='Newsletter-error--{{ block.id }}'
192
+ >
193
+ {%- render 'icon-error' -%}
194
+ {{- form.errors.translated_fields.email | capitalize }}
195
+ {{ form.errors.messages.email -}}
196
+ </small>
197
+ {%- endif -%}
198
+ </div>
199
+
200
+ <label
201
+ class='subscribe-consent__agree'
202
+ for='SubscribeConsent--{{ block.id }}'
203
+ >
204
+ <input
205
+ type='checkbox'
206
+ id='SubscribeConsent--{{ block.id }}'
207
+ class='subscribe-consent__checkbox'
208
+ data-subscribe-consent
209
+ required
210
+ >
211
+ <span class='subscribe-consent__icon' aria-hidden='true'>
212
+ <svg
213
+ class='subscribe-consent__icon--off'
214
+ width='14'
215
+ height='14'
216
+ viewBox='0 0 14 14'
217
+ fill='none'
218
+ xmlns='http://www.w3.org/2000/svg'
219
+ >
220
+ <rect x='0.4375' y='0.4375' width='13.125' height='13.125' rx='2.1875' stroke='{{ block.settings.consent_text_color }}' stroke-opacity='0.1' stroke-width='0.875'/>
221
+ </svg>
222
+ <svg
223
+ class='subscribe-consent__icon--on'
224
+ width='16'
225
+ height='16'
226
+ viewBox='0 0 16 16'
227
+ fill='none'
228
+ xmlns='http://www.w3.org/2000/svg'
229
+ >
230
+ <rect x='0.75' y='0.75' width='14.5' height='14.5' rx='2.25' stroke='{{ block.settings.consent_text_color }}' stroke-width='1.5'/>
231
+ <path d='M4.5 7.65039L7.04152 10.1919L11.567 5.66643' stroke='{{ block.settings.consent_text_color }}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
232
+ </svg>
233
+ </span>
234
+ <span class='subscribe-consent__text'>
235
+ {{- block.settings.consent_text -}}
236
+ </span>
237
+ </label>
238
+
239
+ {%- if form.posted_successfully? -%}
240
+ <h3
241
+ class='newsletter-form__message newsletter-form__message--success form__message'
242
+ id='Newsletter-success--{{ block.id }}'
243
+ tabindex='-1'
244
+ autofocus
245
+ >
246
+ {% render 'icon-success' -%}
247
+ {{- 'newsletter.success' | t }}
248
+ </h3>
249
+ {%- endif -%}
250
+ {% endform %}
251
+ </div>
252
+
253
+ {% schema %}
254
+ {
255
+ "name": "ZZ Email Subscribe",
256
+ "settings": [
257
+ {
258
+ "type": "text",
259
+ "id": "placeholder",
260
+ "label": "Placeholder",
261
+ "default": "Your Email"
262
+ },
263
+ {
264
+ "type": "inline_richtext",
265
+ "id": "consent_text",
266
+ "label": "Consent Text",
267
+ "info": "勾选后才能提交。可插入 Privacy Policy 链接。",
268
+ "default": "I agree to the <a href=\"/policies/privacy-policy\">Privacy Policy</a> and would like to receive HOVERAir news, product updates, and exclusive offers by email. I can unsubscribe at any time."
269
+ },
270
+ {
271
+ "type": "header",
272
+ "content": "Colors"
273
+ },
274
+ {
275
+ "type": "color",
276
+ "id": "input_color",
277
+ "label": "Input Background",
278
+ "default": "#FFFFFF0F"
279
+ },
280
+ {
281
+ "type": "color",
282
+ "id": "input_border_color",
283
+ "label": "Input Border",
284
+ "default": "#444444"
285
+ },
286
+ {
287
+ "type": "color",
288
+ "id": "input_text_color",
289
+ "label": "Input Text Color",
290
+ "default": "#000000"
291
+ },
292
+ {
293
+ "type": "color",
294
+ "id": "placeholder_color",
295
+ "label": "Placeholder Color",
296
+ "default": "#00000080"
297
+ },
298
+ {
299
+ "type": "color",
300
+ "id": "btn_color",
301
+ "label": "Button Background",
302
+ "default": "#444444"
303
+ },
304
+ {
305
+ "type": "color",
306
+ "id": "btn_icon_color",
307
+ "label": "Button Icon Color",
308
+ "default": "#FFFFFF"
309
+ },
310
+ {
311
+ "type": "color",
312
+ "id": "consent_text_color",
313
+ "label": "Consent Text Color",
314
+ "default": "#2D2D2D"
315
+ }
316
+ ],
317
+ "presets": [
318
+ {
319
+ "name": "ZZ Email Subscribe"
320
+ }
321
+ ]
322
+ }
323
+ {% endschema %}
@@ -0,0 +1,198 @@
1
+ {% comment %}
2
+ zz-bg-overlay-card 背景图叠加图文链接卡片
3
+ 用于放置在其他 section 内部(如 flex 布局、swiper 等)。
4
+ - 背景图片 PC / Mobile 区分
5
+ - 宽度 PC / Mobile 区分(Mobile 使用 rem,1rem = 10px)
6
+ - 宽高比 PC / Mobile 区分(未设置时使用背景图片自身宽高比)
7
+ - 标题 / 描述 / link 文本 / link 链接
8
+ - 文案颜色模式:黑 / 白
9
+ - link 颜色:黑 / 白 / 蓝
10
+ {% endcomment %}
11
+
12
+ {% liquid
13
+ assign s = block.settings
14
+
15
+ assign text_color = '#2D2D2D'
16
+ if s.text_color_mode == 'white'
17
+ assign text_color = '#FFFFFF'
18
+ endif
19
+
20
+ assign link_color = '#2D2D2D'
21
+ if s.link_color == 'white'
22
+ assign link_color = '#FFFFFF'
23
+ elsif s.link_color == 'blue'
24
+ assign link_color = '#0066CC'
25
+ endif
26
+
27
+ assign ratio_pc = s.aspect_ratio_pc
28
+ if ratio_pc == blank and s.image_pc != blank
29
+ assign ratio_pc = s.image_pc.aspect_ratio
30
+ endif
31
+
32
+ assign ratio_mobile = s.aspect_ratio_mobile
33
+ if ratio_mobile == blank and s.image_mobile != blank
34
+ assign ratio_mobile = s.image_mobile.aspect_ratio
35
+ endif
36
+ %}
37
+
38
+ <style>
39
+ /* PC */
40
+ @media (min-width: 1024px) {
41
+ #shopify-block-{{ block.id }} {
42
+ {% if s.width_pc != blank %}width: {{ s.width_pc }}px;{% endif %}
43
+ {% if ratio_pc != blank %}aspect-ratio: {{ ratio_pc }};{% endif %}
44
+ }
45
+ }
46
+
47
+ /* Mobile */
48
+ @media (max-width: 1023px) {
49
+ #shopify-block-{{ block.id }} {
50
+ {% if s.width_mobile != blank %}width: {{ s.width_mobile | divided_by: 10.0 }}rem;{% endif %}
51
+ {% if ratio_mobile != blank %}aspect-ratio: {{ ratio_mobile }};{% endif %}
52
+ }
53
+ }
54
+ </style>
55
+
56
+ {%- capture card_inner -%}
57
+ {%- if s.image_pc != blank -%}
58
+ {% render 'zz-img',
59
+ pc_image: s.image_pc,
60
+ mb_image: s.image_mobile,
61
+ pc_width: 1200,
62
+ mb_width: 800,
63
+ class_name: 'bg-ov-card__media tw-absolute tw-inset-0 tw-z-0 tw-w-full tw-h-full tw-object-cover tw-object-center',
64
+ %}
65
+ {%- endif -%}
66
+ <div class="bg-ov-card__content tw-relative tw-z-[1] tw-flex tw-flex-col tw-items-start tw-gap-[1rem] tw-pt-[3rem] tw-pr-[2rem] tw-pb-[2rem] tw-pl-[2.7rem]" style="color: {{ text_color }};">
67
+ {%- if s.title != blank -%}
68
+ <p class="bg-ov-card__title tw-m-0 tw-text-[1.8rem] lg:tw-text-[21px] tw-font-semibold tw-leading-[1.3] tw-capitalize tw-text-inherit tw-break-words">{{ s.title }}</p>
69
+ {%- endif -%}
70
+ {%- if s.description != blank -%}
71
+ <p class="bg-ov-card__desc tw-m-0 tw-text-[1.4rem] lg:tw-text-[14px] max-lg:tw-font-bold tw-leading-[1.3] tw-text-inherit tw-break-words tw-whitespace-pre-line">{{ s.description }}</p>
72
+ {%- endif -%}
73
+ {%- if s.link_text != blank -%}
74
+ <span class="bg-ov-card__link tw-inline-flex tw-items-center tw-gap-[0.2rem] tw-text-[1.4rem] lg:tw-text-[16px] tw-font-bold tw-leading-[1.5] tw-no-underline" style="color: {{ link_color }};">
75
+ {{ s.link_text }}
76
+ <svg class="tw-w-[24px] tw-h-[24px] tw-flex-none" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
77
+ <path d="M11 16.9497L15.9498 12L11 7.05025" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
78
+ </svg>
79
+ </span>
80
+ {%- endif -%}
81
+ </div>
82
+ {%- endcapture -%}
83
+
84
+ {%- if s.link_url != blank -%}
85
+ <a class='bg-ov-card tw-relative tw-block tw-w-full tw-h-full tw-no-underline tw-rounded-[1rem] lg:tw-rounded-[16px] tw-overflow-hidden' href='{{ s.link_url }}' {{ block.shopify_attributes }}>
86
+ {{- card_inner -}}
87
+ </a>
88
+ {%- else -%}
89
+ <div class='bg-ov-card tw-relative tw-block tw-w-full tw-h-full tw-rounded-[1rem] lg:tw-rounded-[16px] tw-overflow-hidden' {{ block.shopify_attributes }}>{{ card_inner }}</div>
90
+ {%- endif -%}
91
+
92
+ {% schema %}
93
+ {
94
+ "name": "ZZ Overlay Bg Card",
95
+ "class": "bg-overlay-card-block",
96
+ "settings": [
97
+ {
98
+ "type": "header",
99
+ "content": "背景图片"
100
+ },
101
+ {
102
+ "type": "image_picker",
103
+ "id": "image_pc",
104
+ "label": "PC 背景图片"
105
+ },
106
+ {
107
+ "type": "image_picker",
108
+ "id": "image_mobile",
109
+ "label": "移动端背景图片"
110
+ },
111
+ {
112
+ "type": "header",
113
+ "content": "尺寸"
114
+ },
115
+ {
116
+ "type": "text",
117
+ "id": "width_pc",
118
+ "label": "PC 宽度",
119
+ "info": "支持 px 或 %,如 382px、50%。留空为 100%(跟随父容器)"
120
+ },
121
+ {
122
+ "type": "number",
123
+ "id": "width_mobile",
124
+ "label": "移动端宽度(px)",
125
+ "info": "填写设计稿 px 值,自动换算为 rem(1rem = 10px)。留空为 100%"
126
+ },
127
+ {
128
+ "type": "text",
129
+ "id": "aspect_ratio_pc",
130
+ "label": "PC 宽高比",
131
+ "info": "如 382/502。留空则使用 PC 背景图片的宽高比"
132
+ },
133
+ {
134
+ "type": "text",
135
+ "id": "aspect_ratio_mobile",
136
+ "label": "移动端宽高比",
137
+ "info": "如 382/502。留空则使用移动端背景图片的宽高比"
138
+ },
139
+ {
140
+ "type": "header",
141
+ "content": "内容"
142
+ },
143
+ {
144
+ "type": "text",
145
+ "id": "title",
146
+ "label": "标题",
147
+ "default": "Education Program"
148
+ },
149
+ {
150
+ "type": "textarea",
151
+ "id": "description",
152
+ "label": "描述",
153
+ "default": "Special pricing for students, educators, and their families."
154
+ },
155
+ {
156
+ "type": "text",
157
+ "id": "link_text",
158
+ "label": "link 文本",
159
+ "default": "Learn More"
160
+ },
161
+ {
162
+ "type": "url",
163
+ "id": "link_url",
164
+ "label": "link 链接"
165
+ },
166
+ {
167
+ "type": "header",
168
+ "content": "颜色"
169
+ },
170
+ {
171
+ "type": "select",
172
+ "id": "text_color_mode",
173
+ "label": "文案颜色模式",
174
+ "options": [
175
+ { "value": "black", "label": "黑" },
176
+ { "value": "white", "label": "白" }
177
+ ],
178
+ "default": "black"
179
+ },
180
+ {
181
+ "type": "select",
182
+ "id": "link_color",
183
+ "label": "link 颜色",
184
+ "options": [
185
+ { "value": "black", "label": "黑" },
186
+ { "value": "white", "label": "白" },
187
+ { "value": "blue", "label": "蓝" }
188
+ ],
189
+ "default": "black"
190
+ }
191
+ ],
192
+ "presets": [
193
+ {
194
+ "name": "ZZ Overlay Bg Card"
195
+ }
196
+ ]
197
+ }
198
+ {% endschema %}
@@ -20,6 +20,13 @@
20
20
  "id": "mobile_image",
21
21
  "label": "移动端图片"
22
22
  },
23
+ {
24
+ "type": "checkbox",
25
+ "id": "is_compatible",
26
+ "label": "兼容顶部导航栏",
27
+ "default": false,
28
+ "info": "防止顶部导航栏遮住标题"
29
+ },
23
30
  {
24
31
  "type": "richtext",
25
32
  "id": "pc_title",
@@ -140,7 +147,7 @@
140
147
  {% render 'zz-img',
141
148
  pc_image: block.settings.desktop_image,
142
149
  mb_image: block.settings.mobile_image,
143
- image_alt: block.settings.alt | escape,
150
+ image_alt: block.settings.alt,
144
151
  class_name: 'tw-w-full tw-h-full tw-object-cover',
145
152
  %}
146
153
 
@@ -151,7 +158,7 @@
151
158
  {% when 'h2' %}
152
159
  {% render 'zz-h2',
153
160
  title: block.settings.pc_title,
154
- title_mb: block.settings.mb_title | default: block.settings.pc_title,
161
+ title_mb: block.settings.mb_title,
155
162
  title_color: block.settings.text_color,
156
163
 
157
164
  class_name: 'scroll-animate-bg-title'
@@ -159,7 +166,7 @@
159
166
  {% when 'h3' %}
160
167
  {% render 'zz-h3',
161
168
  title: block.settings.pc_title,
162
- title_mb: block.settings.mb_title | default: block.settings.pc_title,
169
+ title_mb: block.settings.mb_title,
163
170
  title_color: block.settings.text_color,
164
171
  class_name: 'scroll-animate-bg-title'
165
172
 
@@ -167,14 +174,14 @@
167
174
  {% when 'h4' %}
168
175
  {% render 'zz-h4',
169
176
  title: block.settings.pc_title,
170
- title_mb: block.settings.mb_title | default: block.settings.pc_title,
177
+ title_mb: block.settings.mb_title,
171
178
  title_color: block.settings.text_color,
172
179
  class_name: 'scroll-animate-bg-title'
173
180
  %}
174
181
  {% when 'h5' %}
175
182
  {% render 'zz-h5',
176
183
  title: block.settings.pc_title,
177
- title_mb: block.settings.mb_title | default: block.settings.pc_title,
184
+ title_mb: block.settings.mb_title,
178
185
  title_color: block.settings.text_color,
179
186
  class_name: 'scroll-animate-bg-title'
180
187
  %}
@@ -225,9 +232,12 @@
225
232
 
226
233
  }
227
234
  @media screen and (min-width: 1024px) {
228
- #shopify-block-{{ block.id }} {
229
-
230
- }
235
+ {% if block.settings.is_compatible == true %}
236
+ #shopify-block-{{ block.id }} .scroll-block-scroll-animate {
237
+ padding-top: 50px;
238
+ }
239
+ {% endif %}
240
+
231
241
  #shopify-block-{{ block.id }} .text-overlay {
232
242
  position: absolute;
233
243
  top: {{ block.settings.pc_top }}%;