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.
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +206 -332
- package/README.zh.md +318 -0
- package/package.json +24 -70
- package/scripts/install.js +144 -0
- package/scripts/jsbuild/dev/index.js +123 -0
- package/scripts/jsbuild/index.js +77 -0
- package/{lib/checkout/build → scripts/jsbuild}/plugin/vite-plugin-add-extension-id.js +4 -2
- package/scripts/jsbuild/vite.config.js +35 -0
- package/scripts/run.js +29 -0
- package/.editorconfig +0 -28
- package/.prettierrc +0 -9
- package/bin/shoplazza +0 -137
- package/fixtures/assets/blog.scss +0 -74
- package/fixtures/assets/cart_modal.scss +0 -450
- package/fixtures/assets/collection_detail.js +0 -234
- package/fixtures/assets/collection_detail.scss +0 -345
- package/fixtures/assets/collection_list.scss +0 -11
- package/fixtures/assets/collection_slider.scss +0 -169
- package/fixtures/assets/feature_columns.scss +0 -26
- package/fixtures/assets/feature_product.scss +0 -109
- package/fixtures/assets/footer.js +0 -58
- package/fixtures/assets/footer.scss +0 -337
- package/fixtures/assets/four_images.scss +0 -29
- package/fixtures/assets/gallery.scss +0 -55
- package/fixtures/assets/header.js +0 -178
- package/fixtures/assets/header.scss +0 -929
- package/fixtures/assets/image_text.scss +0 -72
- package/fixtures/assets/logo_bar.scss +0 -11
- package/fixtures/assets/newsletter.scss +0 -90
- package/fixtures/assets/not_found.scss +0 -39
- package/fixtures/assets/page_detail.scss +0 -16
- package/fixtures/assets/pagination.scss +0 -150
- package/fixtures/assets/postcss.config.js +0 -6
- package/fixtures/assets/product_description.scss +0 -88
- package/fixtures/assets/product_detail.js +0 -634
- package/fixtures/assets/product_detail.scss +0 -1106
- package/fixtures/assets/relative_product.scss +0 -45
- package/fixtures/assets/reviews.scss +0 -70
- package/fixtures/assets/rich_text.scss +0 -71
- package/fixtures/assets/search.js +0 -87
- package/fixtures/assets/search.scss +0 -67
- package/fixtures/assets/slide.scss +0 -51
- package/fixtures/assets/slider.scss +0 -141
- package/fixtures/assets/test.scss +0 -1
- package/fixtures/assets/theme.css +0 -976
- package/fixtures/assets/theme.scss +0 -1100
- package/fixtures/assets/three_images.scss +0 -20
- package/fixtures/assets/tools.scss +0 -23
- package/fixtures/assets/two_images.scss +0 -24
- package/fixtures/assets/video.scss +0 -45
- package/fixtures/assets/video_text.scss +0 -63
- package/fixtures/config/settings_data.json +0 -107
- package/fixtures/config/settings_schema.json +0 -690
- package/fixtures/layout/theme.liquid +0 -76
- package/fixtures/locales/ar-SA.json +0 -212
- package/fixtures/locales/de-DE.json +0 -290
- package/fixtures/locales/en-US.json +0 -290
- package/fixtures/locales/es-ES.json +0 -290
- package/fixtures/locales/fr-FR.json +0 -290
- package/fixtures/locales/id-ID.json +0 -212
- package/fixtures/locales/it-IT.json +0 -212
- package/fixtures/locales/ja-JP.json +0 -289
- package/fixtures/locales/ko-KR.json +0 -290
- package/fixtures/locales/nl-NL.json +0 -290
- package/fixtures/locales/pl-PL.json +0 -290
- package/fixtures/locales/pt-PT.json +0 -212
- package/fixtures/locales/ru-RU.json +0 -212
- package/fixtures/locales/th-TH.json +0 -212
- package/fixtures/locales/zh-CN.json +0 -290
- package/fixtures/locales/zh-TW.json +0 -290
- package/fixtures/sections/apps.liquid +0 -47
- package/fixtures/sections/blog.liquid +0 -137
- package/fixtures/sections/collection_desc.liquid +0 -34
- package/fixtures/sections/collection_detail.liquid +0 -436
- package/fixtures/sections/collection_image.liquid +0 -104
- package/fixtures/sections/collection_list.liquid +0 -161
- package/fixtures/sections/collection_name.liquid +0 -34
- package/fixtures/sections/collection_slider.liquid +0 -330
- package/fixtures/sections/feature_columns.liquid +0 -275
- package/fixtures/sections/feature_product.liquid +0 -227
- package/fixtures/sections/footer.liquid +0 -488
- package/fixtures/sections/four_images.liquid +0 -160
- package/fixtures/sections/gallery.liquid +0 -258
- package/fixtures/sections/header.liquid +0 -1157
- package/fixtures/sections/html.liquid +0 -40
- package/fixtures/sections/image_text.liquid +0 -350
- package/fixtures/sections/instagram_plus.liquid +0 -393
- package/fixtures/sections/logo_bar.liquid +0 -183
- package/fixtures/sections/newsletter.liquid +0 -225
- package/fixtures/sections/not_found.liquid +0 -39
- package/fixtures/sections/overlay_image.liquid +0 -648
- package/fixtures/sections/page_detail.liquid +0 -39
- package/fixtures/sections/photo_collection.liquid +0 -433
- package/fixtures/sections/product_description.liquid +0 -208
- package/fixtures/sections/product_detail.liquid +0 -611
- package/fixtures/sections/products.liquid +0 -216
- package/fixtures/sections/relative_product.liquid +0 -121
- package/fixtures/sections/reviews.liquid +0 -115
- package/fixtures/sections/rich_text.liquid +0 -157
- package/fixtures/sections/search.liquid +0 -163
- package/fixtures/sections/slide.liquid +0 -719
- package/fixtures/sections/three_images.liquid +0 -157
- package/fixtures/sections/two_images.liquid +0 -125
- package/fixtures/sections/video.liquid +0 -95
- package/fixtures/sections/video_text.liquid +0 -128
- package/fixtures/snippets/bgset.liquid +0 -21
- package/fixtures/snippets/card_title.liquid +0 -8
- package/fixtures/snippets/cart_modal.liquid +0 -74
- package/fixtures/snippets/collection.liquid +0 -77
- package/fixtures/snippets/collection_filter_modal.liquid +0 -56
- package/fixtures/snippets/default_image_4.liquid +0 -14
- package/fixtures/snippets/default_image_6.liquid +0 -18
- package/fixtures/snippets/default_image_8.liquid +0 -23
- package/fixtures/snippets/four_images_item.liquid +0 -8
- package/fixtures/snippets/header_ads.liquid +0 -95
- package/fixtures/snippets/hero_image.liquid +0 -94
- package/fixtures/snippets/icon_video_play_large.liquid +0 -1
- package/fixtures/snippets/icon_video_play_medium.liquid +0 -4
- package/fixtures/snippets/icon_video_play_small.liquid +0 -4
- package/fixtures/snippets/lazyimg.liquid +0 -22
- package/fixtures/snippets/lazyimg_art.liquid +0 -36
- package/fixtures/snippets/lazysizes.liquid +0 -41
- package/fixtures/snippets/link.liquid +0 -2
- package/fixtures/snippets/pagination.liquid +0 -48
- package/fixtures/snippets/product.liquid +0 -126
- package/fixtures/snippets/product_art_tpl.liquid +0 -152
- package/fixtures/snippets/product_info_body.liquid +0 -337
- package/fixtures/snippets/product_info_tpl.liquid +0 -423
- package/fixtures/snippets/product_label.liquid +0 -46
- package/fixtures/snippets/settings.liquid +0 -295
- package/fixtures/snippets/social-meta-tags.liquid +0 -106
- package/fixtures/snippets/video_html.liquid +0 -11
- package/fixtures/snippets/video_source.liquid +0 -98
- package/fixtures/snippets/video_thumb_icon.liquid +0 -2
- package/fixtures/templates/404.liquid +0 -1
- package/fixtures/templates/collection.liquid +0 -92
- package/fixtures/templates/index.liquid +0 -206
- package/fixtures/templates/page.liquid +0 -1
- package/fixtures/templates/product.liquid +0 -99
- package/fixtures/templates/search.liquid +0 -1
- package/jest.config.js +0 -192
- package/lib/__tests__/log.test.js +0 -15
- package/lib/__tests__/utils.test.js +0 -69
- package/lib/app/api/cli.js +0 -225
- package/lib/app/api/openapi.js +0 -121
- package/lib/app/api/partnerOpenapi.js +0 -104
- package/lib/app/bin/index.js +0 -20
- package/lib/app/bin/javy/javy-arm-linux-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-arm-macos-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
- package/lib/app/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
- package/lib/app/commands/config/actions/link.js +0 -189
- package/lib/app/commands/config/actions/use.js +0 -40
- package/lib/app/commands/config/index.js +0 -25
- package/lib/app/commands/config/link.js +0 -11
- package/lib/app/commands/config/use.js +0 -11
- package/lib/app/commands/deploy/actions/deploy.js +0 -196
- package/lib/app/commands/deploy/index.js +0 -11
- package/lib/app/commands/dev/actions/dev.js +0 -206
- package/lib/app/commands/dev/index.js +0 -11
- package/lib/app/commands/generate/actions/extension.js +0 -97
- package/lib/app/commands/generate/actions/generateCheckout.js +0 -58
- package/lib/app/commands/generate/actions/generateFunction.js +0 -56
- package/lib/app/commands/generate/actions/generateTheme.js +0 -128
- package/lib/app/commands/generate/extension.js +0 -11
- package/lib/app/commands/generate/index.js +0 -22
- package/lib/app/commands/index.js +0 -82
- package/lib/app/commands/info/actions/info.js +0 -168
- package/lib/app/commands/info/index.js +0 -11
- package/lib/app/commands/init/actions/init.js +0 -176
- package/lib/app/commands/init/index.js +0 -14
- package/lib/app/commands/versions/actions/list.js +0 -210
- package/lib/app/commands/versions/index.js +0 -22
- package/lib/app/commands/versions/list.js +0 -14
- package/lib/app/constant/code.js +0 -7
- package/lib/app/constant/color.js +0 -18
- package/lib/app/constant/extension.js +0 -16
- package/lib/app/constant/host.js +0 -23
- package/lib/app/constant/sso.js +0 -7
- package/lib/app/index.js +0 -8
- package/lib/app/services/auth/config.js +0 -33
- package/lib/app/services/auth/index.js +0 -9
- package/lib/app/services/auth/oauth-server.js +0 -70
- package/lib/app/services/auth/partner-token.js +0 -45
- package/lib/app/services/auth/sso-token.js +0 -69
- package/lib/app/services/auth/store-token.js +0 -100
- package/lib/app/services/auth/url-builder.js +0 -23
- package/lib/app/services/config/index.js +0 -41
- package/lib/app/services/devServer/app.js +0 -76
- package/lib/app/services/devServer/index.js +0 -103
- package/lib/app/services/devServer/middleware/hmacValidatorMiddleWare.js +0 -20
- package/lib/app/services/devServer/middleware/index.js +0 -5
- package/lib/app/services/devServer/tunnel/index.js +0 -43
- package/lib/app/services/devServer/tunnel/providers/cloudflare.js +0 -364
- package/lib/app/services/devServer/tunnel/providers/ngrok.js +0 -70
- package/lib/app/services/devServer/utils/index.js +0 -5
- package/lib/app/services/devServer/utils/secureCompare.js +0 -5
- package/lib/app/services/devServer/views/app.ejs +0 -133
- package/lib/app/services/extension-build/buildCheckout.js +0 -47
- package/lib/app/services/extension-build/buildFunction.js +0 -57
- package/lib/app/services/extension-build/buildTheme.js +0 -100
- package/lib/app/services/extension-build/index.js +0 -23
- package/lib/app/services/extension-build/plugins/vite-plugin-add-extension-id.js +0 -26
- package/lib/app/services/extension-diff/index.js +0 -132
- package/lib/app/services/extension-upsert/index.js +0 -21
- package/lib/app/services/extension-upsert/upsertCheckout.js +0 -44
- package/lib/app/services/extension-upsert/upsertFunction.js +0 -52
- package/lib/app/services/extension-upsert/upsertTheme.js +0 -113
- package/lib/app/services/oss/index.js +0 -45
- package/lib/app/services/partner/index.js +0 -52
- package/lib/app/store/base-store.js +0 -37
- package/lib/app/store/config-store.js +0 -55
- package/lib/app/store/config.js +0 -21
- package/lib/app/store/index.js +0 -14
- package/lib/app/store/install-store.js +0 -41
- package/lib/app/store/sso-store.js +0 -55
- package/lib/app/utils/asyncPool.js +0 -42
- package/lib/app/utils/debug/index.js +0 -16
- package/lib/app/utils/env.js +0 -24
- package/lib/app/utils/error.js +0 -20
- package/lib/app/utils/git.js +0 -20
- package/lib/app/utils/json.js +0 -27
- package/lib/app/utils/path.js +0 -33
- package/lib/app/utils/platform.js +0 -37
- package/lib/app/utils/request/cli.js +0 -72
- package/lib/app/utils/request/debug.js +0 -13
- package/lib/app/utils/request/openapi.js +0 -67
- package/lib/app/utils/request/partnerOpenapi.js +0 -47
- package/lib/app/utils/toml.js +0 -56
- package/lib/app/utils/views/message.js +0 -68
- package/lib/app/utils/views/select.js +0 -36
- package/lib/app/utils/withTempDir.js +0 -55
- package/lib/auth/__mocks__/getCode.js +0 -7
- package/lib/auth/__mocks__/index.js +0 -0
- package/lib/auth/child.js +0 -23
- package/lib/auth/getCode.js +0 -39
- package/lib/auth/index.js +0 -134
- package/lib/check.js +0 -28
- package/lib/checkout/api.js +0 -164
- package/lib/checkout/build/plugin/vite-plugin-transform-extension-html.js +0 -207
- package/lib/checkout/build/vite.config.js +0 -34
- package/lib/checkout/build.js +0 -38
- package/lib/checkout/config.js +0 -97
- package/lib/checkout/create.js +0 -132
- package/lib/checkout/delete.js +0 -26
- package/lib/checkout/deploy.js +0 -59
- package/lib/checkout/dev/index.js +0 -143
- package/lib/checkout/fields.js +0 -29
- package/lib/checkout/index.js +0 -63
- package/lib/checkout/preview.js +0 -52
- package/lib/checkout/pull.js +0 -22
- package/lib/checkout/push.js +0 -141
- package/lib/checkout/template/README.md +0 -34
- package/lib/checkout/template/_gitignore +0 -4
- package/lib/checkout/template/extension.config.js +0 -4
- package/lib/checkout/template/extensions/extension-template/extension.json +0 -10
- package/lib/checkout/template/extensions/extension-template/src/content.html +0 -3
- package/lib/checkout/template/extensions/extension-template/src/index.html +0 -5
- package/lib/checkout/template/extensions/extension-template/src/index.js +0 -11
- package/lib/checkout/template/extensions/extension-template/src/script.html +0 -3
- package/lib/checkout/template/extensions/extension-template/src/style.html +0 -3
- package/lib/checkout/template/package.json +0 -17
- package/lib/checkout/undeploy.js +0 -40
- package/lib/checkout/util.js +0 -201
- package/lib/checkout/verify.js +0 -16
- package/lib/checkout/version.js +0 -7
- package/lib/commands/__tests__/login.test.js +0 -77
- package/lib/commands/__tests__/logout.test.js +0 -29
- package/lib/commands/__tests__/store.test.js +0 -44
- package/lib/commands/__tests__/switch.test.js +0 -45
- package/lib/commands/login.js +0 -120
- package/lib/commands/logout.js +0 -23
- package/lib/commands/store.js +0 -14
- package/lib/commands/switch.js +0 -52
- package/lib/commands/theme/__tests__/delete.test.js +0 -49
- package/lib/commands/theme/__tests__/init.test.js +0 -21
- package/lib/commands/theme/__tests__/list.test.js +0 -80
- package/lib/commands/theme/__tests__/package.test.js +0 -17
- package/lib/commands/theme/__tests__/publish.test.js +0 -61
- package/lib/commands/theme/__tests__/pull.test.js +0 -69
- package/lib/commands/theme/__tests__/push.test.js +0 -63
- package/lib/commands/theme/__tests__/serve.test.js +0 -107
- package/lib/commands/theme/delete.js +0 -64
- package/lib/commands/theme/init.js +0 -51
- package/lib/commands/theme/list.js +0 -28
- package/lib/commands/theme/package.js +0 -37
- package/lib/commands/theme/publish.js +0 -56
- package/lib/commands/theme/pull.js +0 -62
- package/lib/commands/theme/push.js +0 -106
- package/lib/commands/theme/serve.js +0 -153
- package/lib/commands/theme/share.js +0 -20
- package/lib/commands/version.js +0 -6
- package/lib/common/constants.js +0 -24
- package/lib/common/db/partner.js +0 -91
- package/lib/common/inquirers/choose-app.js +0 -79
- package/lib/common/inquirers/choose-partner.js +0 -74
- package/lib/common/log.js +0 -15
- package/lib/common/login.js +0 -125
- package/lib/common/logout.js +0 -16
- package/lib/db/__mocks__/index.js +0 -9
- package/lib/db/__tests__/analytics.test.js +0 -19
- package/lib/db/__tests__/user.test.js +0 -20
- package/lib/db/analytics.js +0 -48
- package/lib/db/index.js +0 -9
- package/lib/db/user.js +0 -71
- package/lib/function/bin/index.js +0 -20
- package/lib/function/bin/javy/javy-arm-linux-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-arm-macos-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
- package/lib/function/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
- package/lib/function/commands/compile.js +0 -43
- package/lib/function/commands/create.js +0 -77
- package/lib/function/commands/list.js +0 -18
- package/lib/function/commands/release.js +0 -69
- package/lib/function/index.js +0 -24
- package/lib/function/template/js/README.md +0 -37
- package/lib/function/template/js/_gitignore +0 -4
- package/lib/function/template/js/extension.config.json +0 -5
- package/lib/function/template/js/package.json +0 -17
- package/lib/function/template/js/src/index.js +0 -64
- package/lib/function/utils.js +0 -29
- package/lib/log.js +0 -13
- package/lib/openAPI/__mocks__/index.js +0 -20
- package/lib/openAPI/api.js +0 -76
- package/lib/openAPI/index.js +0 -56
- package/lib/oss.js +0 -102
- package/lib/partner-api/axios.js +0 -67
- package/lib/partner-api/index.js +0 -79
- package/lib/report.js +0 -37
- package/lib/theme-extension/api/index.js +0 -96
- package/lib/theme-extension/commands/build.js +0 -114
- package/lib/theme-extension/commands/connect.js +0 -73
- package/lib/theme-extension/commands/create.js +0 -105
- package/lib/theme-extension/commands/deploy.js +0 -56
- package/lib/theme-extension/commands/list.js +0 -35
- package/lib/theme-extension/commands/release.js +0 -59
- package/lib/theme-extension/commands/serve.js +0 -179
- package/lib/theme-extension/commands/versions.js +0 -55
- package/lib/theme-extension/index.js +0 -29
- package/lib/theme-extension/template/basic-app/README.md +0 -125
- package/lib/theme-extension/template/basic-app/extension.config.json +0 -4
- package/lib/theme-extension/template/basic-app/package.json +0 -18
- package/lib/theme-extension/template/basic-app/theme-app/assets/index.css +0 -4
- package/lib/theme-extension/template/basic-app/theme-app/assets-manifest.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/blocks/index.liquid +0 -16
- package/lib/theme-extension/template/basic-app/theme-app/locales/ar-SA.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/de-DE.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/en-US.json +0 -6
- package/lib/theme-extension/template/basic-app/theme-app/locales/es-ES.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/fr-FR.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/id-ID.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/it-IT.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ja-JP.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ko-KR.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/nl-NL.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/pl-PL.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/pt-PT.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/ru-RU.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/th-TH.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/locales/zh-CN.json +0 -6
- package/lib/theme-extension/template/basic-app/theme-app/locales/zh-TW.json +0 -1
- package/lib/theme-extension/template/basic-app/theme-app/snippets/index.liquid +0 -8
- package/lib/theme-extension/template/embed-app/README.md +0 -125
- package/lib/theme-extension/template/embed-app/extension.config.json +0 -4
- package/lib/theme-extension/template/embed-app/package.json +0 -18
- package/lib/theme-extension/template/embed-app/theme-app/assets-manifest.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/blocks/index.liquid +0 -18
- package/lib/theme-extension/template/embed-app/theme-app/locales/ar-SA.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/de-DE.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/en-US.json +0 -6
- package/lib/theme-extension/template/embed-app/theme-app/locales/es-ES.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/fr-FR.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/id-ID.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/it-IT.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ja-JP.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ko-KR.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/nl-NL.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/pl-PL.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/pt-PT.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/ru-RU.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/th-TH.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/locales/zh-CN.json +0 -6
- package/lib/theme-extension/template/embed-app/theme-app/locales/zh-TW.json +0 -1
- package/lib/theme-extension/template/embed-app/theme-app/snippets/index.liquid +0 -8
- package/lib/theme-extension/template/embed-app/theme-app/snippets/index_css.liquid +0 -6
- package/lib/theme-extension/utils/config.js +0 -32
- package/lib/theme-extension/utils/index.js +0 -213
- package/lib/tracing.js +0 -50
- package/lib/utils/config.js +0 -12
- package/lib/utils/console.js +0 -33
- package/lib/utils/env.js +0 -17
- package/lib/utils/file.js +0 -48
- package/lib/utils/platform.js +0 -37
- package/lib/utils/utils.js +0 -165
- /package/{lib/checkout → scripts/jsbuild}/dev/client.js +0 -0
- /package/{lib/app/services/extension-build/plugins → scripts/jsbuild/plugin}/vite-plugin-transform-extension-html.js +0 -0
|
@@ -1,719 +0,0 @@
|
|
|
1
|
-
{% use 'slide.css' %}
|
|
2
|
-
{% assign text = section.settings.text %}
|
|
3
|
-
{% assign text_color=section.settings.text_color %}
|
|
4
|
-
{% comment %} 高度转换 {% endcomment %}
|
|
5
|
-
{% if section.settings.img_height == "large" %}
|
|
6
|
-
{% assign mobile_height = "460px" %}
|
|
7
|
-
{% assign pc_height = "600px" %}
|
|
8
|
-
{% elsif section.settings.img_height == "medium" %}
|
|
9
|
-
{% assign mobile_height = "325px" %}
|
|
10
|
-
{% assign pc_height = "450px" %}
|
|
11
|
-
{% elsif section.settings.img_height == "small" %}
|
|
12
|
-
{% assign mobile_height = "200px" %}
|
|
13
|
-
{% assign pc_height = "300px" %}
|
|
14
|
-
{% elsif section.settings.img_height == "x-small" %}
|
|
15
|
-
{% assign mobile_height = "150px" %}
|
|
16
|
-
{% assign pc_height = "200px" %}
|
|
17
|
-
{% elsif section.settings.img_height == "normal" %}
|
|
18
|
-
{% assign mobile_height = "normal" %}
|
|
19
|
-
{% assign pc_height = "normal" %}
|
|
20
|
-
{% else %}
|
|
21
|
-
{% comment %} 默认值兼容旧数据 {% endcomment %}
|
|
22
|
-
{% assign mobile_height = "325px" %}
|
|
23
|
-
{% assign pc_height = "450px" %}
|
|
24
|
-
{% endif %}
|
|
25
|
-
{% if section.settings.img_height != "normal" %}
|
|
26
|
-
{% assign type = "static" %}
|
|
27
|
-
{% else %}
|
|
28
|
-
{% assign type = "cover" %}
|
|
29
|
-
{% endif %}
|
|
30
|
-
|
|
31
|
-
{% if type == "cover" %}
|
|
32
|
-
{% assign pc_height = "100%" %}
|
|
33
|
-
{% assign mobile_height = "100%" %}
|
|
34
|
-
{% endif %}
|
|
35
|
-
|
|
36
|
-
{% assign full_width = section.settings.is_full_width %}
|
|
37
|
-
|
|
38
|
-
<div id="slider{{section.id}}" class="style_{{section.settings.style}} {% if full_width != true and full_width != nil %}container{% else %}slide__bottom-margin{% endif %}">
|
|
39
|
-
{% if full_width != true and full_width != nil %}<div class="d-block row mb-padding slide__bottom-margin">{% endif %}
|
|
40
|
-
{% if section.blocks.size == 0 %}
|
|
41
|
-
{% assign blocks = '1,2,3' | split: ',' %}
|
|
42
|
-
{% else %}
|
|
43
|
-
{% assign blocks = section.blocks %}
|
|
44
|
-
{% endif %}
|
|
45
|
-
|
|
46
|
-
{% for block in blocks %}
|
|
47
|
-
{% assign url = block.settings.url.url %}
|
|
48
|
-
{% assign title = block.settings.title %}
|
|
49
|
-
{% assign sub_title = block.settings.sub_title %}
|
|
50
|
-
{% assign link_type = block.settings.url.type %}
|
|
51
|
-
{% assign text_size = section.settings.text_size %}
|
|
52
|
-
{% assign alignment = block.settings.alignment %}
|
|
53
|
-
{% assign button_label = block.settings.button_label %}
|
|
54
|
-
{% assign button_link = block.settings.button_link.url %}
|
|
55
|
-
{% assign button_link_type = block.settings.button_link.type %}
|
|
56
|
-
{% assign button_text_color = block.settings.button_text_color %}
|
|
57
|
-
{% assign button_bg_color = block.settings.button_bg_color %}
|
|
58
|
-
{% assign text_color = block.settings.text_color %}
|
|
59
|
-
{% assign text_position = block.settings.text_position %}
|
|
60
|
-
{% assign opacity = block.settings.opacity %}
|
|
61
|
-
{% assign image_src = block.settings.src %}
|
|
62
|
-
{% assign mobile_image_src = block.settings.mobile_src | default: block.settings.src %}
|
|
63
|
-
{% assign defaultImg = 'oss/operation/bbb5b6c710007fbaa2ad1adc6800ee6c.png' %}
|
|
64
|
-
|
|
65
|
-
{% if section.blocks.size == 0 %}
|
|
66
|
-
{% assign alignment = "center" %}
|
|
67
|
-
{% assign opacity = 25 %}
|
|
68
|
-
{% assign title = "Image Slide" %}
|
|
69
|
-
{% assign sub_title = "Tell your brand's story through images" %}
|
|
70
|
-
{% assign url = "" %}
|
|
71
|
-
{% assign button_link = "" %}
|
|
72
|
-
{% assign button_label = "" %}
|
|
73
|
-
{% assign text_position = nil %}
|
|
74
|
-
{% assign image_src = blank %}
|
|
75
|
-
{% endif %}
|
|
76
|
-
|
|
77
|
-
{% if image_src == blank %}
|
|
78
|
-
{% assign image_src = defaultImg %}
|
|
79
|
-
{% endif %}
|
|
80
|
-
{% if mobile_image_src == blank %}
|
|
81
|
-
{% assign mobile_image_src = defaultImg %}
|
|
82
|
-
{% endif %}
|
|
83
|
-
<div {% if type == "cover" %}style="height: 100%;"{% endif %} class="hero hero--{{block.id}} {% if url %}url-cursor{% endif %}">
|
|
84
|
-
<a
|
|
85
|
-
{% if url %}href="{{url}}"{% endif %}
|
|
86
|
-
{% if link_type == "web" %}target="_blank"{% endif %}
|
|
87
|
-
class="slide__img-wrapper slide__img-wrapper-{{forloop.index0}} position-relative d-flex m-auto w-100 justify-content-center"
|
|
88
|
-
>
|
|
89
|
-
<img
|
|
90
|
-
class="slide__img h-100 {% unless forloop.index0 == 0 %}lazy-{% endunless %}lazyload position-absolute {% if height == '100%' %} slide__img_auto {% endif %}"
|
|
91
|
-
src="{{shop.default_img}}"
|
|
92
|
-
data-srcs="{{mobile_image_src | img_url: '{width}x' }},{{image_src | img_url: '{width}x' }}"
|
|
93
|
-
|
|
94
|
-
data-sizes="auto"
|
|
95
|
-
style="object-position: center {{alignment}};"
|
|
96
|
-
alt="{{images[image_src].alt | escape}}"
|
|
97
|
-
/>
|
|
98
|
-
{% comment %} 灰色萌层以及文案 {% endcomment %}
|
|
99
|
-
{% if title or sub_title or button_link %}
|
|
100
|
-
<div class="hero__inner w-100 m-auto" style="background: rgba(0, 0, 0, {{ opacity | divided_by: 100.0 }})"></div>
|
|
101
|
-
{% endif %}
|
|
102
|
-
</a>
|
|
103
|
-
{% if title or sub_title or button_link %}
|
|
104
|
-
<div class="banner_content flex_{%if text_position != blank%}{{text_position}}{%else%}center{%endif%}">
|
|
105
|
-
<div class="page-width gap_{{text_size}}">
|
|
106
|
-
<div
|
|
107
|
-
{%if url%}
|
|
108
|
-
{% if link_type == 'web' %}
|
|
109
|
-
onclick="window.open('{{ url }}')"
|
|
110
|
-
{% else %}
|
|
111
|
-
onclick="location.href = '{{ url }}';"
|
|
112
|
-
{% endif %}
|
|
113
|
-
{%endif%}
|
|
114
|
-
>
|
|
115
|
-
{% if title != blank %}
|
|
116
|
-
<h2 class="mega-title mega-title-{{text_size}}" {%if text_color!=blank%}style="color:{{text_color}};"{%endif%}>{{ title | escape }}</h2>
|
|
117
|
-
{% endif %}
|
|
118
|
-
{% if sub_title != blank %}
|
|
119
|
-
<div class="mega-subtitle mega-subtitle-{{text_size}}" {%if text_color!=blank%}style="color:{{text_color}};"{%endif%}>{{ sub_title }}</div>
|
|
120
|
-
{% endif %}
|
|
121
|
-
</div>
|
|
122
|
-
{% if button_link != blank and button_label != blank %}
|
|
123
|
-
<a
|
|
124
|
-
{% if button_link_type == 'web' %}
|
|
125
|
-
target="_blank"
|
|
126
|
-
{% endif %}
|
|
127
|
-
href="{{button_link}}"
|
|
128
|
-
class="hero-btn btn"
|
|
129
|
-
style="
|
|
130
|
-
{%if button_text_color!=blank%}color:{{button_text_color}};{%endif%}
|
|
131
|
-
{%if button_bg_color!=blank%}background-color:{{button_bg_color}};{%endif%}
|
|
132
|
-
cursor:pointer;"
|
|
133
|
-
>
|
|
134
|
-
{{ button_label | escape }}
|
|
135
|
-
</a>
|
|
136
|
-
|
|
137
|
-
{% endif %}
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
{%endif%}
|
|
141
|
-
</div>
|
|
142
|
-
{% endfor %}
|
|
143
|
-
{% if full_width != true and full_width != nil %}</div>{% endif %}
|
|
144
|
-
</div>
|
|
145
|
-
<style>
|
|
146
|
-
{%if section.settings.img_height == "x-small"%}
|
|
147
|
-
[data-section-id='{{section.id}}'] .btn-primary{
|
|
148
|
-
display:none;
|
|
149
|
-
}
|
|
150
|
-
{%endif%}
|
|
151
|
-
[data-section-id='{{section.id}}'] .hero .mega-title{
|
|
152
|
-
{% assign titleFont = settings.skin_title_font_family %}
|
|
153
|
-
font-family: {{titleFont.family}},{{titleFont.fallback_families}};
|
|
154
|
-
font-style: {{titleFont.style}};
|
|
155
|
-
font-weight: {{titleFont.weight}};
|
|
156
|
-
}
|
|
157
|
-
{% if section.settings.img_height == "x-small" %}
|
|
158
|
-
[data-section-id='{{section.id}}'] .sep-loaded-slider__bullets{
|
|
159
|
-
display:none;
|
|
160
|
-
}
|
|
161
|
-
{%endif%}
|
|
162
|
-
.slide__bottom-margin {
|
|
163
|
-
margin-bottom: {% if section.settings.show_bottom_margin %}2.5rem{% else %}0{% endif %} !important;
|
|
164
|
-
}
|
|
165
|
-
[data-section-id='{{section.id}}'] .hero .mega-subtitle,.hero .mega-title {
|
|
166
|
-
overflow: hidden;
|
|
167
|
-
display: -webkit-box;
|
|
168
|
-
-webkit-line-clamp: 2;
|
|
169
|
-
-webkit-box-orient: vertical;
|
|
170
|
-
}
|
|
171
|
-
[data-section-id='{{section.id}}'] .hero .hero-btn:hover {
|
|
172
|
-
background: #fff;
|
|
173
|
-
color:#000;
|
|
174
|
-
}
|
|
175
|
-
[data-section-id='{{section.id}}'] .btn-primary{
|
|
176
|
-
color: #000;
|
|
177
|
-
background-color: #fff;
|
|
178
|
-
border-color: #fff;
|
|
179
|
-
max-width: 20rem;
|
|
180
|
-
white-space: nowrap;
|
|
181
|
-
overflow: hidden;
|
|
182
|
-
text-overflow: ellipsis;
|
|
183
|
-
}
|
|
184
|
-
[data-section-id='{{section.id}}'] .gap_small .hero-btn {
|
|
185
|
-
margin-top: 30px;
|
|
186
|
-
}
|
|
187
|
-
[data-section-id='{{section.id}}'] .gap_medium .hero-btn {
|
|
188
|
-
margin-top: 40px;
|
|
189
|
-
}
|
|
190
|
-
[data-section-id='{{section.id}}'] .gap_large .hero-btn {
|
|
191
|
-
margin-top: 50px;
|
|
192
|
-
}
|
|
193
|
-
[data-section-id='{{section.id}}'] .hero .page-width{
|
|
194
|
-
padding-bottom:30px;
|
|
195
|
-
padding-top:30px;
|
|
196
|
-
display: inline-block;
|
|
197
|
-
}
|
|
198
|
-
[data-section-id='{{section.id}}'] .banner_content{
|
|
199
|
-
position:absolute;
|
|
200
|
-
left:50%;
|
|
201
|
-
top:50%;
|
|
202
|
-
transform:translate(-50%,-50%);
|
|
203
|
-
-webkit-transform:translate(-50%,-50%);
|
|
204
|
-
color: #fff;
|
|
205
|
-
z-index: 10;
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
width: 100%;
|
|
208
|
-
}
|
|
209
|
-
{% for block in blocks %}
|
|
210
|
-
{% assign image_src = block.settings.src | default: defaultImg %}
|
|
211
|
-
{% assign mobile_image_src = block.settings.mobile_src | default: block.settings.src %}
|
|
212
|
-
{% unless forloop.index0 == 0 %}
|
|
213
|
-
.hero--{{block.id}}{
|
|
214
|
-
display: none;
|
|
215
|
-
}
|
|
216
|
-
{% endunless %}
|
|
217
|
-
[data-section-id='{{section.id}}'] .slide__img-wrapper-{{forloop.index0}}{
|
|
218
|
-
padding-bottom:
|
|
219
|
-
{% if type == 'cover' %}
|
|
220
|
-
{{ images[image_src].height | image_padding_bottom : images[image_src].width, origin:'unlimit' }};
|
|
221
|
-
{% else %}
|
|
222
|
-
{{ pc_height }}
|
|
223
|
-
{% endif %};
|
|
224
|
-
}
|
|
225
|
-
@media (max-width:768px){
|
|
226
|
-
[data-section-id='{{section.id}}'] .slide__img-wrapper-{{forloop.index0}}{
|
|
227
|
-
padding-bottom:
|
|
228
|
-
{% if type == 'cover' %}
|
|
229
|
-
{{ images[mobile_image_src].height | image_padding_bottom : images[mobile_image_src].width, origin:'unlimit' }};
|
|
230
|
-
{% else %}
|
|
231
|
-
{{ mobile_height }}
|
|
232
|
-
{% endif %};
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
{% endfor %}
|
|
236
|
-
@media (max-width:768px){
|
|
237
|
-
[data-section-id='{{section.id}}'] .banner_content{
|
|
238
|
-
padding:0 15px;
|
|
239
|
-
}
|
|
240
|
-
[data-section-id='{{section.id}}'] .hero .page-width{
|
|
241
|
-
max-width:100%;
|
|
242
|
-
}
|
|
243
|
-
{%if section.settings.img_height == "x-small" or section.settings.img_height == "small" %}
|
|
244
|
-
[data-section-id='{{section.id}}'] .hero .mega-subtitle,[data-section-id='{{section.id}}'] .hero .mega-title {
|
|
245
|
-
overflow: hidden;
|
|
246
|
-
white-space: nowrap;
|
|
247
|
-
text-overflow: ellipsis;
|
|
248
|
-
display: block;
|
|
249
|
-
}
|
|
250
|
-
[data-section-id='{{section.id}}'] .hero .page-width{
|
|
251
|
-
margin-bottom:30px;
|
|
252
|
-
}
|
|
253
|
-
{%endif%}
|
|
254
|
-
[data-section-id='{{section.id}}'] .hero-btn {
|
|
255
|
-
margin-top: 1rem !important;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_center {
|
|
259
|
-
left:50%;
|
|
260
|
-
top:50%;
|
|
261
|
-
transform:translate(-50%,-50%);
|
|
262
|
-
-webkit-transform:translate(-50%,-50%);
|
|
263
|
-
text-align:center;
|
|
264
|
-
}
|
|
265
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_center_left {
|
|
266
|
-
left:0;
|
|
267
|
-
top:50%;
|
|
268
|
-
transform:translate(0,-50%);
|
|
269
|
-
-webkit-transform:translate(0,-50%);
|
|
270
|
-
text-align:left;
|
|
271
|
-
}
|
|
272
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_center_right {
|
|
273
|
-
left:auto;
|
|
274
|
-
right:0;
|
|
275
|
-
top:50%;
|
|
276
|
-
transform:translate(0,-50%);
|
|
277
|
-
-webkit-transform:translate(0,-50%);
|
|
278
|
-
text-align:right;
|
|
279
|
-
}
|
|
280
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_bottom_left {
|
|
281
|
-
left:0;
|
|
282
|
-
top:auto;
|
|
283
|
-
bottom:0;
|
|
284
|
-
transform:translate(0,0);
|
|
285
|
-
-webkit-transform:translate(0,0);
|
|
286
|
-
text-align:left;
|
|
287
|
-
}
|
|
288
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_bottom_center {
|
|
289
|
-
left:50%;
|
|
290
|
-
top:auto;
|
|
291
|
-
bottom:0;
|
|
292
|
-
transform:translate(-50%,0);
|
|
293
|
-
-webkit-transform:translate(-50%,0);
|
|
294
|
-
text-align:center;
|
|
295
|
-
}
|
|
296
|
-
[data-section-id='{{section.id}}'] .banner_content.flex_bottom_right {
|
|
297
|
-
left:auto;
|
|
298
|
-
top:auto;
|
|
299
|
-
right:0;
|
|
300
|
-
bottom:0;
|
|
301
|
-
transform:translate(0,0);
|
|
302
|
-
-webkit-transform:translate(0,0);
|
|
303
|
-
text-align:right;
|
|
304
|
-
}
|
|
305
|
-
</style>
|
|
306
|
-
|
|
307
|
-
{% javascript %}
|
|
308
|
-
$(function(){
|
|
309
|
-
var $slider = $("{% if full_width != true and full_width != nil %}#slider{{section.id}} .row{% else %}#slider{{section.id}}{% endif %}");
|
|
310
|
-
$slider.hasClass('slick-initialized') && $slider.slick('destroy');
|
|
311
|
-
$slider.slick({
|
|
312
|
-
slidesToShow: 1,
|
|
313
|
-
slidesToScroll: 1,
|
|
314
|
-
arrows: false,
|
|
315
|
-
dots: true,
|
|
316
|
-
infinite: true,
|
|
317
|
-
adaptiveHeight: true,
|
|
318
|
-
touchThreshold: 10,
|
|
319
|
-
speed: 300,
|
|
320
|
-
autoplaySpeed:{{ section.settings.delay }},
|
|
321
|
-
autoplay:{% if section.settings.is_auto_play %}true{%else%}false{%endif%},
|
|
322
|
-
rtl: document.documentElement.getAttribute("dir") == "rtl"
|
|
323
|
-
}).on("beforeChange",function (event, slick){
|
|
324
|
-
$(slick.$slider).find(".lazy-lazyload").removeClass("lazy-lazyload").addClass("lazyload");
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
{% endjavascript %}
|
|
328
|
-
|
|
329
|
-
{% schema %}
|
|
330
|
-
{
|
|
331
|
-
"name": "slide",
|
|
332
|
-
"max_blocks": 10,
|
|
333
|
-
"settings": [
|
|
334
|
-
{
|
|
335
|
-
"type": "header",
|
|
336
|
-
"content": {
|
|
337
|
-
"zh-CN": "轮播规则",
|
|
338
|
-
"en-US": "Settings"
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"type": "checkbox",
|
|
343
|
-
"label": {
|
|
344
|
-
"en-US": "Auto-change slides",
|
|
345
|
-
"zh-CN": "自动轮播"
|
|
346
|
-
},
|
|
347
|
-
"id": "is_auto_play",
|
|
348
|
-
"default": true
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"type": "select",
|
|
352
|
-
"id": "delay",
|
|
353
|
-
"label": {
|
|
354
|
-
"zh-CN": "轮播时间",
|
|
355
|
-
"en-US": "Change slides every"
|
|
356
|
-
},
|
|
357
|
-
"default": "5000",
|
|
358
|
-
"options": [
|
|
359
|
-
{
|
|
360
|
-
"value": "2000",
|
|
361
|
-
"label": {
|
|
362
|
-
"en-US": "2s",
|
|
363
|
-
"zh-CN": "2秒"
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"value": "3000",
|
|
368
|
-
"label": {
|
|
369
|
-
"en-US": "3s",
|
|
370
|
-
"zh-CN": "3秒"
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"value": "5000",
|
|
375
|
-
"label": {
|
|
376
|
-
"en-US": "5s",
|
|
377
|
-
"zh-CN": "5秒"
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
]
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"type": "select",
|
|
384
|
-
"label": {
|
|
385
|
-
"zh-CN": "图片高度",
|
|
386
|
-
"en-US": "Image height"
|
|
387
|
-
},
|
|
388
|
-
"id": "img_height",
|
|
389
|
-
"default": "medium",
|
|
390
|
-
"options": [
|
|
391
|
-
{
|
|
392
|
-
"value": "normal",
|
|
393
|
-
"label": {
|
|
394
|
-
"zh-CN": "自适应",
|
|
395
|
-
"en-US": "Full"
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"value": "large",
|
|
400
|
-
"label": {
|
|
401
|
-
"en-US": "Large(PC: 600px, Phone: 460px)",
|
|
402
|
-
"zh-CN": "大(PC:600px,移动:460px )"
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"value": "medium",
|
|
407
|
-
"label": {
|
|
408
|
-
"zh-CN": "中(PC:450px,移动:325px )",
|
|
409
|
-
"en-US": "Medium(PC: 450px, Phone: 325px)"
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"value": "small",
|
|
414
|
-
"label": {
|
|
415
|
-
"en-US": "Small(PC: 300px, Phone: 200px)",
|
|
416
|
-
"zh-CN": "小(PC:300px,移动:200px )"
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"value": "x-small",
|
|
421
|
-
"label": {
|
|
422
|
-
"en-US": "Ultra-small(PC: 200px, Phone: 150px)",
|
|
423
|
-
"zh-CN": "超小(PC:200px,移动:150px )"
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
]
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"type": "select",
|
|
430
|
-
"label": {
|
|
431
|
-
"en-US": "Text size",
|
|
432
|
-
"zh-CN": "文字大小"
|
|
433
|
-
},
|
|
434
|
-
"id": "text_size",
|
|
435
|
-
"default": "medium",
|
|
436
|
-
"options": [
|
|
437
|
-
{
|
|
438
|
-
"value": "large",
|
|
439
|
-
"label": {
|
|
440
|
-
"zh-CN": "大",
|
|
441
|
-
"en-US": "Large"
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"value": "medium",
|
|
446
|
-
"label": {
|
|
447
|
-
"zh-CN": "中",
|
|
448
|
-
"en-US": "Medium"
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"value": "small",
|
|
453
|
-
"label": {
|
|
454
|
-
"zh-CN": "小",
|
|
455
|
-
"en-US": "Small"
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
]
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"type": "checkbox",
|
|
462
|
-
"label": {
|
|
463
|
-
"zh-CN": "宽度铺满屏幕",
|
|
464
|
-
"en-US": "Full page width"
|
|
465
|
-
},
|
|
466
|
-
"id": "is_full_width",
|
|
467
|
-
"default": true
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"type": "checkbox",
|
|
471
|
-
"label": {
|
|
472
|
-
"en-US": "Show below space",
|
|
473
|
-
"zh-CN": "显示下间距"
|
|
474
|
-
},
|
|
475
|
-
"id": "show_bottom_margin",
|
|
476
|
-
"default": false
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"type": "header",
|
|
480
|
-
"content": {
|
|
481
|
-
"en-US": "Content fill",
|
|
482
|
-
"zh-CN": "内容填充"
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
],
|
|
486
|
-
"blocks": [
|
|
487
|
-
{
|
|
488
|
-
"type": "banner",
|
|
489
|
-
"name": {
|
|
490
|
-
"zh-CN": "图片",
|
|
491
|
-
"en-US": "Image"
|
|
492
|
-
},
|
|
493
|
-
"settings": [
|
|
494
|
-
{
|
|
495
|
-
"type": "image_picker",
|
|
496
|
-
"label": {
|
|
497
|
-
"en-US": "Desktop image",
|
|
498
|
-
"zh-CN": "PC端图片"
|
|
499
|
-
},
|
|
500
|
-
"id": "src",
|
|
501
|
-
"info": {
|
|
502
|
-
"zh-CN": "如果您选择自适应,建议尺寸(宽*高):1920*667px",
|
|
503
|
-
"en-US": "Recommended resolution (width * height): 1920*667px if you choose responsive layout"
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"type": "image_picker",
|
|
508
|
-
"id": "mobile_src",
|
|
509
|
-
"label": {
|
|
510
|
-
"en-US": "Mobile image",
|
|
511
|
-
"zh-CN": "移动端图片"
|
|
512
|
-
},
|
|
513
|
-
"info": {
|
|
514
|
-
"zh-CN": "如果您选择自适应,建议尺寸(宽*高):750*918px",
|
|
515
|
-
"en-US": "Recommended resolution (width * height): 750*918px if you choose responsive layout"
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"type": "text",
|
|
520
|
-
"id": "button_label",
|
|
521
|
-
"label": {
|
|
522
|
-
"zh-CN": "按钮文字",
|
|
523
|
-
"en-US": "Button text"
|
|
524
|
-
},
|
|
525
|
-
"default": "Learn More"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"type": "url",
|
|
529
|
-
"id": "button_link",
|
|
530
|
-
"label": {
|
|
531
|
-
"en-US": "Button link",
|
|
532
|
-
"zh-CN": "按钮链接"
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
"type": "color",
|
|
537
|
-
"id": "button_bg_color",
|
|
538
|
-
"label": {
|
|
539
|
-
"en-US": "Button background color",
|
|
540
|
-
"zh-CN": "按钮背景颜色"
|
|
541
|
-
},
|
|
542
|
-
"default": "#FFFFFF"
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
"type": "color",
|
|
546
|
-
"id": "button_text_color",
|
|
547
|
-
"label": {
|
|
548
|
-
"en-US": "Button text color",
|
|
549
|
-
"zh-CN": "按钮文字颜色"
|
|
550
|
-
},
|
|
551
|
-
"default": "#000000"
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
"type": "range",
|
|
555
|
-
"id": "opacity",
|
|
556
|
-
"step": 1,
|
|
557
|
-
"max": 100,
|
|
558
|
-
"min": 0,
|
|
559
|
-
"label": {
|
|
560
|
-
"en-US": "Opacity",
|
|
561
|
-
"zh-CN": "蒙层不透明度"
|
|
562
|
-
},
|
|
563
|
-
"default": 25,
|
|
564
|
-
"unit": "%"
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
"type": "select",
|
|
568
|
-
"id": "alignment",
|
|
569
|
-
"label": {
|
|
570
|
-
"zh-CN": "图片截取位置",
|
|
571
|
-
"en-US": "Crop"
|
|
572
|
-
},
|
|
573
|
-
"default": "center",
|
|
574
|
-
"options": [
|
|
575
|
-
{
|
|
576
|
-
"value": "top",
|
|
577
|
-
"label": {
|
|
578
|
-
"en-US": "Top",
|
|
579
|
-
"zh-CN": "上"
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"value": "center",
|
|
584
|
-
"label": {
|
|
585
|
-
"en-US": "Center",
|
|
586
|
-
"zh-CN": "中"
|
|
587
|
-
}
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
"value": "bottom",
|
|
591
|
-
"label": {
|
|
592
|
-
"en-US": "Bottom",
|
|
593
|
-
"zh-CN": "下"
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
]
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
"type": "select",
|
|
600
|
-
"id": "text_position",
|
|
601
|
-
"label": {
|
|
602
|
-
"en-US": "Text and button position",
|
|
603
|
-
"zh-CN": "文字&按钮位置"
|
|
604
|
-
},
|
|
605
|
-
"default": "center",
|
|
606
|
-
"options": [
|
|
607
|
-
{
|
|
608
|
-
"label": {
|
|
609
|
-
"en-US": "Center left",
|
|
610
|
-
"zh-CN": "中左"
|
|
611
|
-
},
|
|
612
|
-
"value": "center_left"
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
"label": {
|
|
616
|
-
"en-US": "Center",
|
|
617
|
-
"zh-CN": "中间"
|
|
618
|
-
},
|
|
619
|
-
"value": "center"
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"label": {
|
|
623
|
-
"en-US": "Center right",
|
|
624
|
-
"zh-CN": "中右"
|
|
625
|
-
},
|
|
626
|
-
"value": "center_right"
|
|
627
|
-
}
|
|
628
|
-
]
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
"type": "color",
|
|
632
|
-
"id": "text_color",
|
|
633
|
-
"label": {
|
|
634
|
-
"zh-CN": "标题&副标题颜色",
|
|
635
|
-
"en-US": "Heading and subheading color"
|
|
636
|
-
},
|
|
637
|
-
"default": "#FFFFFF"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"type": "text",
|
|
641
|
-
"id": "title",
|
|
642
|
-
"label": {
|
|
643
|
-
"en-US": "Heading",
|
|
644
|
-
"zh-CN": "标题"
|
|
645
|
-
},
|
|
646
|
-
"default": "Image Slide",
|
|
647
|
-
"placeholder": {
|
|
648
|
-
"zh-CN": "输入标题",
|
|
649
|
-
"en-US": "Input heading"
|
|
650
|
-
}
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"type": "text",
|
|
654
|
-
"id": "sub_title",
|
|
655
|
-
"label": {
|
|
656
|
-
"en-US": "Subheading",
|
|
657
|
-
"zh-CN": "副标题"
|
|
658
|
-
},
|
|
659
|
-
"default": "Tell your brand's story through images",
|
|
660
|
-
"placeholder": {
|
|
661
|
-
"en-US": "Input subheading",
|
|
662
|
-
"zh-CN": "输入副标题"
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
"type": "url",
|
|
667
|
-
"id": "url",
|
|
668
|
-
"label": {
|
|
669
|
-
"zh-CN": "两图共用链接",
|
|
670
|
-
"en-US": "Image link"
|
|
671
|
-
},
|
|
672
|
-
"is_image_link": true
|
|
673
|
-
}
|
|
674
|
-
]
|
|
675
|
-
}
|
|
676
|
-
],
|
|
677
|
-
"presets": [
|
|
678
|
-
{
|
|
679
|
-
"name": "slide",
|
|
680
|
-
"cname": {
|
|
681
|
-
"en-US": "Slideshow",
|
|
682
|
-
"zh-CN": "轮播图"
|
|
683
|
-
},
|
|
684
|
-
"category": {
|
|
685
|
-
"en-US": "Material",
|
|
686
|
-
"zh-CN": "素材"
|
|
687
|
-
},
|
|
688
|
-
"ccategory": {
|
|
689
|
-
"en-US": "Material",
|
|
690
|
-
"zh-CN": "素材"
|
|
691
|
-
},
|
|
692
|
-
"display": true,
|
|
693
|
-
"blocks": [
|
|
694
|
-
{
|
|
695
|
-
"type": "banner",
|
|
696
|
-
"name": {
|
|
697
|
-
"zh-CN": "banner广告图",
|
|
698
|
-
"en-US": "Banner Ads placement"
|
|
699
|
-
},
|
|
700
|
-
"max_blocks": 10,
|
|
701
|
-
"settings": {
|
|
702
|
-
"src": "",
|
|
703
|
-
"mobile_src": "",
|
|
704
|
-
"url": "",
|
|
705
|
-
"opacity": 25,
|
|
706
|
-
"alignment": "center",
|
|
707
|
-
"title": "Image Slide",
|
|
708
|
-
"sub_title": "Tell your brand's story through images",
|
|
709
|
-
"button_label": "Learn More",
|
|
710
|
-
"button_bg_color": "#FFFFFF",
|
|
711
|
-
"button_text_color": "#000000",
|
|
712
|
-
"text_color": "#FFFFFF"
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
]
|
|
716
|
-
}
|
|
717
|
-
]
|
|
718
|
-
}
|
|
719
|
-
{% endschema %}
|