shoplazza-cli 0.0.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 (181) hide show
  1. package/.editorconfig +28 -0
  2. package/.prettierrc +9 -0
  3. package/LICENSE +21 -0
  4. package/README.md +208 -0
  5. package/bin/shoplazza +117 -0
  6. package/fixtures/assets/blog.scss +74 -0
  7. package/fixtures/assets/cart_modal.scss +450 -0
  8. package/fixtures/assets/collection_detail.js +234 -0
  9. package/fixtures/assets/collection_detail.scss +345 -0
  10. package/fixtures/assets/collection_list.scss +11 -0
  11. package/fixtures/assets/collection_slider.scss +169 -0
  12. package/fixtures/assets/feature_columns.scss +26 -0
  13. package/fixtures/assets/feature_product.scss +109 -0
  14. package/fixtures/assets/footer.js +58 -0
  15. package/fixtures/assets/footer.scss +337 -0
  16. package/fixtures/assets/four_images.scss +29 -0
  17. package/fixtures/assets/gallery.scss +55 -0
  18. package/fixtures/assets/header.js +178 -0
  19. package/fixtures/assets/header.scss +929 -0
  20. package/fixtures/assets/image_text.scss +72 -0
  21. package/fixtures/assets/logo_bar.scss +11 -0
  22. package/fixtures/assets/newsletter.scss +90 -0
  23. package/fixtures/assets/not_found.scss +39 -0
  24. package/fixtures/assets/page_detail.scss +16 -0
  25. package/fixtures/assets/pagination.scss +150 -0
  26. package/fixtures/assets/postcss.config.js +6 -0
  27. package/fixtures/assets/product_description.scss +88 -0
  28. package/fixtures/assets/product_detail.js +634 -0
  29. package/fixtures/assets/product_detail.scss +1106 -0
  30. package/fixtures/assets/relative_product.scss +45 -0
  31. package/fixtures/assets/reviews.scss +70 -0
  32. package/fixtures/assets/rich_text.scss +71 -0
  33. package/fixtures/assets/search.js +87 -0
  34. package/fixtures/assets/search.scss +67 -0
  35. package/fixtures/assets/slide.scss +51 -0
  36. package/fixtures/assets/slider.scss +141 -0
  37. package/fixtures/assets/theme.css +976 -0
  38. package/fixtures/assets/theme.scss +1100 -0
  39. package/fixtures/assets/three_images.scss +20 -0
  40. package/fixtures/assets/tools.scss +23 -0
  41. package/fixtures/assets/two_images.scss +24 -0
  42. package/fixtures/assets/video.scss +45 -0
  43. package/fixtures/assets/video_text.scss +63 -0
  44. package/fixtures/config/settings_data.json +107 -0
  45. package/fixtures/config/settings_schema.json +690 -0
  46. package/fixtures/layout/theme.liquid +76 -0
  47. package/fixtures/locales/ar-SA.json +212 -0
  48. package/fixtures/locales/de-DE.json +290 -0
  49. package/fixtures/locales/en-US.json +290 -0
  50. package/fixtures/locales/es-ES.json +290 -0
  51. package/fixtures/locales/fr-FR.json +290 -0
  52. package/fixtures/locales/id-ID.json +212 -0
  53. package/fixtures/locales/it-IT.json +212 -0
  54. package/fixtures/locales/ja-JP.json +289 -0
  55. package/fixtures/locales/ko-KR.json +290 -0
  56. package/fixtures/locales/nl-NL.json +290 -0
  57. package/fixtures/locales/pl-PL.json +290 -0
  58. package/fixtures/locales/pt-PT.json +212 -0
  59. package/fixtures/locales/ru-RU.json +212 -0
  60. package/fixtures/locales/th-TH.json +212 -0
  61. package/fixtures/locales/zh-CN.json +290 -0
  62. package/fixtures/locales/zh-TW.json +290 -0
  63. package/fixtures/sections/apps.liquid +47 -0
  64. package/fixtures/sections/blog.liquid +137 -0
  65. package/fixtures/sections/collection_desc.liquid +34 -0
  66. package/fixtures/sections/collection_detail.liquid +436 -0
  67. package/fixtures/sections/collection_image.liquid +104 -0
  68. package/fixtures/sections/collection_list.liquid +161 -0
  69. package/fixtures/sections/collection_name.liquid +34 -0
  70. package/fixtures/sections/collection_slider.liquid +330 -0
  71. package/fixtures/sections/feature_columns.liquid +275 -0
  72. package/fixtures/sections/feature_product.liquid +227 -0
  73. package/fixtures/sections/footer.liquid +488 -0
  74. package/fixtures/sections/four_images.liquid +160 -0
  75. package/fixtures/sections/gallery.liquid +258 -0
  76. package/fixtures/sections/header.liquid +1157 -0
  77. package/fixtures/sections/html.liquid +40 -0
  78. package/fixtures/sections/image_text.liquid +350 -0
  79. package/fixtures/sections/instagram_plus.liquid +393 -0
  80. package/fixtures/sections/logo_bar.liquid +183 -0
  81. package/fixtures/sections/newsletter.liquid +225 -0
  82. package/fixtures/sections/not_found.liquid +39 -0
  83. package/fixtures/sections/overlay_image.liquid +648 -0
  84. package/fixtures/sections/page_detail.liquid +39 -0
  85. package/fixtures/sections/photo_collection.liquid +433 -0
  86. package/fixtures/sections/product_description.liquid +208 -0
  87. package/fixtures/sections/product_detail.liquid +611 -0
  88. package/fixtures/sections/products.liquid +216 -0
  89. package/fixtures/sections/relative_product.liquid +121 -0
  90. package/fixtures/sections/reviews.liquid +115 -0
  91. package/fixtures/sections/rich_text.liquid +157 -0
  92. package/fixtures/sections/search.liquid +163 -0
  93. package/fixtures/sections/slide.liquid +719 -0
  94. package/fixtures/sections/three_images.liquid +157 -0
  95. package/fixtures/sections/two_images.liquid +125 -0
  96. package/fixtures/sections/video.liquid +95 -0
  97. package/fixtures/sections/video_text.liquid +128 -0
  98. package/fixtures/snippets/bgset.liquid +21 -0
  99. package/fixtures/snippets/card_title.liquid +8 -0
  100. package/fixtures/snippets/cart_modal.liquid +74 -0
  101. package/fixtures/snippets/collection.liquid +77 -0
  102. package/fixtures/snippets/collection_filter_modal.liquid +56 -0
  103. package/fixtures/snippets/default_image_4.liquid +14 -0
  104. package/fixtures/snippets/default_image_6.liquid +18 -0
  105. package/fixtures/snippets/default_image_8.liquid +23 -0
  106. package/fixtures/snippets/four_images_item.liquid +8 -0
  107. package/fixtures/snippets/header_ads.liquid +95 -0
  108. package/fixtures/snippets/hero_image.liquid +94 -0
  109. package/fixtures/snippets/icon_video_play_large.liquid +1 -0
  110. package/fixtures/snippets/icon_video_play_medium.liquid +4 -0
  111. package/fixtures/snippets/icon_video_play_small.liquid +4 -0
  112. package/fixtures/snippets/lazyimg.liquid +22 -0
  113. package/fixtures/snippets/lazyimg_art.liquid +36 -0
  114. package/fixtures/snippets/lazysizes.liquid +41 -0
  115. package/fixtures/snippets/link.liquid +2 -0
  116. package/fixtures/snippets/pagination.liquid +48 -0
  117. package/fixtures/snippets/product.liquid +126 -0
  118. package/fixtures/snippets/product_art_tpl.liquid +152 -0
  119. package/fixtures/snippets/product_info_body.liquid +337 -0
  120. package/fixtures/snippets/product_info_tpl.liquid +423 -0
  121. package/fixtures/snippets/product_label.liquid +46 -0
  122. package/fixtures/snippets/settings.liquid +295 -0
  123. package/fixtures/snippets/social-meta-tags.liquid +106 -0
  124. package/fixtures/snippets/video_html.liquid +11 -0
  125. package/fixtures/snippets/video_source.liquid +98 -0
  126. package/fixtures/snippets/video_thumb_icon.liquid +2 -0
  127. package/fixtures/templates/404.liquid +1 -0
  128. package/fixtures/templates/collection.liquid +92 -0
  129. package/fixtures/templates/index.liquid +206 -0
  130. package/fixtures/templates/page.liquid +1 -0
  131. package/fixtures/templates/product.liquid +99 -0
  132. package/fixtures/templates/search.liquid +1 -0
  133. package/jest.config.js +192 -0
  134. package/lib/__tests__/log.test.js +15 -0
  135. package/lib/__tests__/utils.test.js +69 -0
  136. package/lib/auth/__mocks__/getCode.js +7 -0
  137. package/lib/auth/__mocks__/index.js +0 -0
  138. package/lib/auth/child.js +23 -0
  139. package/lib/auth/getCode.js +35 -0
  140. package/lib/auth/index.js +91 -0
  141. package/lib/commands/__tests__/login.test.js +77 -0
  142. package/lib/commands/__tests__/logout.test.js +29 -0
  143. package/lib/commands/__tests__/store.test.js +44 -0
  144. package/lib/commands/__tests__/switch.test.js +45 -0
  145. package/lib/commands/login.js +99 -0
  146. package/lib/commands/logout.js +14 -0
  147. package/lib/commands/store.js +14 -0
  148. package/lib/commands/switch.js +52 -0
  149. package/lib/commands/theme/__tests__/delete.test.js +49 -0
  150. package/lib/commands/theme/__tests__/init.test.js +21 -0
  151. package/lib/commands/theme/__tests__/list.test.js +80 -0
  152. package/lib/commands/theme/__tests__/package.test.js +17 -0
  153. package/lib/commands/theme/__tests__/publish.test.js +61 -0
  154. package/lib/commands/theme/__tests__/pull.test.js +69 -0
  155. package/lib/commands/theme/__tests__/push.test.js +63 -0
  156. package/lib/commands/theme/__tests__/serve.test.js +107 -0
  157. package/lib/commands/theme/delete.js +64 -0
  158. package/lib/commands/theme/init.js +51 -0
  159. package/lib/commands/theme/list.js +28 -0
  160. package/lib/commands/theme/package.js +37 -0
  161. package/lib/commands/theme/publish.js +56 -0
  162. package/lib/commands/theme/pull.js +62 -0
  163. package/lib/commands/theme/push.js +106 -0
  164. package/lib/commands/theme/serve.js +153 -0
  165. package/lib/commands/theme/share.js +20 -0
  166. package/lib/commands/version.js +6 -0
  167. package/lib/config.js +5 -0
  168. package/lib/db/__mocks__/index.js +9 -0
  169. package/lib/db/__tests__/analytics.test.js +19 -0
  170. package/lib/db/__tests__/user.test.js +20 -0
  171. package/lib/db/analytics.js +48 -0
  172. package/lib/db/index.js +9 -0
  173. package/lib/db/user.js +68 -0
  174. package/lib/log.js +13 -0
  175. package/lib/openAPI/__mocks__/index.js +20 -0
  176. package/lib/openAPI/api.js +76 -0
  177. package/lib/openAPI/index.js +46 -0
  178. package/lib/report.js +37 -0
  179. package/lib/tracing.js +50 -0
  180. package/lib/utils.js +48 -0
  181. package/package.json +54 -0
