shoplazza-cli 1.1.2 → 2.0.0

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 (400) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +206 -332
  4. package/README.zh.md +318 -0
  5. package/package.json +24 -70
  6. package/scripts/install.js +144 -0
  7. package/scripts/jsbuild/dev/index.js +123 -0
  8. package/scripts/jsbuild/index.js +77 -0
  9. package/{lib/checkout/build → scripts/jsbuild}/plugin/vite-plugin-add-extension-id.js +4 -2
  10. package/scripts/jsbuild/vite.config.js +35 -0
  11. package/scripts/run.js +29 -0
  12. package/.editorconfig +0 -28
  13. package/.prettierrc +0 -9
  14. package/bin/shoplazza +0 -137
  15. package/fixtures/assets/blog.scss +0 -74
  16. package/fixtures/assets/cart_modal.scss +0 -450
  17. package/fixtures/assets/collection_detail.js +0 -234
  18. package/fixtures/assets/collection_detail.scss +0 -345
  19. package/fixtures/assets/collection_list.scss +0 -11
  20. package/fixtures/assets/collection_slider.scss +0 -169
  21. package/fixtures/assets/feature_columns.scss +0 -26
  22. package/fixtures/assets/feature_product.scss +0 -109
  23. package/fixtures/assets/footer.js +0 -58
  24. package/fixtures/assets/footer.scss +0 -337
  25. package/fixtures/assets/four_images.scss +0 -29
  26. package/fixtures/assets/gallery.scss +0 -55
  27. package/fixtures/assets/header.js +0 -178
  28. package/fixtures/assets/header.scss +0 -929
  29. package/fixtures/assets/image_text.scss +0 -72
  30. package/fixtures/assets/logo_bar.scss +0 -11
  31. package/fixtures/assets/newsletter.scss +0 -90
  32. package/fixtures/assets/not_found.scss +0 -39
  33. package/fixtures/assets/page_detail.scss +0 -16
  34. package/fixtures/assets/pagination.scss +0 -150
  35. package/fixtures/assets/postcss.config.js +0 -6
  36. package/fixtures/assets/product_description.scss +0 -88
  37. package/fixtures/assets/product_detail.js +0 -634
  38. package/fixtures/assets/product_detail.scss +0 -1106
  39. package/fixtures/assets/relative_product.scss +0 -45
  40. package/fixtures/assets/reviews.scss +0 -70
  41. package/fixtures/assets/rich_text.scss +0 -71
  42. package/fixtures/assets/search.js +0 -87
  43. package/fixtures/assets/search.scss +0 -67
  44. package/fixtures/assets/slide.scss +0 -51
  45. package/fixtures/assets/slider.scss +0 -141
  46. package/fixtures/assets/test.scss +0 -1
  47. package/fixtures/assets/theme.css +0 -976
  48. package/fixtures/assets/theme.scss +0 -1100
  49. package/fixtures/assets/three_images.scss +0 -20
  50. package/fixtures/assets/tools.scss +0 -23
  51. package/fixtures/assets/two_images.scss +0 -24
  52. package/fixtures/assets/video.scss +0 -45
  53. package/fixtures/assets/video_text.scss +0 -63
  54. package/fixtures/config/settings_data.json +0 -107
  55. package/fixtures/config/settings_schema.json +0 -690
  56. package/fixtures/layout/theme.liquid +0 -76
  57. package/fixtures/locales/ar-SA.json +0 -212
  58. package/fixtures/locales/de-DE.json +0 -290
  59. package/fixtures/locales/en-US.json +0 -290
  60. package/fixtures/locales/es-ES.json +0 -290
  61. package/fixtures/locales/fr-FR.json +0 -290
  62. package/fixtures/locales/id-ID.json +0 -212
  63. package/fixtures/locales/it-IT.json +0 -212
  64. package/fixtures/locales/ja-JP.json +0 -289
  65. package/fixtures/locales/ko-KR.json +0 -290
  66. package/fixtures/locales/nl-NL.json +0 -290
  67. package/fixtures/locales/pl-PL.json +0 -290
  68. package/fixtures/locales/pt-PT.json +0 -212
  69. package/fixtures/locales/ru-RU.json +0 -212
  70. package/fixtures/locales/th-TH.json +0 -212
  71. package/fixtures/locales/zh-CN.json +0 -290
  72. package/fixtures/locales/zh-TW.json +0 -290
  73. package/fixtures/sections/apps.liquid +0 -47
  74. package/fixtures/sections/blog.liquid +0 -137
  75. package/fixtures/sections/collection_desc.liquid +0 -34
  76. package/fixtures/sections/collection_detail.liquid +0 -436
  77. package/fixtures/sections/collection_image.liquid +0 -104
  78. package/fixtures/sections/collection_list.liquid +0 -161
  79. package/fixtures/sections/collection_name.liquid +0 -34
  80. package/fixtures/sections/collection_slider.liquid +0 -330
  81. package/fixtures/sections/feature_columns.liquid +0 -275
  82. package/fixtures/sections/feature_product.liquid +0 -227
  83. package/fixtures/sections/footer.liquid +0 -488
  84. package/fixtures/sections/four_images.liquid +0 -160
  85. package/fixtures/sections/gallery.liquid +0 -258
  86. package/fixtures/sections/header.liquid +0 -1157
  87. package/fixtures/sections/html.liquid +0 -40
  88. package/fixtures/sections/image_text.liquid +0 -350
  89. package/fixtures/sections/instagram_plus.liquid +0 -393
  90. package/fixtures/sections/logo_bar.liquid +0 -183
  91. package/fixtures/sections/newsletter.liquid +0 -225
  92. package/fixtures/sections/not_found.liquid +0 -39
  93. package/fixtures/sections/overlay_image.liquid +0 -648
  94. package/fixtures/sections/page_detail.liquid +0 -39
  95. package/fixtures/sections/photo_collection.liquid +0 -433
  96. package/fixtures/sections/product_description.liquid +0 -208
  97. package/fixtures/sections/product_detail.liquid +0 -611
  98. package/fixtures/sections/products.liquid +0 -216
  99. package/fixtures/sections/relative_product.liquid +0 -121
  100. package/fixtures/sections/reviews.liquid +0 -115
  101. package/fixtures/sections/rich_text.liquid +0 -157
  102. package/fixtures/sections/search.liquid +0 -163
  103. package/fixtures/sections/slide.liquid +0 -719
  104. package/fixtures/sections/three_images.liquid +0 -157
  105. package/fixtures/sections/two_images.liquid +0 -125
  106. package/fixtures/sections/video.liquid +0 -95
  107. package/fixtures/sections/video_text.liquid +0 -128
  108. package/fixtures/snippets/bgset.liquid +0 -21
  109. package/fixtures/snippets/card_title.liquid +0 -8
  110. package/fixtures/snippets/cart_modal.liquid +0 -74
  111. package/fixtures/snippets/collection.liquid +0 -77
  112. package/fixtures/snippets/collection_filter_modal.liquid +0 -56
  113. package/fixtures/snippets/default_image_4.liquid +0 -14
  114. package/fixtures/snippets/default_image_6.liquid +0 -18
  115. package/fixtures/snippets/default_image_8.liquid +0 -23
  116. package/fixtures/snippets/four_images_item.liquid +0 -8
  117. package/fixtures/snippets/header_ads.liquid +0 -95
  118. package/fixtures/snippets/hero_image.liquid +0 -94
  119. package/fixtures/snippets/icon_video_play_large.liquid +0 -1
  120. package/fixtures/snippets/icon_video_play_medium.liquid +0 -4
  121. package/fixtures/snippets/icon_video_play_small.liquid +0 -4
  122. package/fixtures/snippets/lazyimg.liquid +0 -22
  123. package/fixtures/snippets/lazyimg_art.liquid +0 -36
  124. package/fixtures/snippets/lazysizes.liquid +0 -41
  125. package/fixtures/snippets/link.liquid +0 -2
  126. package/fixtures/snippets/pagination.liquid +0 -48
  127. package/fixtures/snippets/product.liquid +0 -126
  128. package/fixtures/snippets/product_art_tpl.liquid +0 -152
  129. package/fixtures/snippets/product_info_body.liquid +0 -337
  130. package/fixtures/snippets/product_info_tpl.liquid +0 -423
  131. package/fixtures/snippets/product_label.liquid +0 -46
  132. package/fixtures/snippets/settings.liquid +0 -295
  133. package/fixtures/snippets/social-meta-tags.liquid +0 -106
  134. package/fixtures/snippets/video_html.liquid +0 -11
  135. package/fixtures/snippets/video_source.liquid +0 -98
  136. package/fixtures/snippets/video_thumb_icon.liquid +0 -2
  137. package/fixtures/templates/404.liquid +0 -1
  138. package/fixtures/templates/collection.liquid +0 -92
  139. package/fixtures/templates/index.liquid +0 -206
  140. package/fixtures/templates/page.liquid +0 -1
  141. package/fixtures/templates/product.liquid +0 -99
  142. package/fixtures/templates/search.liquid +0 -1
  143. package/jest.config.js +0 -192
  144. package/lib/__tests__/log.test.js +0 -15
  145. package/lib/__tests__/utils.test.js +0 -69
  146. package/lib/app/api/cli.js +0 -225
  147. package/lib/app/api/openapi.js +0 -121
  148. package/lib/app/api/partnerOpenapi.js +0 -104
  149. package/lib/app/bin/index.js +0 -20
  150. package/lib/app/bin/javy/javy-arm-linux-v5.0.1 +0 -0
  151. package/lib/app/bin/javy/javy-arm-macos-v5.0.1 +0 -0
  152. package/lib/app/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
  153. package/lib/app/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
  154. package/lib/app/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
  155. package/lib/app/commands/config/actions/link.js +0 -189
  156. package/lib/app/commands/config/actions/use.js +0 -40
  157. package/lib/app/commands/config/index.js +0 -25
  158. package/lib/app/commands/config/link.js +0 -11
  159. package/lib/app/commands/config/use.js +0 -11
  160. package/lib/app/commands/deploy/actions/deploy.js +0 -196
  161. package/lib/app/commands/deploy/index.js +0 -11
  162. package/lib/app/commands/dev/actions/dev.js +0 -206
  163. package/lib/app/commands/dev/index.js +0 -11
  164. package/lib/app/commands/generate/actions/extension.js +0 -97
  165. package/lib/app/commands/generate/actions/generateCheckout.js +0 -58
  166. package/lib/app/commands/generate/actions/generateFunction.js +0 -56
  167. package/lib/app/commands/generate/actions/generateTheme.js +0 -128
  168. package/lib/app/commands/generate/extension.js +0 -11
  169. package/lib/app/commands/generate/index.js +0 -22
  170. package/lib/app/commands/index.js +0 -82
  171. package/lib/app/commands/info/actions/info.js +0 -168
  172. package/lib/app/commands/info/index.js +0 -11
  173. package/lib/app/commands/init/actions/init.js +0 -176
  174. package/lib/app/commands/init/index.js +0 -14
  175. package/lib/app/commands/versions/actions/list.js +0 -210
  176. package/lib/app/commands/versions/index.js +0 -22
  177. package/lib/app/commands/versions/list.js +0 -14
  178. package/lib/app/constant/code.js +0 -7
  179. package/lib/app/constant/color.js +0 -18
  180. package/lib/app/constant/extension.js +0 -16
  181. package/lib/app/constant/host.js +0 -23
  182. package/lib/app/constant/sso.js +0 -7
  183. package/lib/app/index.js +0 -8
  184. package/lib/app/services/auth/config.js +0 -33
  185. package/lib/app/services/auth/index.js +0 -9
  186. package/lib/app/services/auth/oauth-server.js +0 -70
  187. package/lib/app/services/auth/partner-token.js +0 -45
  188. package/lib/app/services/auth/sso-token.js +0 -69
  189. package/lib/app/services/auth/store-token.js +0 -100
  190. package/lib/app/services/auth/url-builder.js +0 -23
  191. package/lib/app/services/config/index.js +0 -41
  192. package/lib/app/services/devServer/app.js +0 -76
  193. package/lib/app/services/devServer/index.js +0 -103
  194. package/lib/app/services/devServer/middleware/hmacValidatorMiddleWare.js +0 -20
  195. package/lib/app/services/devServer/middleware/index.js +0 -5
  196. package/lib/app/services/devServer/tunnel/index.js +0 -43
  197. package/lib/app/services/devServer/tunnel/providers/cloudflare.js +0 -364
  198. package/lib/app/services/devServer/tunnel/providers/ngrok.js +0 -70
  199. package/lib/app/services/devServer/utils/index.js +0 -5
  200. package/lib/app/services/devServer/utils/secureCompare.js +0 -5
  201. package/lib/app/services/devServer/views/app.ejs +0 -133
  202. package/lib/app/services/extension-build/buildCheckout.js +0 -47
  203. package/lib/app/services/extension-build/buildFunction.js +0 -57
  204. package/lib/app/services/extension-build/buildTheme.js +0 -100
  205. package/lib/app/services/extension-build/index.js +0 -23
  206. package/lib/app/services/extension-build/plugins/vite-plugin-add-extension-id.js +0 -26
  207. package/lib/app/services/extension-diff/index.js +0 -132
  208. package/lib/app/services/extension-upsert/index.js +0 -21
  209. package/lib/app/services/extension-upsert/upsertCheckout.js +0 -44
  210. package/lib/app/services/extension-upsert/upsertFunction.js +0 -52
  211. package/lib/app/services/extension-upsert/upsertTheme.js +0 -113
  212. package/lib/app/services/oss/index.js +0 -45
  213. package/lib/app/services/partner/index.js +0 -52
  214. package/lib/app/store/base-store.js +0 -37
  215. package/lib/app/store/config-store.js +0 -55
  216. package/lib/app/store/config.js +0 -21
  217. package/lib/app/store/index.js +0 -14
  218. package/lib/app/store/install-store.js +0 -41
  219. package/lib/app/store/sso-store.js +0 -55
  220. package/lib/app/utils/asyncPool.js +0 -42
  221. package/lib/app/utils/debug/index.js +0 -16
  222. package/lib/app/utils/env.js +0 -24
  223. package/lib/app/utils/error.js +0 -20
  224. package/lib/app/utils/git.js +0 -20
  225. package/lib/app/utils/json.js +0 -27
  226. package/lib/app/utils/path.js +0 -33
  227. package/lib/app/utils/platform.js +0 -37
  228. package/lib/app/utils/request/cli.js +0 -72
  229. package/lib/app/utils/request/debug.js +0 -13
  230. package/lib/app/utils/request/openapi.js +0 -67
  231. package/lib/app/utils/request/partnerOpenapi.js +0 -47
  232. package/lib/app/utils/toml.js +0 -56
  233. package/lib/app/utils/views/message.js +0 -68
  234. package/lib/app/utils/views/select.js +0 -36
  235. package/lib/app/utils/withTempDir.js +0 -55
  236. package/lib/auth/__mocks__/getCode.js +0 -7
  237. package/lib/auth/__mocks__/index.js +0 -0
  238. package/lib/auth/child.js +0 -23
  239. package/lib/auth/getCode.js +0 -39
  240. package/lib/auth/index.js +0 -134
  241. package/lib/check.js +0 -28
  242. package/lib/checkout/api.js +0 -164
  243. package/lib/checkout/build/plugin/vite-plugin-transform-extension-html.js +0 -207
  244. package/lib/checkout/build/vite.config.js +0 -34
  245. package/lib/checkout/build.js +0 -38
  246. package/lib/checkout/config.js +0 -97
  247. package/lib/checkout/create.js +0 -132
  248. package/lib/checkout/delete.js +0 -26
  249. package/lib/checkout/deploy.js +0 -59
  250. package/lib/checkout/dev/index.js +0 -143
  251. package/lib/checkout/fields.js +0 -29
  252. package/lib/checkout/index.js +0 -63
  253. package/lib/checkout/preview.js +0 -52
  254. package/lib/checkout/pull.js +0 -22
  255. package/lib/checkout/push.js +0 -141
  256. package/lib/checkout/template/README.md +0 -34
  257. package/lib/checkout/template/_gitignore +0 -4
  258. package/lib/checkout/template/extension.config.js +0 -4
  259. package/lib/checkout/template/extensions/extension-template/extension.json +0 -10
  260. package/lib/checkout/template/extensions/extension-template/src/content.html +0 -3
  261. package/lib/checkout/template/extensions/extension-template/src/index.html +0 -5
  262. package/lib/checkout/template/extensions/extension-template/src/index.js +0 -11
  263. package/lib/checkout/template/extensions/extension-template/src/script.html +0 -3
  264. package/lib/checkout/template/extensions/extension-template/src/style.html +0 -3
  265. package/lib/checkout/template/package.json +0 -17
  266. package/lib/checkout/undeploy.js +0 -40
  267. package/lib/checkout/util.js +0 -201
  268. package/lib/checkout/verify.js +0 -16
  269. package/lib/checkout/version.js +0 -7
  270. package/lib/commands/__tests__/login.test.js +0 -77
  271. package/lib/commands/__tests__/logout.test.js +0 -29
  272. package/lib/commands/__tests__/store.test.js +0 -44
  273. package/lib/commands/__tests__/switch.test.js +0 -45
  274. package/lib/commands/login.js +0 -120
  275. package/lib/commands/logout.js +0 -23
  276. package/lib/commands/store.js +0 -14
  277. package/lib/commands/switch.js +0 -52
  278. package/lib/commands/theme/__tests__/delete.test.js +0 -49
  279. package/lib/commands/theme/__tests__/init.test.js +0 -21
  280. package/lib/commands/theme/__tests__/list.test.js +0 -80
  281. package/lib/commands/theme/__tests__/package.test.js +0 -17
  282. package/lib/commands/theme/__tests__/publish.test.js +0 -61
  283. package/lib/commands/theme/__tests__/pull.test.js +0 -69
  284. package/lib/commands/theme/__tests__/push.test.js +0 -63
  285. package/lib/commands/theme/__tests__/serve.test.js +0 -107
  286. package/lib/commands/theme/delete.js +0 -64
  287. package/lib/commands/theme/init.js +0 -51
  288. package/lib/commands/theme/list.js +0 -28
  289. package/lib/commands/theme/package.js +0 -37
  290. package/lib/commands/theme/publish.js +0 -56
  291. package/lib/commands/theme/pull.js +0 -62
  292. package/lib/commands/theme/push.js +0 -106
  293. package/lib/commands/theme/serve.js +0 -153
  294. package/lib/commands/theme/share.js +0 -20
  295. package/lib/commands/version.js +0 -6
  296. package/lib/common/constants.js +0 -24
  297. package/lib/common/db/partner.js +0 -91
  298. package/lib/common/inquirers/choose-app.js +0 -79
  299. package/lib/common/inquirers/choose-partner.js +0 -74
  300. package/lib/common/log.js +0 -15
  301. package/lib/common/login.js +0 -125
  302. package/lib/common/logout.js +0 -16
  303. package/lib/db/__mocks__/index.js +0 -9
  304. package/lib/db/__tests__/analytics.test.js +0 -19
  305. package/lib/db/__tests__/user.test.js +0 -20
  306. package/lib/db/analytics.js +0 -48
  307. package/lib/db/index.js +0 -9
  308. package/lib/db/user.js +0 -71
  309. package/lib/function/bin/index.js +0 -20
  310. package/lib/function/bin/javy/javy-arm-linux-v5.0.1 +0 -0
  311. package/lib/function/bin/javy/javy-arm-macos-v5.0.1 +0 -0
  312. package/lib/function/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
  313. package/lib/function/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
  314. package/lib/function/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
  315. package/lib/function/commands/compile.js +0 -43
  316. package/lib/function/commands/create.js +0 -77
  317. package/lib/function/commands/list.js +0 -18
  318. package/lib/function/commands/release.js +0 -69
  319. package/lib/function/index.js +0 -24
  320. package/lib/function/template/js/README.md +0 -37
  321. package/lib/function/template/js/_gitignore +0 -4
  322. package/lib/function/template/js/extension.config.json +0 -5
  323. package/lib/function/template/js/package.json +0 -17
  324. package/lib/function/template/js/src/index.js +0 -64
  325. package/lib/function/utils.js +0 -29
  326. package/lib/log.js +0 -13
  327. package/lib/openAPI/__mocks__/index.js +0 -20
  328. package/lib/openAPI/api.js +0 -76
  329. package/lib/openAPI/index.js +0 -56
  330. package/lib/oss.js +0 -102
  331. package/lib/partner-api/axios.js +0 -67
  332. package/lib/partner-api/index.js +0 -79
  333. package/lib/report.js +0 -37
  334. package/lib/theme-extension/api/index.js +0 -96
  335. package/lib/theme-extension/commands/build.js +0 -114
  336. package/lib/theme-extension/commands/connect.js +0 -73
  337. package/lib/theme-extension/commands/create.js +0 -105
  338. package/lib/theme-extension/commands/deploy.js +0 -56
  339. package/lib/theme-extension/commands/list.js +0 -35
  340. package/lib/theme-extension/commands/release.js +0 -59
  341. package/lib/theme-extension/commands/serve.js +0 -179
  342. package/lib/theme-extension/commands/versions.js +0 -55
  343. package/lib/theme-extension/index.js +0 -29
  344. package/lib/theme-extension/template/basic-app/README.md +0 -125
  345. package/lib/theme-extension/template/basic-app/extension.config.json +0 -4
  346. package/lib/theme-extension/template/basic-app/package.json +0 -18
  347. package/lib/theme-extension/template/basic-app/theme-app/assets/index.css +0 -4
  348. package/lib/theme-extension/template/basic-app/theme-app/assets-manifest.json +0 -1
  349. package/lib/theme-extension/template/basic-app/theme-app/blocks/index.liquid +0 -16
  350. package/lib/theme-extension/template/basic-app/theme-app/locales/ar-SA.json +0 -1
  351. package/lib/theme-extension/template/basic-app/theme-app/locales/de-DE.json +0 -1
  352. package/lib/theme-extension/template/basic-app/theme-app/locales/en-US.json +0 -6
  353. package/lib/theme-extension/template/basic-app/theme-app/locales/es-ES.json +0 -1
  354. package/lib/theme-extension/template/basic-app/theme-app/locales/fr-FR.json +0 -1
  355. package/lib/theme-extension/template/basic-app/theme-app/locales/id-ID.json +0 -1
  356. package/lib/theme-extension/template/basic-app/theme-app/locales/it-IT.json +0 -1
  357. package/lib/theme-extension/template/basic-app/theme-app/locales/ja-JP.json +0 -1
  358. package/lib/theme-extension/template/basic-app/theme-app/locales/ko-KR.json +0 -1
  359. package/lib/theme-extension/template/basic-app/theme-app/locales/nl-NL.json +0 -1
  360. package/lib/theme-extension/template/basic-app/theme-app/locales/pl-PL.json +0 -1
  361. package/lib/theme-extension/template/basic-app/theme-app/locales/pt-PT.json +0 -1
  362. package/lib/theme-extension/template/basic-app/theme-app/locales/ru-RU.json +0 -1
  363. package/lib/theme-extension/template/basic-app/theme-app/locales/th-TH.json +0 -1
  364. package/lib/theme-extension/template/basic-app/theme-app/locales/zh-CN.json +0 -6
  365. package/lib/theme-extension/template/basic-app/theme-app/locales/zh-TW.json +0 -1
  366. package/lib/theme-extension/template/basic-app/theme-app/snippets/index.liquid +0 -8
  367. package/lib/theme-extension/template/embed-app/README.md +0 -125
  368. package/lib/theme-extension/template/embed-app/extension.config.json +0 -4
  369. package/lib/theme-extension/template/embed-app/package.json +0 -18
  370. package/lib/theme-extension/template/embed-app/theme-app/assets-manifest.json +0 -1
  371. package/lib/theme-extension/template/embed-app/theme-app/blocks/index.liquid +0 -18
  372. package/lib/theme-extension/template/embed-app/theme-app/locales/ar-SA.json +0 -1
  373. package/lib/theme-extension/template/embed-app/theme-app/locales/de-DE.json +0 -1
  374. package/lib/theme-extension/template/embed-app/theme-app/locales/en-US.json +0 -6
  375. package/lib/theme-extension/template/embed-app/theme-app/locales/es-ES.json +0 -1
  376. package/lib/theme-extension/template/embed-app/theme-app/locales/fr-FR.json +0 -1
  377. package/lib/theme-extension/template/embed-app/theme-app/locales/id-ID.json +0 -1
  378. package/lib/theme-extension/template/embed-app/theme-app/locales/it-IT.json +0 -1
  379. package/lib/theme-extension/template/embed-app/theme-app/locales/ja-JP.json +0 -1
  380. package/lib/theme-extension/template/embed-app/theme-app/locales/ko-KR.json +0 -1
  381. package/lib/theme-extension/template/embed-app/theme-app/locales/nl-NL.json +0 -1
  382. package/lib/theme-extension/template/embed-app/theme-app/locales/pl-PL.json +0 -1
  383. package/lib/theme-extension/template/embed-app/theme-app/locales/pt-PT.json +0 -1
  384. package/lib/theme-extension/template/embed-app/theme-app/locales/ru-RU.json +0 -1
  385. package/lib/theme-extension/template/embed-app/theme-app/locales/th-TH.json +0 -1
  386. package/lib/theme-extension/template/embed-app/theme-app/locales/zh-CN.json +0 -6
  387. package/lib/theme-extension/template/embed-app/theme-app/locales/zh-TW.json +0 -1
  388. package/lib/theme-extension/template/embed-app/theme-app/snippets/index.liquid +0 -8
  389. package/lib/theme-extension/template/embed-app/theme-app/snippets/index_css.liquid +0 -6
  390. package/lib/theme-extension/utils/config.js +0 -32
  391. package/lib/theme-extension/utils/index.js +0 -213
  392. package/lib/tracing.js +0 -50
  393. package/lib/utils/config.js +0 -12
  394. package/lib/utils/console.js +0 -33
  395. package/lib/utils/env.js +0 -17
  396. package/lib/utils/file.js +0 -48
  397. package/lib/utils/platform.js +0 -37
  398. package/lib/utils/utils.js +0 -165
  399. /package/{lib/checkout → scripts/jsbuild}/dev/client.js +0 -0
  400. /package/{lib/app/services/extension-build/plugins → scripts/jsbuild/plugin}/vite-plugin-transform-extension-html.js +0 -0