@@ -0,0 +1,1100 @@
1
+ @import './tools.scss';
2
+
3
+ /* block__elem_modifier */
4
+ // 兼容iphonex(参考:https://aotu.io/notes/2017/11/27/iphonex/index.html)
5
+ body {
6
+ padding-bottom: constant(safe-area-inset-bottom);
7
+ padding-bottom: env(safe-area-inset-bottom);
8
+ }
9
+
10
+ .mce__content {
11
+ p:first-child {
12
+ margin-top: 0;
13
+ }
14
+ p:last-child {
15
+ margin-bottom: 0;
16
+ }
17
+ img {
18
+ position: relative;
19
+ max-width: 100%;
20
+ vertical-align: bottom;
21
+ height: auto;
22
+
23
+ &+img {
24
+ margin-top:30px;
25
+ }
26
+ }
27
+ table {
28
+ max-width: 100%;
29
+ border-collapse: collapse;
30
+
31
+ td,.mce__content table th {
32
+ padding:8px;
33
+ border: 1px solid #e6e6e6;
34
+ }
35
+ }
36
+ iframe {
37
+ width: 100%;
38
+ }
39
+ blockquote {
40
+ margin: 1em 40px;
41
+ }
42
+ a {
43
+ color: inherit;
44
+ word-break: break-all;
45
+ }
46
+ }
47
+
48
+ img.lazyload:not([src]) {
49
+ visibility: hidden;
50
+ }
51
+ // 主题卡片(footer/slide/navigation除外)添加上下间距,移动端上下40 pc上下56
52
+ .container-gap {
53
+ @media ($mobile) {
54
+ padding-top: px-to-rem(20);
55
+ padding-bottom: px-to-rem(20);
56
+ }
57
+
58
+ @media ($pc) {
59
+ padding-top: px-to-rem(56);
60
+ padding-bottom: px-to-rem(56);
61
+ }
62
+ }
63
+ //页面级别的间距 【登陆/注册/忘记密码/地址簿/搜索页面/自定义页面】统一独立页面上下间距
64
+ .container-page-gap {
65
+ @media ($mobile) {
66
+ padding-top: px-to-rem(60);
67
+ padding-bottom: px-to-rem(60);
68
+ }
69
+
70
+ @media ($pc) {
71
+ padding-top: px-to-rem(56);
72
+ padding-bottom: px-to-rem(56);
73
+ }
74
+ }
75
+ //页面内容较空 【404页面/购物车为空页面】
76
+ .container-empty-gap {
77
+ @media ($mobile) {
78
+ padding-top: px-to-rem(60);
79
+ padding-bottom: px-to-rem(60);
80
+ }
81
+
82
+ @media ($pc) {
83
+ padding-top: px-to-rem(100);
84
+ padding-bottom: px-to-rem(200);
85
+ }
86
+ }
87
+
88
+ //移动端目前固定左右padding为15px
89
+ .mb-padding {
90
+ @media ($mobile) {
91
+ padding-left: 15px;
92
+ padding-right: 15px;
93
+ }
94
+ }
95
+
96
+ /* lazyload css start */
97
+ .common__img-wrapper_lazy {
98
+ position: relative;
99
+ display: block;
100
+ width: 100%;
101
+
102
+ img {
103
+ max-width: 100%;
104
+ height: 100%;
105
+ max-height: 100%;
106
+ position: absolute;
107
+ margin: auto;
108
+ top: 0;
109
+ right: 0;
110
+ bottom: 0;
111
+ left: 0;
112
+ }
113
+
114
+ img.lazyloaded {
115
+ height: auto;
116
+ }
117
+
118
+ img.img-full-width {
119
+ width: 100%;
120
+ height: unset;
121
+ max-height: unset;
122
+ margin: unset;
123
+ }
124
+ }
125
+
126
+ .lazyload,
127
+ .lazyloading {
128
+ background-color: #f1f1f1;
129
+ }
130
+
131
+ .lazyloaded {
132
+ background-color: transparent;
133
+ }
134
+
135
+ /* lazyload css end */
136
+
137
+ /* common mask and title start */
138
+ .common__mask_title {
139
+ position: relative;
140
+
141
+ img {
142
+ transition: all 0.5s;
143
+ }
144
+
145
+ &::before {
146
+ content: '';
147
+ position: absolute;
148
+ background: rgba(0, 0, 0, 0.1);
149
+ z-index: 1;
150
+ bottom: 0;
151
+ right: 0;
152
+ left: 0;
153
+ top: 0;
154
+ }
155
+
156
+ &::after {
157
+ content: attr(title);
158
+ position: absolute;
159
+ z-index: 1;
160
+ top: 50%;
161
+ transform: translateY(-50%);
162
+ text-align: center;
163
+ color: #fff;
164
+ font-size: px-to-rem(24);
165
+ padding: 0 px-to-rem(30);
166
+ word-break: break-word;
167
+ line-height: 1.2;
168
+
169
+ @media (max-width: 1024px) {
170
+ font-size: px-to-rem(20);
171
+ padding: 0 px-to-rem(15);
172
+ }
173
+
174
+ @media ($mobile) {
175
+ font-size: px-to-rem(18);
176
+ padding: 0 px-to-rem(15);
177
+ }
178
+
179
+ @media (max-width: 376px) {
180
+ font-size: px-to-rem(16);
181
+ }
182
+
183
+ @media ($sm_mobile) {
184
+ font-size: px-to-rem(14);
185
+ }
186
+ }
187
+
188
+ &:hover {
189
+ img {
190
+ transform: translate(-50%, -50%) scale(1.1) !important;
191
+ }
192
+
193
+ &::before {
194
+ background: rgba(0, 0, 0, 0.3);
195
+ }
196
+ }
197
+ }
198
+
199
+ /* common mask and title end */
200
+
201
+ /* product.liquid css start */
202
+ .product-snippet {
203
+ position: relative;
204
+
205
+ &__soldout {
206
+ position: absolute;
207
+ width: 100%;
208
+ background: #999;
209
+ font-size: 12px;
210
+ color: #fff;
211
+ text-align: center;
212
+ padding: 2px 0;
213
+ left: 0;
214
+ bottom: 0;
215
+ }
216
+
217
+ &__img-wrapper {
218
+ display: block;
219
+ overflow: hidden;
220
+ position: relative;
221
+
222
+ .product-snippet__mask {
223
+ display: flex;
224
+ position: absolute;
225
+ z-index: 2;
226
+ opacity: 0;
227
+ top: 0;
228
+ width: 100%;
229
+ height: 100%;
230
+ flex-direction: column;
231
+ align-items: center;
232
+ justify-content: flex-end;
233
+ //border: 1px solid #e5e5e5;
234
+
235
+ .product-snippet__btn {
236
+ margin-bottom: px-to-rem(30);
237
+ width: 70%;
238
+ height: px-to-rem(36);
239
+ font-size: px-to-rem(13);
240
+ white-space: nowrap;
241
+ }
242
+ }
243
+
244
+ &:hover {
245
+ .product-snippet__mask {
246
+ opacity: 1;
247
+ transition: all 0.3s linear;
248
+ }
249
+
250
+ img,
251
+ video {
252
+ opacity: 0;
253
+
254
+ &:first-child {
255
+ opacity: 1 !important;
256
+ }
257
+ }
258
+ }
259
+ }
260
+
261
+ @mixin product_title() {
262
+ font-size: px-to-rem(13);
263
+ text-align: center;
264
+ text-decoration: none;
265
+ }
266
+
267
+ &__title {
268
+ &-normal {
269
+ @include product_title();
270
+
271
+ margin-top: px-to-rem(24/2);
272
+
273
+ @media ($pc) {
274
+ margin-top: px-to-rem(15);
275
+ }
276
+ }
277
+
278
+ &-plus {
279
+ @include product_title();
280
+
281
+ margin: px-to-rem(15) 0 px-to-rem(4);
282
+
283
+ @media ($pc) {
284
+ margin: px-to-rem(20) 0 px-to-rem(4);
285
+ }
286
+ }
287
+ }
288
+
289
+ &__price-wrapper {
290
+ margin-top: px-to-rem(26/2);
291
+ font-size: px-to-rem(15);
292
+
293
+ @media ($pc) {
294
+ margin-top: px-to-rem(10);
295
+ }
296
+
297
+ span,
298
+ del {
299
+ display: inline-block;
300
+ max-width: 100%;
301
+ padding: 0 px-to-rem(5);
302
+ vertical-align: middle;
303
+ line-height: 1;
304
+ }
305
+ }
306
+ }
307
+
308
+ /* product.liquid css end */
309
+
310
+ /* 标题价格规范: 超过一行,两行及三行省略 一行用bootstrap的.text-truncate */
311
+
312
+ .two_line_text_truncate {
313
+ overflow: hidden;
314
+ display: -webkit-box;
315
+ -webkit-line-clamp: 2;
316
+ -webkit-box-orient: vertical;
317
+ }
318
+
319
+ .three_line_text_truncate {
320
+ overflow: hidden;
321
+ display: -webkit-box;
322
+ -webkit-line-clamp: 3;
323
+ -webkit-box-orient: vertical;
324
+ }
325
+
326
+ /* loading start */
327
+ .sep-loading {
328
+ position: fixed;
329
+ top: 0;
330
+ left: 0;
331
+ z-index: 1060;
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: center;
335
+ width: 100%;
336
+ height: 100%;
337
+ background: rgba(255, 255, 255, 0.8);
338
+
339
+ &__content,
340
+ &__content::after {
341
+ width: 3em;
342
+ height: 3em;
343
+ border-radius: 50%;
344
+ }
345
+
346
+ &__content {
347
+ position: relative;
348
+ font-size: 10px;
349
+ border-top: 0.16em solid #f0f0f0;
350
+ border-right: 0.16em solid #f0f0f0;
351
+ border-bottom: 0.16em solid #f0f0f0;
352
+ border-left: 0.16em solid #c4c4c4;
353
+ transform: translateZ(0);
354
+ animation: load 1.1s infinite linear;
355
+ }
356
+
357
+ @keyframes load {
358
+ 0% {
359
+ transform: rotate(0deg);
360
+ }
361
+
362
+ 100% {
363
+ transform: rotate(360deg);
364
+ }
365
+ }
366
+ }
367
+
368
+ /* loading end */
369
+
370
+ /* toast starts */
371
+ .sep-toast {
372
+ position: fixed;
373
+ z-index: 1060;
374
+ background: #fff;
375
+ color: #000;
376
+ font-size: px-to-rem(16);
377
+ width: px-to-rem(480);
378
+ min-height: 56px;
379
+ line-height: 1.5;
380
+ padding: px-to-rem(15);
381
+ border-radius: 4px;
382
+ box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
383
+ text-align: center;
384
+ top: 50%;
385
+ left: 50%;
386
+ transform: scale(0.5);
387
+
388
+ @media ($mobile) {
389
+ width: px-to-rem(262);
390
+ min-height: px-to-rem(41);
391
+ font-size: px-to-rem(14);
392
+ padding: px-to-rem(10) px-to-rem(12);
393
+ box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15);
394
+ }
395
+
396
+ &.error {
397
+ color: #b60400;
398
+ }
399
+
400
+ &.show {
401
+ transform: scale(1);
402
+ }
403
+
404
+ &.isShowing {
405
+ transition: transform 0.3s ease-out;
406
+ }
407
+
408
+ &.isLeave {
409
+ transform: scale(0.5);
410
+ opacity: 0;
411
+ transition: all 0.3s ease-out;
412
+ }
413
+ }
414
+
415
+ /* toast ends */
416
+
417
+ /* common products gap start */
418
+ .common__product-gap {
419
+ @media ($mobile) {
420
+ margin-bottom: px-to-rem($mb_row_margin);
421
+ padding: 0 px-to-rem(7.5);
422
+ }
423
+
424
+ @media ($pc) {
425
+ padding: 0 px-to-rem($pc_row_padding / 2);
426
+ margin-bottom: px-to-rem($pc_row_margin);
427
+ }
428
+ }
429
+
430
+ .common__product-row {
431
+ @media ($mobile) {
432
+ margin: 0 px-to-rem(-7.5);
433
+ }
434
+
435
+ @media ($pc) {
436
+ margin: 0 px-to-rem(-$bootstrap_padding - $pc_row_padding / 2);
437
+ }
438
+ }
439
+
440
+ .common-card-title {
441
+ text-align: center;
442
+ font-weight: 500;
443
+
444
+ @media ($mobile) {
445
+ font-size: px-to-rem(22);
446
+ margin-bottom: px-to-rem(20);
447
+ }
448
+
449
+ @media ($pc) {
450
+ font-size: px-to-rem(34);
451
+ margin-bottom: px-to-rem(40);
452
+ }
453
+ }
454
+
455
+ /* common products gap end */
456
+
457
+ /* common image mask start */
458
+ .common__mask {
459
+ position: relative;
460
+ overflow: hidden;
461
+
462
+ &:hover::after {
463
+ content: ' ';
464
+ position: absolute;
465
+ top: 0;
466
+ left: 0;
467
+ bottom: 0;
468
+ right: 0;
469
+ background: #fff;
470
+ opacity: 0.3;
471
+ }
472
+ }
473
+
474
+ /* common image mask end */
475
+
476
+ /* common desc start */
477
+ .common__img-desc {
478
+ position: relative;
479
+
480
+ &::before {
481
+ content: attr(data-title);
482
+ position: absolute;
483
+ z-index: 1;
484
+ bottom: px-to-rem(15);
485
+ right: px-to-rem(15);
486
+ color: #999;
487
+ font-size: px-to-rem(16);
488
+ }
489
+ }
490
+
491
+ /* common desc end */
492
+
493
+ /* common sort start */
494
+ .common__select {
495
+ position: relative;
496
+ display: inline-block;
497
+
498
+ select {
499
+ -webkit-appearance: none;
500
+ font-size: px-to-rem(14);
501
+ padding-right: px-to-rem(25);
502
+ color: inherit;
503
+ cursor: pointer;
504
+ width: px-to-rem(330 / 2);
505
+ border-color: #d4d4d4;
506
+
507
+ @media ($pc) {
508
+ width: px-to-rem(180);
509
+ }
510
+ }
511
+
512
+ &::after {
513
+ content: '';
514
+ color: #212121;
515
+ width: px-to-rem(17 / 2);
516
+ height: px-to-rem(17 / 2);
517
+ border: 2px solid;
518
+ border-top: none;
519
+ border-right: none;
520
+ position: absolute;
521
+ right: px-to-rem(16);
522
+ top: px-to-rem(13);
523
+ transform: rotate(-45deg);
524
+ }
525
+ }
526
+
527
+ /* common sort end */
528
+
529
+ /* common load-more start */
530
+ .common__load-more {
531
+ &-btn {
532
+ color: #777;
533
+ font-size: 11px;
534
+ cursor: pointer;
535
+ }
536
+ }
537
+
538
+ /* common load-more end */
539
+
540
+ /* common group start */
541
+ .common__group {
542
+ height: px-to-rem(113);
543
+
544
+ @media ($mobile) {
545
+ height: px-to-rem(196/2);
546
+ }
547
+ }
548
+
549
+ /* common group end */
550
+
551
+ /* common input start */
552
+ .common__input {
553
+ width: px-to-rem(460);
554
+ height: px-to-rem(44);
555
+ background: rgba(255, 255, 255, 1);
556
+ border: 1px solid rgba(223, 223, 223, 1);
557
+ padding-left: px-to-rem(15);
558
+ font-size: px-to-rem(14);
559
+ line-height: px-to-rem(17);
560
+ -webkit-appearance: none;
561
+ outline: none;
562
+ border-radius: 0;
563
+
564
+ &:focus {
565
+ border-radius: 0;
566
+ border: 1px solid rgba(0, 0, 0, 1);
567
+ }
568
+
569
+ &:-ms-input-placeholder {
570
+ font-size: px-to-rem(14);
571
+ color: rgba(188, 188, 188, 1);
572
+ line-height: px-to-rem(18);
573
+ }
574
+
575
+ &:-webkit-input-placeholder {
576
+ font-size: px-to-rem(14);
577
+ color: rgba(188, 188, 188, 1);
578
+ line-height: px-to-rem(18);
579
+ }
580
+
581
+ @media ($mobile) {
582
+ width: 100%;
583
+ height: px-to-rem(88/2);
584
+ border: px-to-rem(2/2) solid rgba(215, 220, 222, 1);
585
+ padding-left: px-to-rem(30/2);
586
+ font-size: px-to-rem(28/2);
587
+ line-height: px-to-rem(33/2);
588
+ border-radius: 0;
589
+
590
+ &:focus {
591
+ border-radius: 0;
592
+ border: px-to-rem(2/2) solid rgba(0, 0, 0, 1);
593
+ }
594
+
595
+ &:-ms-input-placeholder {
596
+ font-size: px-to-rem(28/2);
597
+ color: rgba(119, 119, 119, 1);
598
+ line-height: px-to-rem(33/2);
599
+ }
600
+
601
+ &:-webkit-input-placeholder {
602
+ font-size: px-to-rem(28/2);
603
+ color: rgba(119, 119, 119, 1);
604
+ line-height: px-to-rem(33/2);
605
+ }
606
+ }
607
+
608
+ &_error {
609
+ border: 1px solid rgba(226, 66, 71, 1) !important;
610
+
611
+ &:focus {
612
+ border: 1px solid rgba(226, 66, 71, 1) !important;
613
+ }
614
+ }
615
+ }
616
+
617
+ /* common input end */
618
+
619
+ /* common label start */
620
+ .common__label {
621
+ height: px-to-rem(16);
622
+ font-size: px-to-rem(14);
623
+ color: rgba(119, 119, 119, 1);
624
+ line-height: px-to-rem(16);
625
+ margin-bottom: px-to-rem(12);
626
+ display: block;
627
+
628
+ @media ($mobile) {
629
+ font-size: px-to-rem(28/2);
630
+ line-height: px-to-rem(33/2);
631
+ margin-bottom: px-to-rem(21/2);
632
+ }
633
+ }
634
+
635
+ /* common label end */
636
+
637
+ @media (min-width: 768px) {
638
+ .col-md-2_4 {
639
+ flex: 0 0 20%;
640
+ max-width: 20%;
641
+ }
642
+ }
643
+
644
+ /* common img start */
645
+ .common__img_hover {
646
+ &:hover {
647
+ opacity: 0.7;
648
+ }
649
+ }
650
+
651
+ /* common img end */
652
+
653
+ // overlay image with text styles
654
+ @media ($pc) {
655
+ .hero {
656
+ &--large {
657
+ height: 600px;
658
+ }
659
+
660
+ &--medium {
661
+ height: 500px;
662
+ }
663
+
664
+ &--small {
665
+ height: 400px;
666
+ }
667
+
668
+ .page-width {
669
+ padding: 0 55px;
670
+ max-width: 750px;
671
+ }
672
+
673
+ .mega-subtitle {
674
+ margin: 24px auto 0;
675
+ }
676
+
677
+ .mega-title-large {
678
+ font-size: 48px;
679
+ }
680
+
681
+ .mega-subtitle-large {
682
+ font-size: 18px;
683
+ }
684
+
685
+ .mega-title-medium {
686
+ font-size: 36px;
687
+ }
688
+
689
+ .mega-subtitle-medium {
690
+ font-size: 16px;
691
+ }
692
+
693
+ .mega-title-small {
694
+ font-size: 24px;
695
+ }
696
+
697
+ .mega-subtitle-small {
698
+ font-size: 14px;
699
+ }
700
+
701
+ .hero-btn {
702
+ font-size: 14px;
703
+ padding: 10px 30px;
704
+ display: inline-block;
705
+ margin-top: 50px;
706
+
707
+ &:hover {
708
+ background: #f5f5f5;
709
+ font-weight: 500;
710
+ }
711
+ }
712
+ }
713
+ }
714
+
715
+ @media ($mobile) {
716
+ .hero {
717
+ &--large {
718
+ height: px-to-rem(918 / 2);
719
+ }
720
+
721
+ &--medium {
722
+ height: px-to-rem(800 / 2);
723
+ }
724
+
725
+ &--small {
726
+ height: px-to-rem(600 / 2);
727
+ }
728
+
729
+ .page-width {
730
+ padding: 0 px-to-rem(22 / 2);
731
+ max-width: px-to-rem(690 / 2);
732
+ }
733
+
734
+ .mega-subtitle {
735
+ margin: px-to-rem(30 / 2) auto 0;
736
+ max-width: px-to-rem(700 / 2);
737
+ }
738
+
739
+ .mega-title-large {
740
+ font-size: px-to-rem(60 / 2);
741
+ }
742
+
743
+ .mega-subtitle-large {
744
+ font-size: px-to-rem(36 / 2);
745
+ }
746
+
747
+ .mega-title-medium {
748
+ font-size: px-to-rem(48 / 2);
749
+ }
750
+
751
+ .mega-subtitle-medium {
752
+ font-size: px-to-rem(32 / 2);
753
+ }
754
+
755
+ .mega-title-small {
756
+ font-size: px-to-rem(36 / 2);
757
+ }
758
+
759
+ .mega-subtitle-small {
760
+ font-size: px-to-rem(28 / 2);
761
+ }
762
+
763
+ .hero-btn {
764
+ cursor: pointer;
765
+ font-size: px-to-rem(28 / 2);
766
+ padding: 10px 30px;
767
+ display: inline-block;
768
+ margin-top: px-to-rem(60 / 2);
769
+
770
+ &:hover {
771
+ background: #f5f5f5;
772
+ font-weight: 500;
773
+ }
774
+ }
775
+ }
776
+ }
777
+
778
+ .hero {
779
+ position: relative;
780
+ // display: table;
781
+ // width: 100%;
782
+
783
+ .col-12 {
784
+ @media ($pc) {
785
+ padding: 0;
786
+ }
787
+ }
788
+
789
+ .hover-zoom {
790
+ transition: all 0.5s;
791
+ }
792
+
793
+ a[href] .hover-zoom:hover {
794
+ transform: scale(1.1);
795
+ }
796
+
797
+ &.url-cursor {
798
+ cursor: pointer;
799
+ }
800
+
801
+ &.hover-enlarge {
802
+ transition: transform 0.3s linear;
803
+ }
804
+
805
+ &.hover-enlarge:hover {
806
+ transform: scale(1.1);
807
+
808
+ &.hero__overlay::before {
809
+ opacity: 0.3;
810
+ }
811
+ }
812
+
813
+ // &.hero__overlay::before {
814
+ // content: '';
815
+ // position: absolute;
816
+ // top: 0;
817
+ // right: 0;
818
+ // bottom: 0;
819
+ // left: 0;
820
+ // background-color: #000;
821
+ // z-index: 1;
822
+ // transition: opacity 0.3s linear;
823
+ // }
824
+
825
+ .hero__inner {
826
+ position: absolute;
827
+ top: 0;
828
+ left: 0;
829
+ right: 0;
830
+ bottom: 0;
831
+ display: flex;
832
+ align-items: center;
833
+ justify-content: center;
834
+ z-index: 2;
835
+
836
+ .text-center {
837
+ // margin: 0 auto;
838
+ // text-align: center;
839
+ }
840
+
841
+ .mega-title,
842
+ .mega-subtitle {
843
+ color: #fff;
844
+ }
845
+ }
846
+ }
847
+
848
+ /* common collection gap start */
849
+ .common__collection-gap {
850
+ @media ($mobile) {
851
+ margin-bottom: px-to-rem($mb_collection_row_margin);
852
+ padding: 0 px-to-rem(7.5);
853
+ }
854
+
855
+ @media ($pc) {
856
+ padding: 0 px-to-rem($pc_collection_row_padding / 2);
857
+ margin-bottom: px-to-rem($pc_collection_row_margin);
858
+ }
859
+ }
860
+
861
+ .common__collection-row {
862
+ @media ($mobile) {
863
+ margin: 0 px-to-rem(-7.5);
864
+ }
865
+
866
+ @media ($pc) {
867
+ margin: 0 px-to-rem(-$bootstrap_padding - $pc_collection_row_padding / 2);
868
+ }
869
+ }
870
+
871
+ /* common collection gap end */
872
+
873
+ /* modal override */
874
+ .modal {
875
+ &-header {
876
+ border-bottom: none;
877
+ }
878
+
879
+ &-footer {
880
+ border-top: none;
881
+ }
882
+
883
+ &__header {
884
+ width: 100%;
885
+ text-align: center;
886
+ display: flex;
887
+ border-bottom: 1px solid #ddd;
888
+ justify-content: center;
889
+ }
890
+
891
+ &__close {
892
+ &.close {
893
+ position: absolute;
894
+ top: px-to-rem(15);
895
+ right: px-to-rem(15);
896
+ background: none;
897
+ z-index: 1051;
898
+ margin: 0;
899
+ padding: 0;
900
+ cursor: pointer;
901
+ outline: none;
902
+ font-size: px-to-rem(16);
903
+ color: #212121;
904
+ opacity: 1;
905
+
906
+ &:hover {
907
+ color: #212121 !important;
908
+ opacity: 0.7 !important;
909
+ }
910
+
911
+ @media ($mobile) {
912
+ top: px-to-rem(5);
913
+ right: px-to-rem(5);
914
+ }
915
+ }
916
+ }
917
+ }
918
+
919
+ .container {
920
+ position: relative;
921
+ }
922
+
923
+ // the specific style of tinymce
924
+ .dj-mce-view {
925
+ img {
926
+ position: relative;
927
+ max-width: 100%;
928
+ vertical-align: bottom;
929
+ height: auto;
930
+ }
931
+
932
+ iframe {
933
+ width: 100%;
934
+ }
935
+
936
+ table {
937
+ max-width: 100%;
938
+
939
+ td,
940
+ th {
941
+ border: 1px solid #ddd;
942
+ }
943
+ }
944
+
945
+ blockquote {
946
+ margin: 1em 40px;
947
+ }
948
+ }
949
+
950
+ /* 阿语适配 */
951
+ html[dir='rtl'] {
952
+ body {
953
+ text-align: right;
954
+ }
955
+
956
+ .common__input {
957
+ padding-right: px-to-rem(15);
958
+ }
959
+
960
+ .common__select::after {
961
+ right: unset;
962
+ left: px-to-rem(16) !important;
963
+ }
964
+ }
965
+
966
+ .dj_skin_link {
967
+ opacity: 1;
968
+ }
969
+
970
+ .dj_skin_link:hover {
971
+ opacity: 0.7;
972
+ }
973
+
974
+ .placeholder-noblocks {
975
+ padding: 40px;
976
+ text-align: center;
977
+ }
978
+
979
+ @media ($mobile) {
980
+ .product-info__social-sharing {
981
+ display: none;
982
+ }
983
+ }
984
+
985
+ .product-info__label {
986
+ position: absolute;
987
+ top: 0;
988
+ text-align: center;
989
+ font-size: 14px;
990
+ font-weight: 700;
991
+ line-height: 1.2;
992
+ z-index: 1;
993
+ }
994
+
995
+ .product-info__label-flag {
996
+ display: flex;
997
+ flex-direction: column;
998
+ justify-content: center;
999
+ align-items: center;
1000
+ right: 0;
1001
+ min-height: 30px;
1002
+ max-width: 120px;
1003
+ padding: 2px 5px 2px 14px;
1004
+ -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
1005
+ clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
1006
+
1007
+ @media (max-width: 576px) {
1008
+ max-width: 105px;
1009
+ line-height: 1.1;
1010
+ font-size: 11px;
1011
+ }
1012
+ }
1013
+
1014
+ .product-info__label-badge {
1015
+ left: 10px;
1016
+ min-width: 40px;
1017
+ padding: 2px 5px 10px;
1018
+ clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
1019
+ -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
1020
+
1021
+ .product-info__save-label, .product-info__discount-label{
1022
+ display: flex;
1023
+ flex-direction: column;
1024
+ align-items: center;
1025
+ padding-top: 2px;
1026
+ }
1027
+
1028
+ @media (max-width: 576px) {
1029
+ font-size: 11px;
1030
+ }
1031
+ }
1032
+
1033
+ .product-info__label-triangle {
1034
+ display: flex;
1035
+ flex-direction: column;
1036
+ align-items: center;
1037
+ justify-content: center;
1038
+ right: 0;
1039
+ max-width: 108px;
1040
+ min-height: 30px;
1041
+ padding-bottom: 5px;
1042
+ // translateZ(1px)兼容火狐transform+box-shadow有白框问题
1043
+ transform: translateX(30%) rotate(45deg) translateZ(1px);
1044
+ transform-origin: left top;
1045
+
1046
+ div:first-child[class*=product-info__save-label]{
1047
+ display: flex;
1048
+ flex-direction: column;
1049
+ }
1050
+
1051
+ @media (max-width: 576px) {
1052
+ max-width: 75px;
1053
+ min-height: 20px;
1054
+ font-size: 10px;
1055
+ }
1056
+ }
1057
+
1058
+ .slick-dots li button{
1059
+ outline: 0;
1060
+ }
1061
+
1062
+ .text_toggle {
1063
+ position: relative;
1064
+ padding-right: 15px;
1065
+ word-break: break-all;
1066
+
1067
+ [for^="text_limit"] {
1068
+ position: absolute;
1069
+ top: 0;
1070
+ right: 0;
1071
+ transition: all 0.3s;
1072
+ i {
1073
+ font-size: 12px;
1074
+ }
1075
+ }
1076
+ }
1077
+
1078
+ .text_toggle:checked + .three_line_text_truncate {
1079
+ -webkit-line-clamp: unset!important;
1080
+ }
1081
+ .text_toggle:checked + .three_line_text_truncate [for^="text_limit"] {
1082
+ transform: rotateZ(180deg);
1083
+ }
1084
+
1085
+ #atc-modal {
1086
+ .cart__content [for^='text_limit'] {
1087
+ display: none;
1088
+ }
1089
+ .cart__content .text_toggle:not(input) {
1090
+ padding-right: 0;
1091
+ }
1092
+ }
1093
+
1094
+ .product-image__thumb-video {
1095
+ display: flex;
1096
+ position: absolute;
1097
+ left: 50%;
1098
+ top: 50%;
1099
+ transform: translate(-50%, -50%);
1100
+ }