@@ -1,1157 +0,0 @@
1
- <div class="header__wrapper">
2
- {% comment %} 公告栏 {% endcomment %}
3
- {% if section.settings.is_announce_show %}
4
- {% unless section.settings.is_announce_show_only_on_home and template.type != 15 %}
5
- <a class="fast-bar"
6
- {% if section.settings.announce_src.url %}
7
- href="{{section.settings.announce_src.url}}"
8
- {% endif %}
9
- {% unless section.settings.announce_src.type != "web" or section.settings.announce_src.url contains shop.domain %}
10
- target="_blank"
11
- {% endunless %}
12
- style="background: {{section.settings.announce_bg_color}};
13
- color: {{section.settings.announce_color}};
14
- {% if section.settings.announce_src.url %}cursor: pointer;{% endif %}">
15
- <div class="container">
16
- <div class="row">
17
- <div class="col-12 fast-bar__text-wrapper">
18
- <span class="fast-bar__text
19
- {% if section.settings.announce_src.url %}
20
- dj_skin_link
21
- {% endif %}
22
- ">
23
- {{section.settings.announce_title}}
24
- </span>
25
- </div>
26
- </div>
27
- </div>
28
- </a>
29
- {% endunless %}
30
- {% endif %}
31
-
32
- {% capture header_menu_icon %}
33
- <a class="header__icon header__icon_menu pl-0 ml-0">
34
- <i class="sep-font sep-font-list logo-icon-color"></i>
35
- </a>
36
- {% endcapture %}
37
-
38
- {% capture header_pc_menu %}
39
- {% assign links = linklists[section.settings.menu_id.id].links %}
40
- {% if links.size > 0 %}
41
- {% if section.settings.alignment == 'center-drawer' %}
42
- <div class="d-flex align-items-center col-4">
43
- {{ header_menu_icon }}
44
- </div>
45
- {% endif %}
46
- <div class="d-none pc_menu
47
- {% if section.settings.alignment == 'left' or section.settings.alignment == 'center' %}
48
- order-3 col-12 d-md-block
49
- {% elsif section.settings.alignment == 'center-left'%}
50
- order-0 col-4 d-md-block
51
- {% elsif section.settings.alignment == 'left-inline'%}
52
- order-1 col-6 d-md-block
53
- {% endif %}"
54
- {% if section.settings.alignment == 'left' or section.settings.alignment == 'center' %}
55
- style="color: {{section.settings.menu_color}};"
56
- {% endif %}
57
- >
58
- <div id="navigation-pc-menu" class="navigation-pc__menu
59
- {% if section.settings.alignment == 'center-left' or section.settings.alignment == 'left' %}justify-content-start{% else%}justify-content-center{% endif %}">
60
- <ul class="row p-0 my-0">
61
- {% for firstLinks in links %}
62
- {% assign link = linklists[firstLinks.id] %}
63
- <li class="navigation-pc__menu-block
64
- {% if link.links %}
65
- navigation-pc__menu-block_has-child
66
- navigation-pc__menu-item_caret
67
- {% endif %}
68
- ">
69
- <div class="d-flex align-items-center justify-content-between link-wrap">
70
- <div class="position-relative d-flex">
71
- <a class="navigation-pc__menu-item_link c-text-truncate"
72
- {% if firstLinks.url %}
73
- href="{{ firstLinks.url }}"
74
- {% endif %}
75
- {% unless firstLinks.type != "web" or firstLinks.url contains shop.domain %}
76
- target="_blank"
77
- {% endunless %}
78
- >
79
- {{ firstLinks.title }}
80
- </a>
81
- {% assign firstLinkTitle = firstLinks.title | downcase %}
82
- {% for block in section.blocks %}
83
- {% assign menu = block.settings.menu_trigger | downcase %}
84
- {% if firstLinkTitle == menu %}
85
- {% if block.settings.menu_label_text %}
86
- <span class="tip" style="background-color: {{block.settings.label_bg}}; color: {{block.settings.label_text}};">{{block.settings.menu_label_text}}</span>
87
- {% endif %}
88
- {% break %}
89
- {% endif %}
90
- {% endfor %}
91
- </div>
92
- {% if link.links %}
93
- <i class="sep-font navigation-m__icon nav_first-menu-icon flex-grow-1 text-right sep-font-plus"></i>
94
- {% endif %}
95
- </div>
96
- {% if link.links %}
97
- {% assign secondLinks = link.links %}
98
- {% comment %}
99
- 菜单类型:仅二级菜单,三级菜单(多组菜单,单组菜单)
100
-
101
- treeType('two','three')->菜单层级
102
- threeLinksSize(number)->拥有三级菜单的二级菜单数量
103
- 存在三级菜单(多组菜单,子菜单显示1~5列,自左往右排序。下拉容器宽高自适应主题内容区域宽高)
104
- 存在三级菜单(仅有一组菜单,单列显示,下拉容器宽度自适应列宽,不通栏显示)
105
- 仅存在二级菜单(所有二级菜单单列显示,下拉容器宽度自适应列宽,不通栏显示)
106
-
107
- {% endcomment %}
108
- {% assign seconndLinksSize = 0 %}
109
- {% assign threeLinksSize = 0 %}
110
- {% assign treeType = 'two' %}
111
- {% for secondLink in secondLinks %}
112
- {% if linklists[secondLink.id].links %}
113
- {% assign treeType = 'three' %}
114
- {% endif %}
115
- {% endfor %}
116
- {% comment %} 仅存在二级菜单 {% endcomment %}
117
- {% if treeType == 'two' %}
118
- <div class="navigation-pc__menu-block navigation-pc__menu-block_child navigation-pc__second-menu-blocks {% if section.settings.alignment == 'center-drawer' %}position-relative border-0{% endif %}">
119
- {% for secondLink in secondLinks %}
120
- {% assign secondLinkTitle = secondLink.title | downcase %}
121
- <div class="navigation-pc__menu-item position-relative d-flex">
122
- <a class="navigation-pc__menu-item_link c-text-truncate"
123
- {% if secondLink.url %}href="{{ secondLink.url }}"{% endif %}
124
- {% unless secondLink.type != "web" or secondLink.url contains shop.domain %}target="_blank"{% endunless %}
125
- >{{ secondLink.title }}</a>
126
- {% if firstLinkTitle != secondLinkTitle %}
127
- {% for block in section.blocks %}
128
- {% assign menu = block.settings.menu_trigger | downcase %}
129
- {% if menu == secondLinkTitle %}
130
- {% if block.settings.menu_label_text %}
131
- <span class="tip quirk-tip" style="background-color: {{block.settings.label_bg}}; color: {{block.settings.label_text}};">{{block.settings.menu_label_text}}</span>
132
- {% endif %}
133
- {% break %}
134
- {% endif %}
135
- {% endfor %}
136
- {% endif %}
137
- </div>
138
- {% endfor %}
139
- </div>
140
-
141
- {% comment %} 三级菜单 {% endcomment %}
142
- {% else %}
143
- <div class="navigation-hidden-data navigation-pc__menu-block navigation-pc__menu-block_child {% if section.settings.alignment == 'center-drawer' %}position-relative border-0{% endif %}">
144
- {% for block in section.blocks %}
145
- {% assign menu = block.settings.menu | downcase %}
146
- {% if firstLinkTitle == menu %}
147
- {% include 'header_ads', position: block.settings.position1, type: block.settings.type1, image: block.settings.image1, title: block.settings.title1, desc: block.settings.desc1, link: block.settings.link1, product: block.settings.product1 %}
148
- {% include 'header_ads', position: block.settings.position2, type: block.settings.type2, image: block.settings.image2, title: block.settings.title2, desc: block.settings.desc2, link: block.settings.link2, product: block.settings.product2 %}
149
- {% include 'header_ads', position: block.settings.position3, type: block.settings.type3, image: block.settings.image3, title: block.settings.title3, desc: block.settings.desc3, link: block.settings.link3, product: block.settings.product3 %}
150
- {% break %}
151
- {% endif %}
152
- {% endfor %}
153
- {% assign secondLinkNum = 0 %}
154
- {% for secondLink in secondLinks %}
155
- {% assign secondLinkNum = secondLinkNum | plus: 1 %}
156
- {% assign secondLinkTitle = secondLink.title | downcase %}
157
- <div class="navigation-pc__third-menu-blocks d-block {% if secondLinkNum == secondLinks.size and secondLinks.size > 5 %} nav_wrap_menus {% endif %} " >
158
- <div class="d-flex align-items-center justify-content-between navigation-pc__second-menu-item">
159
- <div class="navigation-pc__menu-item position-relative d-flex">
160
- <a class="navigation-pc__menu-item_link c-text-truncate"
161
- {% if secondLink.url %}href="{{ secondLink.url }}"{% endif %}
162
- {% unless secondLink.type != "web" or secondLink.url contains shop.domain %}target="_blank"{% endunless %}
163
- >
164
- {{ secondLink.title }}
165
- </a>
166
- {% if firstLinkTitle != secondLinkTitle %}
167
- {% for block in section.blocks %}
168
- {% assign menu = block.settings.menu_trigger | downcase %}
169
- {% if menu == secondLinkTitle %}
170
- {% if block.settings.menu_label_text %}
171
- <span class="tip" style="background-color: {{block.settings.label_bg}}; color: {{block.settings.label_text}};">{{block.settings.menu_label_text}}</span>
172
- {% endif %}
173
- {% break %}
174
- {% endif %}
175
- {% endfor %}
176
- {% endif %}
177
- </div>
178
-
179
- {% comment %} if secondLink.links {% endcomment %}
180
- {% if linklists[secondLink.id].links %}
181
- <i class="sep-font navigation-m__icon nav_second-menu-icon flex-grow-1 text-right sep-font-plus"></i>
182
- {% endif %}
183
- </div>
184
- <div class="navigation-pc__third-menu-items d-flex flex-column">
185
- {% assign thirdLinks = linklists[secondLink.id].links %}
186
- {% for threeLink in thirdLinks %}
187
- {% assign threeLinkTitle = threeLink.title | downcase %}
188
- <div class="navigation-pc__third-menu-item position-relative d-flex">
189
- <a
190
- class="navigation-pc__menu-item_link"
191
- {% if threeLink.url %}href="{{ threeLink.url }}"{% endif %}
192
- {% unless threeLink.type != "web" or threeLink.url contains shop.domain %}target="_blank"{% endunless %}
193
- >
194
- {{ threeLink.title }}
195
- </a>
196
- {% if threeLinkTitle != firstLinkTitle and threeLinkTitle != secondLinkTitle %}
197
- {% for block in section.blocks %}
198
- {% assign menu = block.settings.menu_trigger | downcase %}
199
- {% if menu == threeLinkTitle %}
200
- {% if block.settings.menu_label_text %}
201
- <span class="tip" style="background-color: {{block.settings.label_bg}}; color: {{block.settings.label_text}};">{{block.settings.menu_label_text}}</span>
202
- {% endif %}
203
- {% break %}
204
- {% endif %}
205
- {% endfor %}
206
- {% endif %}
207
- </div>
208
- {% endfor %}
209
- </div>
210
- </div>
211
- {% endfor %}
212
- </div>
213
- {% endif %}
214
- {% endif %}
215
- </li>
216
- {% endfor %}
217
- </ul>
218
- </div>
219
- </div>
220
- {% endif %}
221
-
222
- {% endcapture %}
223
- {% capture header_icons %}
224
- <style>
225
- .logo-icon-color {
226
- color: {{section.settings.logo_icon_color}};
227
- }
228
- .logo-color {
229
- color: {{section.settings.logo_color}};
230
- }
231
- .logo-bg-color {
232
- background: {{section.settings.logo_bg_color}};
233
- }
234
- .logo-bg-color:after{
235
- background-color:
236
- {% if section.settings.alignment == 'left' or section.settings.alignment == 'center' %}
237
- {{section.settings.menu_bg_color}}
238
- {% else %}
239
- inherit
240
- {% endif %}
241
- }
242
- </style>
243
-
244
- <div class="dj_skin_header_logo logo-bg-color logo-color">
245
- {% comment %} 移动 {% endcomment %}
246
- <div class="container header__icon-container d-md-none">
247
- <div class="row header">
248
- <div class="col-3 d-flex align-items-center">
249
- {{ header_menu_icon }}
250
- {% if section.settings.is_search_show %}
251
- <a class="header__icon" href="/search">
252
- <i class="sep-font sep-font-search-thin logo-icon-color"></i>
253
- </a>
254
- {% endif %}
255
- </div>
256
- <div class="col-6 d-flex align-items-center justify-content-center">
257
- <a class="header__logo d-flex align-items-center justify-content-center" href="/">
258
- {% if section.settings.shop_logo %}
259
- <img src="{{section.settings.shop_logo | img_url : '600x'}}" alt="{{images[section.settings.shop_logo].alt | default: shop.name}}"/>
260
- {% else %}
261
- <span class="text-truncate logo-color dj_skin_title_font_family">{{shop.name}}</span>
262
- {% endif %}
263
- </a>
264
- </div>
265
- <div class="col-3 d-flex flex-row-reverse align-items-center">
266
- <a class="header__icon pr-0" href="/cart">
267
- <i class="sep-font sep-font-{{section.settings.cart_style}}-thin dj_skin_link logo-icon-color"></i>
268
- {% if section.settings.cart_style == 'bag' %}
269
- <span class="header__cart-count header__cart-count_bag" style="display: none;"></span>
270
- {% else %}
271
- <span class="header__cart-count header__cart-count_cart" style="display: none;"></span>
272
- {% endif %}
273
- </a>
274
- </div>
275
- </div>
276
- </div>
277
- {% comment %} PC {% endcomment %}
278
- <div class="container header__icon-container d-none d-md-block">
279
- <div class="d-flex header align-items-center justify-content-center h-100 {% if section.settings.alignment == 'left' or section.settings.alignment == 'center' %}flex-wrap{% endif %}">
280
- {% if section.settings.alignment == 'center' %}
281
- <div class="order-0 col-4"></div>
282
- {% endif %}
283
- {{ header_pc_menu }}
284
- <div class="header__logo-wrap d-flex align-items-center justify-content-center order-0 {% if section.settings.alignment == 'left'%}col-6{% elsif section.settings.alignment == 'left-inline'%}col-3{% else %}col-4{% endif %}">
285
- <a class="header__logo d-flex align-items-center {% if section.settings.alignment == 'center-left' or section.settings.alignment == 'center' or section.settings.alignment == 'center-drawer'%}justify-content-center{% else %}justify-content-start{% endif %}" href="/">
286
- {% if section.settings.shop_logo %}
287
- {% if section.settings.alignment == 'left' or section.settings.alignment == 'center' %}
288
- <img src="{{section.settings.shop_logo | img_url : '600x'}}" alt="{{images[section.settings.shop_logo].alt | default: shop.name}}"/>
289
- {% else %}
290
- <img src="{{section.settings.shop_logo | img_url : '300x'}}" alt="{{images[section.settings.shop_logo].alt | default: shop.name}}"/>
291
- {% endif %}
292
- {% else %}
293
- <span class="text-truncate logo-color dj_skin_title_font_family">{{shop.name}}</span>
294
- {% endif %}
295
- </a>
296
- </div>
297
- <div class="header__icon-wrap d-flex flex-row-reverse align-items-center order-2
298
- {% if section.settings.alignment == 'left'%}col-6{% elsif section.settings.alignment == 'left-inline'%}col-3{% else %}col-4{% endif %}">
299
- <div class="header__icon dj_skin_text_font_family multiply_currency"></div>
300
- <a class="header__icon" href="/cart">
301
- <i class="sep-font sep-font-{{section.settings.cart_style}}-thin dj_skin_link logo-icon-color"></i>
302
- {% if section.settings.cart_style == 'bag' %}
303
- <span class="header__cart-count header__cart-count_bag" style="display: none;"></span>
304
- {% else %}
305
- <span class="header__cart-count header__cart-count_cart" style="display: none;"></span>
306
- {% endif %}
307
- </a>
308
- {% if section.settings.is_account_show %}
309
- <div class="header__icon header__account">
310
- <i class="sep-font sep-font-user-thin dj_skin_link logo-icon-color"></i>
311
- <div style="display: none;" class="header__account-popover">
312
- <ul>
313
- {% if customer.id %}
314
- <li class="header__popover-item"><a href="/account/order">{{ 'i18n.navigation.general.my_orders' | t }}</a></li>
315
- <li class="header__popover-item"><a href="/account/addresses">{{ 'i18n.navigation.general.address_book' | t }}</a></li>
316
- <li class="header__popover-item"><div class="header__logout header__logout_border">{{ 'i18n.navigation.general.log_out' | t }}</div></li>
317
- {% else %}
318
- <li class="header__popover-item"><a href="/account/login">{{ 'i18n.navigation.general.login' | t }}</a></li>
319
- <li class="header__popover-item"><a href="/account/register">{{ 'i18n.navigation.general.register' | t }}</a></li>
320
- {% endif %}
321
- </ul>
322
- </div>
323
- </div>
324
- {% endif %}
325
- {% if section.settings.is_search_show %}
326
- <form action="/search" method="get">
327
- <div tabindex="-1" class="header__icon d-none d-lg-flex flex-row-reverse align-items-center header__search">
328
- <button type="submit" class="sep-font sep-font-search-thin header__search-icon dj_skin_link logo-icon-color" tabindex="-1"></button>
329
- <input style="background-color: {{section.settings.logo_bg_color}} !important;" name="q" id="search{{section.id}}" type="text" class="form-control header__search-input " placeholder="{{ 'i18n.navigation.general.search_placeholder' | t }}" />
330
- <label for="search{{section.id}}" class="header__search-label" tabindex="1"></label>
331
- </div>
332
- </form>
333
- <a class="header__icon d-md-block d-lg-none" href="/search">
334
- <i class="sep-font sep-font-search-thin logo-icon-color"></i>
335
- </a>
336
- {% endif %}
337
- </div>
338
- </div>
339
- </div>
340
- </div>
341
- {% comment %} 三级导航通屏占位 {% endcomment %}
342
- <div class="menus_container" style="background-color: {{ section.settings.menu_bg_color }}">
343
- <div class="menus_container_inner container d-md-flex justify-content-center flex-wrap">
344
- </div>
345
- </div>
346
-
347
- {% endcapture %}
348
- {% comment %} 导航图标 {% endcomment %}
349
- {{ header_icons }}
350
- </div>
351
- {% comment %} 菜单 {% endcomment %}
352
- {% comment %} navigation-m__menu-item_has-child 用于表示是否有二级菜单,用来切换 expanded {% endcomment %}
353
- <div class="container dj_skin_text_font_family">
354
- <div class="row">
355
- {% comment %} 菜单 {% endcomment %}
356
- <div class="col-12 navigation-m">
357
- <div class="navigation-m__menu-wrap">
358
- <ul class="navigation-m__menu"></ul>
359
- {% comment %} 个人中心 {% endcomment %}
360
- {% if section.settings.is_account_show %}
361
- <ul class="navigation-m__account">
362
- {% if customer.id %}
363
- <li class="navigation-pc__menu-block navigation-pc__menu-block_has-child">
364
- <div class="d-flex align-items-center justify-content-between position-relative navigation-m__account_opacity">
365
- <a class="navigation-pc__menu-item_link text-truncate flex-grow-1" target="_blank">{{ 'i18n.navigation.general.my_account' | t }}</a>
366
- <i class="sep-font sep-font-plus navigation-m__icon nav_first-menu-icon flex-grow-1 text-right"></i>
367
- </div>
368
- <div class="navigation-pc__menu-block navigation-pc__menu-block_child">
369
- <a class="navigation-m__menu-item navigation-m__menu-item_link" href="/account/order">{{ 'i18n.navigation.general.my_orders' | t }}</a>
370
- <a class="navigation-m__menu-item navigation-m__menu-item_link" href="/account/addresses">{{ 'i18n.navigation.general.address_book' | t }}</a>
371
- <a class="navigation-m__menu-item navigation-m__menu-item_link header__logout">{{ 'i18n.navigation.general.log_out' | t }}</a>
372
- </div>
373
- </li>
374
- {% else %}
375
- <a class="navigation-m__menu-item navigation-m__menu-item_link" href="/account/login">{{ 'i18n.navigation.general.login' | t }}</a>
376
- <a class="navigation-m__menu-item navigation-m__menu-item_link" href="/account/register">{{ 'i18n.navigation.general.register' | t }}</a>
377
- {% endif %}
378
- </ul>
379
- {% endif %}
380
- </div>
381
- {% comment %} 货币接入 {% endcomment %}
382
- <div class="navigation-m__setting d-block d-md-none">
383
- <div class="multiply_currency"></div>
384
- </div>
385
- </div>
386
- </div>
387
- </div>
388
-
389
- {% javascript %}
390
- $(function () {
391
- $.header && $.header({
392
- id: '{{section.id}}',
393
- env: {{shop.env}},
394
- is_header_fixed: {{section.settings.is_header_fixed}}
395
- });
396
- $(window).on('resize header_event', function() {
397
- var w = $(window).width();
398
- var alignment = '{{section.settings.alignment}}';
399
- if ( alignment == 'center-drawer' || w < 768) {
400
- $('.nav_first-menu-icon').parent().addClass('nav_first-menu-icon-close');
401
- $('.nav_second-menu-icon').parent().addClass('nav_second-menu-icon-close');
402
- }
403
- }).trigger('header_event');
404
- });
405
- {% endjavascript %}
406
-
407
- {% schema %}
408
- {
409
- "name": "header",
410
- "settings": [
411
- {
412
- "type": "header",
413
- "content": {
414
- "zh-CN": "菜单导航设置",
415
- "en-US": "Navigation"
416
- }
417
- },
418
- {
419
- "type": "link_list",
420
- "id": "menu_id",
421
- "label": {
422
- "zh-CN": "选择菜单",
423
- "en-US": "Select menu"
424
- },
425
- "default": {
426
- "id": "header",
427
- "type": "menu",
428
- "title": {
429
- "zh-CN": "顶部导航菜单",
430
- "en-US": "Main menu"
431
- }
432
- }
433
- },
434
- {
435
- "type": "header",
436
- "content": {
437
- "zh-CN": "公告栏",
438
- "en-US": "Announcement"
439
- }
440
- },
441
- {
442
- "type": "checkbox",
443
- "id": "is_announce_show",
444
- "label": {
445
- "en-US": "Show announcement",
446
- "zh-CN": "开启公告栏"
447
- },
448
- "default": true
449
- },
450
- {
451
- "type": "checkbox",
452
- "id": "is_announce_show_only_on_home",
453
- "label": {
454
- "en-US": "Home page only",
455
- "zh-CN": "仅首页显示公告栏"
456
- },
457
- "default": false
458
- },
459
- {
460
- "type": "text",
461
- "id": "announce_title",
462
- "placeholder": {
463
- "zh-CN": "输入文本内容",
464
- "en-US": "Input text"
465
- },
466
- "label": {
467
- "zh-CN": "公告栏文案",
468
- "en-US": "Announcement text"
469
- },
470
- "default": "We Offer Free Shipping Worldwide."
471
- },
472
- {
473
- "type": "url",
474
- "id": "announce_src",
475
- "label": {
476
- "zh-CN": "公告栏链接",
477
- "en-US": "Link"
478
- },
479
- "default": ""
480
- },
481
- {
482
- "type": "header",
483
- "content": {
484
- "zh-CN": "顶部logo与图标",
485
- "en-US": "Logo and icon"
486
- }
487
- },
488
- {
489
- "type": "image_picker",
490
- "id": "shop_logo",
491
- "label": {
492
- "zh-CN": "logo图片",
493
- "en-US": "Logo"
494
- },
495
- "info": {
496
- "zh-CN": "建议尺寸(宽*长):600x150px,减少左右边距留白",
497
- "en-US": "Recommended resolution (width * height): 600x150px, reduce the left and right blank margin"
498
- },
499
- "default": ""
500
- },
501
- {
502
- "type": "select",
503
- "label": {
504
- "zh-CN": "PC端logo位置",
505
- "en-US": "Desktop logo position"
506
- },
507
- "id": "alignment",
508
- "default": "center",
509
- "options": [
510
- {
511
- "value": "center",
512
- "label": {
513
- "zh-CN": "居中",
514
- "en-US": "Center"
515
- }
516
- },
517
- {
518
- "value": "center-left",
519
- "label": {
520
- "en-US": "Logo center, menu left",
521
- "zh-CN": "中间,菜单左边"
522
- }
523
- },
524
- {
525
- "value": "center-drawer",
526
- "label": {
527
- "en-US": "Logo center, menu drawer",
528
- "zh-CN": "中间,菜单收起"
529
- }
530
- },
531
- {
532
- "value": "left",
533
- "label": {
534
- "zh-CN": "居左,菜单换行",
535
- "en-US": "Left-align, menu newline"
536
- }
537
- },
538
- {
539
- "value": "left-inline",
540
- "label": {
541
- "zh-CN": "居左,菜单同行",
542
- "en-US": "Left-align, menu same line"
543
- }
544
- }
545
- ]
546
- },
547
- {
548
- "type": "select",
549
- "id": "cart_style",
550
- "label": {
551
- "zh-CN": "购物车形状",
552
- "en-US": "Cart icon"
553
- },
554
- "default": "cart",
555
- "options": [
556
- {
557
- "value": "cart",
558
- "label": {
559
- "en-US": "Cart",
560
- "zh-CN": "购物车"
561
- }
562
- },
563
- {
564
- "value": "bag",
565
- "label": {
566
- "zh-CN": "购物袋",
567
- "en-US": "Bag"
568
- }
569
- }
570
- ]
571
- },
572
- {
573
- "type": "checkbox",
574
- "id": "is_account_show",
575
- "label": {
576
- "zh-CN": "个人中心",
577
- "en-US": "User center"
578
- },
579
- "default": true
580
- },
581
- {
582
- "type": "checkbox",
583
- "id": "is_search_show",
584
- "label": {
585
- "en-US": "Search",
586
- "zh-CN": "搜索"
587
- },
588
- "default": true
589
- },
590
- {
591
- "type": "checkbox",
592
- "id": "is_header_fixed",
593
- "label": {
594
- "zh-CN": "固定悬浮导航栏",
595
- "en-US": "Enable sticky header"
596
- },
597
- "default": true
598
- },
599
- {
600
- "type": "header",
601
- "content": {
602
- "en-US": "Color settings",
603
- "zh-CN": "颜色设置"
604
- }
605
- },
606
- {
607
- "type": "color",
608
- "id": "announce_color",
609
- "label": {
610
- "zh-CN": "公告栏字体",
611
- "en-US": "Announcement font"
612
- },
613
- "default": "#FFFFFF"
614
- },
615
- {
616
- "type": "color",
617
- "id": "announce_bg_color",
618
- "label": {
619
- "zh-CN": "公告栏背景",
620
- "en-US": "Announcement"
621
- },
622
- "default": "#222F3E"
623
- },
624
- {
625
- "type": "color",
626
- "id": "menu_color",
627
- "label": {
628
- "zh-CN": "PC菜单栏字体",
629
- "en-US": "Desktop menu font"
630
- },
631
- "default": "#3D4246"
632
- },
633
- {
634
- "type": "color",
635
- "id": "menu_bg_color",
636
- "label": {
637
- "zh-CN": "PC菜单栏背景",
638
- "en-US": "Desktop menu background"
639
- },
640
- "default": "#FFFFFF"
641
- },
642
- {
643
- "type": "color",
644
- "id": "logo_color",
645
- "label": {
646
- "zh-CN": "logo栏字体",
647
- "en-US": "Logo font"
648
- },
649
- "default": "#000000"
650
- },
651
- {
652
- "type": "color",
653
- "id": "logo_icon_color",
654
- "label": {
655
- "zh-CN": "logo栏图标",
656
- "en-US": "Logo icon"
657
- },
658
- "default": "#3D4246"
659
- },
660
- {
661
- "type": "color",
662
- "id": "logo_bg_color",
663
- "label": {
664
- "zh-CN": "logo栏背景",
665
- "en-US": "Logo background"
666
- },
667
- "default": "#FFFFFF"
668
- },
669
- {
670
- "type": "header",
671
- "content": {
672
- "zh-CN": "菜单自定义内容",
673
- "en-US": "Mega menu"
674
- }
675
- },
676
- {
677
- "type": "paragraph",
678
- "content": {
679
- "zh-CN": "运营位仅在有三级菜单时生效",
680
- "en-US": "Only takes effect when there is a third directory"
681
- }
682
- }
683
- ],
684
- "max_blocks": 20,
685
- "blocks": [
686
- {
687
- "type": "ads",
688
- "name": {
689
- "zh-CN": "运营位",
690
- "en-US": "Mega menu"
691
- },
692
- "settings": [
693
- {
694
- "type": "text",
695
- "id": "menu",
696
- "label": {
697
- "en-US": "Mega menu trigger",
698
- "zh-CN": "触发的混合菜单"
699
- },
700
- "info": {
701
- "zh-CN": "名字需与一级菜单名字保持一致,不区分大小写",
702
- "en-US": "Menu item' must match the name of the first-level menu items. Case insensitive"
703
- },
704
- "default": "",
705
- "placeholder": "Input mega menu trigger"
706
- },
707
- {
708
- "type": "select",
709
- "label": {
710
- "zh-CN": "位置",
711
- "en-US": "Position 1"
712
- },
713
- "id": "position1",
714
- "default": "right",
715
- "options": [
716
- {
717
- "value": "left",
718
- "label": {
719
- "en-US": "Left",
720
- "zh-CN": "左边"
721
- }
722
- },
723
- {
724
- "value": "right",
725
- "label": {
726
- "en-US": "Right",
727
- "zh-CN": "右边"
728
- }
729
- }
730
- ]
731
- },
732
- {
733
- "type": "select",
734
- "label": {
735
- "zh-CN": "类型",
736
- "en-US": "Type 1"
737
- },
738
- "id": "type1",
739
- "default": "product",
740
- "options": [
741
- {
742
- "value": "custom",
743
- "label": {
744
- "en-US": "Custom content",
745
- "zh-CN": "自定义内容"
746
- }
747
- },
748
- {
749
- "value": "product",
750
- "label": {
751
- "en-US": "Product",
752
- "zh-CN": "商品"
753
- }
754
- }
755
- ]
756
- },
757
- {
758
- "type": "image_picker",
759
- "id": "image1",
760
- "visibleOn": "type1 == 'custom'",
761
- "label": {
762
- "zh-CN": "图片",
763
- "en-US": "Image"
764
- },
765
- "default": ""
766
- },
767
- {
768
- "type": "text",
769
- "id": "title1",
770
- "visibleOn": "type1 == 'custom'",
771
- "label": {
772
- "zh-CN": "标题",
773
- "en-US": "Heading"
774
- },
775
- "default": "",
776
- "placeholder": {
777
- "zh-CN": "输入标题",
778
- "en-US": "Input heading"
779
- }
780
- },
781
- {
782
- "type": "textarea",
783
- "id": "desc1",
784
- "visibleOn": "type1 == 'custom'",
785
- "label": {
786
- "en-US": "Description",
787
- "zh-CN": "描述"
788
- },
789
- "placeholder": {
790
- "zh-CN": "请输入描述",
791
- "en-US": "Input description"
792
- },
793
- "default": ""
794
- },
795
- {
796
- "type": "url",
797
- "id": "link1",
798
- "visibleOn": "type1 == 'custom'",
799
- "label": {
800
- "en-US": "Link",
801
- "zh-CN": "链接"
802
- },
803
- "default": ""
804
- },
805
- {
806
- "type": "product",
807
- "visibleOn": "type1 == 'product'",
808
- "id": "product1",
809
- "label": {
810
- "zh-CN": "商品",
811
- "en-US": "Product"
812
- }
813
- },
814
- {
815
- "type": "select",
816
- "label": {
817
- "zh-CN": "位置2",
818
- "en-US": "Position 2"
819
- },
820
- "id": "position2",
821
- "default": "right",
822
- "options": [
823
- {
824
- "value": "left",
825
- "label": {
826
- "en-US": "Left",
827
- "zh-CN": "左边"
828
- }
829
- },
830
- {
831
- "value": "right",
832
- "label": {
833
- "en-US": "Right",
834
- "zh-CN": "右边"
835
- }
836
- }
837
- ]
838
- },
839
- {
840
- "type": "select",
841
- "label": {
842
- "zh-CN": "类型2",
843
- "en-US": "Type 2"
844
- },
845
- "id": "type2",
846
- "default": "product",
847
- "options": [
848
- {
849
- "value": "custom",
850
- "label": {
851
- "en-US": "Custom content",
852
- "zh-CN": "自定义内容"
853
- }
854
- },
855
- {
856
- "value": "product",
857
- "label": {
858
- "en-US": "Product",
859
- "zh-CN": "商品"
860
- }
861
- }
862
- ]
863
- },
864
- {
865
- "type": "image_picker",
866
- "id": "image2",
867
- "visibleOn": "type2 == 'custom'",
868
- "label": {
869
- "zh-CN": "图片2",
870
- "en-US": "Image 2"
871
- },
872
- "default": ""
873
- },
874
- {
875
- "type": "text",
876
- "id": "title2",
877
- "visibleOn": "type2 == 'custom'",
878
- "label": {
879
- "zh-CN": "标题2",
880
- "en-US": "Title 2"
881
- },
882
- "default": "",
883
- "placeholder": {
884
- "zh-CN": "输入标题",
885
- "en-US": "Input heading"
886
- }
887
- },
888
- {
889
- "type": "textarea",
890
- "id": "desc2",
891
- "visibleOn": "type2 == 'custom'",
892
- "label": {
893
- "zh-CN": "描述2",
894
- "en-US": "Description 2"
895
- },
896
- "placeholder": {
897
- "zh-CN": "请输入描述",
898
- "en-US": "Input description"
899
- },
900
- "default": ""
901
- },
902
- {
903
- "type": "url",
904
- "id": "link2",
905
- "visibleOn": "type2 == 'custom'",
906
- "label": {
907
- "zh-CN": "链接2",
908
- "en-US": "Link 2"
909
- },
910
- "default": ""
911
- },
912
- {
913
- "type": "product",
914
- "visibleOn": "type2 == 'product'",
915
- "id": "product2",
916
- "label": {
917
- "zh-CN": "商品",
918
- "en-US": "Product"
919
- }
920
- },
921
- {
922
- "type": "select",
923
- "label": {
924
- "zh-CN": "位置3",
925
- "en-US": "Position 3"
926
- },
927
- "id": "position3",
928
- "default": "right",
929
- "options": [
930
- {
931
- "value": "left",
932
- "label": {
933
- "en-US": "Left",
934
- "zh-CN": "左边"
935
- }
936
- },
937
- {
938
- "value": "right",
939
- "label": {
940
- "en-US": "Right",
941
- "zh-CN": "右边"
942
- }
943
- }
944
- ]
945
- },
946
- {
947
- "type": "select",
948
- "label": {
949
- "zh-CN": "类型3",
950
- "en-US": "Type 3"
951
- },
952
- "id": "type3",
953
- "default": "product",
954
- "options": [
955
- {
956
- "value": "custom",
957
- "label": {
958
- "en-US": "Custom content",
959
- "zh-CN": "自定义内容"
960
- }
961
- },
962
- {
963
- "value": "product",
964
- "label": {
965
- "en-US": "Product",
966
- "zh-CN": "商品"
967
- }
968
- }
969
- ]
970
- },
971
- {
972
- "type": "image_picker",
973
- "id": "image3",
974
- "visibleOn": "type3 == 'custom'",
975
- "label": {
976
- "zh-CN": "图片3",
977
- "en-US": "Image 3"
978
- },
979
- "default": ""
980
- },
981
- {
982
- "type": "text",
983
- "id": "title3",
984
- "visibleOn": "type3 == 'custom'",
985
- "label": {
986
- "zh-CN": "标题3",
987
- "en-US": "Title 3"
988
- },
989
- "default": "",
990
- "placeholder": {
991
- "zh-CN": "输入标题",
992
- "en-US": "Input heading"
993
- }
994
- },
995
- {
996
- "type": "textarea",
997
- "id": "desc3",
998
- "visibleOn": "type3 == 'custom'",
999
- "label": {
1000
- "zh-CN": "描述3",
1001
- "en-US": "Description 3"
1002
- },
1003
- "placeholder": {
1004
- "zh-CN": "请输入描述",
1005
- "en-US": "Input description"
1006
- },
1007
- "default": ""
1008
- },
1009
- {
1010
- "type": "url",
1011
- "id": "link3",
1012
- "visibleOn": "type3 == 'custom'",
1013
- "label": {
1014
- "zh-CN": "链接3",
1015
- "en-US": "Link 3"
1016
- },
1017
- "default": ""
1018
- },
1019
- {
1020
- "type": "product",
1021
- "visibleOn": "type3 == 'product'",
1022
- "id": "product3",
1023
- "label": {
1024
- "zh-CN": "商品",
1025
- "en-US": "Product"
1026
- }
1027
- }
1028
- ]
1029
- },
1030
- {
1031
- "type": "info",
1032
- "name": {
1033
- "en-US": "Label",
1034
- "zh-CN": "气泡文案"
1035
- },
1036
- "settings": [
1037
- {
1038
- "type": "text",
1039
- "id": "menu_trigger",
1040
- "label": {
1041
- "zh-CN": "触发菜单",
1042
- "en-US": "Mega menu name"
1043
- },
1044
- "info": {
1045
- "zh-CN": "名字需与菜单名字保持一致,不区分大小写",
1046
- "en-US": "Menu item' must match the name of the first-level menu items. Case insensitive"
1047
- },
1048
- "default": "",
1049
- "placeholder": "Input menu name"
1050
- },
1051
- {
1052
- "type": "text",
1053
- "id": "menu_label_text",
1054
- "label": {
1055
- "en-US": "Label",
1056
- "zh-CN": "气泡文案"
1057
- },
1058
- "info": {
1059
- "zh-CN": "最大支持输入12个字符",
1060
- "en-US": "Support up to 12 characters"
1061
- },
1062
- "props": {
1063
- "maxLength": "12"
1064
- },
1065
- "default": "HOT",
1066
- "placeholder": "Input label"
1067
- },
1068
- {
1069
- "type": "color",
1070
- "id": "label_bg",
1071
- "label": {
1072
- "en-US": "Background color",
1073
- "zh-CN": "背景颜色"
1074
- },
1075
- "default": "#E62405"
1076
- },
1077
- {
1078
- "type": "color",
1079
- "id": "label_text",
1080
- "label": {
1081
- "en-US": "Text color",
1082
- "zh-CN": "文字颜色"
1083
- },
1084
- "default": "#ffffff"
1085
- }
1086
- ]
1087
- }
1088
- ],
1089
- "presets": [
1090
- {
1091
- "name": "header",
1092
- "cname": {
1093
- "en-US": "Navigation",
1094
- "zh-CN": "导航"
1095
- },
1096
- "category": {
1097
- "en-US": "Navigation",
1098
- "zh-CN": "导航"
1099
- },
1100
- "ccategory": {
1101
- "en-US": "Navigation",
1102
- "zh-CN": "导航"
1103
- },
1104
- "display": false,
1105
- "blocks": []
1106
- }
1107
- ]
1108
- }
1109
- {% endschema %}
1110
- <style>
1111
- :root {
1112
- --menu-color: {{section.settings.menu_color}};
1113
- }
1114
- @media (max-width: 768px) {
1115
- [data-section-id="header"] .navigation-pc__third-menu-blocks {
1116
- width: 100%!important;
1117
- }
1118
- }
1119
- {% if section.settings.alignment == 'center-drawer' %}
1120
- @media (min-width: 767.98px) {
1121
- [data-section-id="header"] .navigation-pc__third-menu-blocks .navigation-pc__third-menu-items {
1122
- padding-left: 15px;
1123
- }
1124
- [data-section-id="header"] .navigation-pc__third-menu-blocks {
1125
- width: 100%!important;
1126
- }
1127
- }
1128
- {% else %}
1129
- @media (min-width: 767.98px) {
1130
- [data-section-id="header"] .navigation-hidden-data,
1131
- [data-section-id="header"] .navigation-pc__third-menu-blocks i{
1132
- display: none!important;
1133
- }
1134
-
1135
- [data-section-id="header"] .navigation-pc__third-menu-blocks .navigation-pc__menu-item{
1136
- font-weight: bold;
1137
- }
1138
- {% comment %} [data-section-id="header"] .navigation-pc__third-menu-blocks .navigation-pc__third-menu-item{
1139
- opacity: 0.65;
1140
- } {% endcomment %}
1141
-
1142
- [data-section-id="header"] .menus_container_inner {
1143
- {% comment %} max-height: 656px; {% endcomment %}
1144
- {% comment %} overflow: scroll; {% endcomment %}
1145
- {% comment %} overflow: -moz-scrollbars-none; {% endcomment %}
1146
- -ms-overflow-style: none;
1147
- }
1148
- [data-section-id="header"] .menus_container_inner::-webkit-scrollbar {
1149
- width: 0 !important;
1150
- }
1151
-
1152
- [data-section-id="header"] .menus_container_inner .nav_wrap_menus {
1153
- margin-right: auto;
1154
- }
1155
- }
1156
- {% endif %}
1157
- </style>