cloudcommerce 0.0.125 → 0.0.126
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/.eslintrc.cjs +26 -7
- package/.gitmodules +3 -0
- package/CHANGELOG.md +13 -0
- package/action.yml +5 -1
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +7 -4
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +1 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.github/renovate.json +5 -0
- package/ecomplus-stores/tia-sonia/.github/workflows/build-and-deploy.yml +41 -0
- package/ecomplus-stores/tia-sonia/.github/workflows/calibreapp-image-actions.yml +23 -0
- package/ecomplus-stores/tia-sonia/.vscode/extensions.json +8 -0
- package/ecomplus-stores/tia-sonia/.vscode/settings.json +5 -0
- package/ecomplus-stores/tia-sonia/LICENSE.md +230 -0
- package/ecomplus-stores/tia-sonia/README.md +117 -0
- package/ecomplus-stores/tia-sonia/README.pt-BR.md +117 -0
- package/ecomplus-stores/tia-sonia/functions/config.json +3 -0
- package/ecomplus-stores/tia-sonia/functions/core/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/core/package.json +20 -0
- package/ecomplus-stores/tia-sonia/functions/events/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/events/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/example.env +10 -0
- package/ecomplus-stores/tia-sonia/functions/modules/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/modules/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/passport/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/passport/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/.eslintrc.cjs +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/astro.config.mjs +4 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/blog.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/brands.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/categories.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/code.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/collections.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/contacts.json +13 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/footer.json +46 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/header.json +35 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/home.json +45 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/info.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/maintenance.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/menu.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/contato.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/entrega.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/faq.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/pagamentos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/privacidade.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/sobre-nos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/termos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/trocas.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/posts/esta-loja-e-um-pwa.json +9 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/products.json +32 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/search.json +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/settings.json +14 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/social.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/analytics.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/compre-confie.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/ebit.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/fb-pixel.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/gmc-ratings.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/minicart.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/offers-notification.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/opinioes-verificadas.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/product-card.json +10 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/product.json +13 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/search-engine.json +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/search.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/tag-manager.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/tawkto.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/trustvox.json +15 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/user.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/index.js +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +30 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/admin/config.json +1 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cms-preview.css +274 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cms.css +114 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cvv.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/img-placeholder.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/payments.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/ssl-safe.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/large-icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner1.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner2.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/favicon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headless.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headphone.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/large-icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/og-image.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/passion.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/pwa-reliable.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect89.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/ssl-safe.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/robots.txt +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/assets/.gitkeep +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TheHeader.vue +42 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TopBar.vue +133 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderButtonLink.vue +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderButtons.vue +46 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderNav.vue +9 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderNavLink.vue +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/env.d.ts +3 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Base.astro +34 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Pages.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/PagesHeader.astro +117 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Fallback.astro +15 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Home.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Wildcard.astro +21 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/[...slug].astro +36 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/app/account.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/app/index.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/fallback.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/index.astro +31 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/scripts/InlineScripts.astro +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs +4 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/tsconfig.json +16 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/uno.config.ts +4 -0
- package/ecomplus-stores/tia-sonia/package.json +28 -0
- package/ecomplus-stores/tia-sonia/scripts/install.sh +9 -0
- package/package.json +14 -14
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/mercadopago/lib/mercadopago.js +0 -2
- package/packages/apps/mercadopago/lib/mercadopago.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-webhook.js +0 -2
- package/packages/apps/mercadopago/lib/mp-webhook.js.map +1 -1
- package/packages/apps/mercadopago/package.json +4 -4
- package/packages/apps/mercadopago/src/mercadopago.ts +0 -3
- package/packages/apps/mercadopago/src/mp-webhook.ts +0 -2
- package/packages/apps/tiny-erp/lib/event-to-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +1 -2
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js +0 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js.map +1 -1
- package/packages/apps/tiny-erp/lib/tiny-webhook.js +1 -1
- package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +4 -4
- package/packages/apps/tiny-erp/src/event-to-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/after-tiny-queue.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +1 -2
- package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/tiny-erp.ts +0 -1
- package/packages/apps/tiny-erp/src/tiny-webhook.ts +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +4 -4
- package/packages/firebase/lib/config.js +3 -3
- package/packages/firebase/lib/handlers/check-store-events.js +1 -2
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
- package/packages/firebase/lib/helpers/update-app-data.js +1 -1
- package/packages/firebase/lib/helpers/update-app-data.js.map +1 -1
- package/packages/firebase/lib/init.js +0 -2
- package/packages/firebase/lib/init.js.map +1 -1
- package/packages/firebase/package.json +4 -4
- package/packages/firebase/src/config.ts +3 -3
- package/packages/firebase/src/handlers/check-store-events.ts +1 -2
- package/packages/firebase/src/helpers/update-app-data.ts +1 -1
- package/packages/firebase/src/init.ts +0 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/call-app-module.js +1 -1
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/lib/firebase/checkout.js +9 -7
- package/packages/modules/lib/firebase/checkout.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js +80 -18
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js +1 -1
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js +16 -16
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/new-order.js +8 -8
- package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +23 -6
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js +1 -2
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
- package/packages/modules/lib/firebase/handle-module.js +1 -1
- package/packages/modules/lib/firebase/handle-module.js.map +1 -1
- package/packages/modules/lib/firebase.js +0 -1
- package/packages/modules/lib/firebase.js.map +1 -1
- package/packages/modules/package.json +4 -4
- package/packages/modules/src/firebase/call-app-module.ts +1 -1
- package/packages/modules/src/firebase/checkout.ts +13 -10
- package/packages/modules/src/firebase/functions-checkout/fix-items.ts +88 -20
- package/packages/modules/src/firebase/functions-checkout/get-custumerId.ts +1 -1
- package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +24 -23
- package/packages/modules/src/firebase/functions-checkout/new-order.ts +15 -14
- package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +30 -8
- package/packages/modules/src/firebase/functions-checkout/utils.ts +3 -5
- package/packages/modules/src/firebase/handle-module.ts +1 -1
- package/packages/modules/src/firebase.ts +0 -1
- package/packages/modules/src/types/index.d.ts +7 -6
- package/packages/passport/lib/firebase/serve-passport-api.js +1 -1
- package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
- package/packages/passport/lib/firebase.js +0 -1
- package/packages/passport/lib/firebase.js.map +1 -1
- package/packages/passport/package.json +4 -4
- package/packages/passport/src/firebase/serve-passport-api.ts +1 -1
- package/packages/passport/src/firebase.ts +0 -1
- package/packages/ssr/package.json +7 -7
- package/packages/storefront/.eslintrc.cjs +0 -1
- package/packages/storefront/astro.config.mjs +3 -2
- package/packages/storefront/dist/client/HeaderButtons.b5b4a939.js +1 -0
- package/packages/storefront/dist/client/assets/_...slug_.8d138f36.css +4 -0
- package/packages/storefront/dist/client/chunks/{HeaderButtons.d1f8a21f.js → HeaderButtons.308edb4d.js} +1 -1
- package/packages/storefront/dist/client/chunks/{LoginForm.e02dee3d.js → LoginForm.0c5ba697.js} +95 -95
- package/packages/storefront/dist/client/chunks/preload-helper.1de719f8.js +1 -0
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.f00ab3bd.js +1 -0
- package/packages/storefront/dist/client/client.69fdbd1b.js +1 -0
- package/packages/storefront/dist/client/{hoisted.3f1cf839.js → hoisted.4f689abe.js} +1 -1
- package/packages/storefront/dist/client/page.33c44e88.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/entry.mjs +2826 -3530
- package/packages/storefront/package.json +13 -16
- package/packages/storefront/src/lib/assets/pico.css +19 -24
- package/packages/storefront/src/lib/components/LoginForm.vue +4 -13
- package/packages/storefront/src/lib/ssr/image.ts +0 -1
- package/packages/storefront/src/lib/state/customer-session.ts +29 -37
- package/packages/storefront/src/lib/state/shopping-cart/add-cart-item.ts +89 -0
- package/packages/storefront/src/lib/state/shopping-cart.ts +52 -0
- package/packages/storefront/src/lib/state/use-storage.ts +19 -0
- package/packages/storefront/tailwind.config.cjs +6 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/HeaderButtons.75084c8f.js +0 -1
- package/packages/storefront/dist/client/assets/_...slug_.5d8e6131.css +0 -4
- package/packages/storefront/dist/client/chunks/preload-helper.f15ab524.js +0 -1
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.9119f0ff.js +0 -1
- package/packages/storefront/dist/client/client.671d7334.js +0 -1
- package/packages/storefront/dist/client/page.b906f867.js +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.loading {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 9999;
|
|
4
|
+
height: 2em;
|
|
5
|
+
width: 2em;
|
|
6
|
+
overflow: show;
|
|
7
|
+
margin: auto;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.loading:before {
|
|
15
|
+
content: '';
|
|
16
|
+
display: block;
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
background: radial-gradient(rgba(20, 20, 20,.8), rgba(0, 0, 0, .8));
|
|
23
|
+
background: -webkit-radial-gradient(rgba(20, 20, 20,.8), rgba(0, 0, 0,.8));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.loading:not(:required) {
|
|
27
|
+
font: 0/0 a;
|
|
28
|
+
color: transparent;
|
|
29
|
+
text-shadow: none;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
border: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.loading:not(:required):after {
|
|
35
|
+
content: '';
|
|
36
|
+
display: block;
|
|
37
|
+
font-size: 10px;
|
|
38
|
+
width: 1em;
|
|
39
|
+
height: 1em;
|
|
40
|
+
margin-top: -0.5em;
|
|
41
|
+
-webkit-animation: spinner 150ms infinite linear;
|
|
42
|
+
-moz-animation: spinner 150ms infinite linear;
|
|
43
|
+
-ms-animation: spinner 150ms infinite linear;
|
|
44
|
+
-o-animation: spinner 150ms infinite linear;
|
|
45
|
+
animation: spinner 150ms infinite linear;
|
|
46
|
+
border-radius: 0.5em;
|
|
47
|
+
-webkit-box-shadow: rgba(255,255,255, 0.75) 1.5em 0 0 0, rgba(255,255,255, 0.75) 1.1em 1.1em 0 0, rgba(255,255,255, 0.75) 0 1.5em 0 0, rgba(255,255,255, 0.75) -1.1em 1.1em 0 0, rgba(255,255,255, 0.75) -1.5em 0 0 0, rgba(255,255,255, 0.75) -1.1em -1.1em 0 0, rgba(255,255,255, 0.75) 0 -1.5em 0 0, rgba(255,255,255, 0.75) 1.1em -1.1em 0 0;
|
|
48
|
+
box-shadow: rgba(255,255,255, 0.75) 1.5em 0 0 0, rgba(255,255,255, 0.75) 1.1em 1.1em 0 0, rgba(255,255,255, 0.75) 0 1.5em 0 0, rgba(255,255,255, 0.75) -1.1em 1.1em 0 0, rgba(255,255,255, 0.75) -1.5em 0 0 0, rgba(255,255,255, 0.75) -1.1em -1.1em 0 0, rgba(255,255,255, 0.75) 0 -1.5em 0 0, rgba(255,255,255, 0.75) 1.1em -1.1em 0 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@-webkit-keyframes spinner {
|
|
52
|
+
0% {
|
|
53
|
+
-webkit-transform: rotate(0deg);
|
|
54
|
+
-moz-transform: rotate(0deg);
|
|
55
|
+
-ms-transform: rotate(0deg);
|
|
56
|
+
-o-transform: rotate(0deg);
|
|
57
|
+
transform: rotate(0deg);
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
-webkit-transform: rotate(360deg);
|
|
61
|
+
-moz-transform: rotate(360deg);
|
|
62
|
+
-ms-transform: rotate(360deg);
|
|
63
|
+
-o-transform: rotate(360deg);
|
|
64
|
+
transform: rotate(360deg);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
@-moz-keyframes spinner {
|
|
68
|
+
0% {
|
|
69
|
+
-webkit-transform: rotate(0deg);
|
|
70
|
+
-moz-transform: rotate(0deg);
|
|
71
|
+
-ms-transform: rotate(0deg);
|
|
72
|
+
-o-transform: rotate(0deg);
|
|
73
|
+
transform: rotate(0deg);
|
|
74
|
+
}
|
|
75
|
+
100% {
|
|
76
|
+
-webkit-transform: rotate(360deg);
|
|
77
|
+
-moz-transform: rotate(360deg);
|
|
78
|
+
-ms-transform: rotate(360deg);
|
|
79
|
+
-o-transform: rotate(360deg);
|
|
80
|
+
transform: rotate(360deg);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@-o-keyframes spinner {
|
|
84
|
+
0% {
|
|
85
|
+
-webkit-transform: rotate(0deg);
|
|
86
|
+
-moz-transform: rotate(0deg);
|
|
87
|
+
-ms-transform: rotate(0deg);
|
|
88
|
+
-o-transform: rotate(0deg);
|
|
89
|
+
transform: rotate(0deg);
|
|
90
|
+
}
|
|
91
|
+
100% {
|
|
92
|
+
-webkit-transform: rotate(360deg);
|
|
93
|
+
-moz-transform: rotate(360deg);
|
|
94
|
+
-ms-transform: rotate(360deg);
|
|
95
|
+
-o-transform: rotate(360deg);
|
|
96
|
+
transform: rotate(360deg);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
@keyframes spinner {
|
|
100
|
+
0% {
|
|
101
|
+
-webkit-transform: rotate(0deg);
|
|
102
|
+
-moz-transform: rotate(0deg);
|
|
103
|
+
-ms-transform: rotate(0deg);
|
|
104
|
+
-o-transform: rotate(0deg);
|
|
105
|
+
transform: rotate(0deg);
|
|
106
|
+
}
|
|
107
|
+
100% {
|
|
108
|
+
-webkit-transform: rotate(360deg);
|
|
109
|
+
-moz-transform: rotate(360deg);
|
|
110
|
+
-ms-transform: rotate(360deg);
|
|
111
|
+
-o-transform: rotate(360deg);
|
|
112
|
+
transform: rotate(360deg);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { toRefs, ImgHTMLAttributes } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
logo?: ImgHTMLAttributes;
|
|
6
|
+
logoAltHeading?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
logoAltHeading: 'h2',
|
|
11
|
+
});
|
|
12
|
+
const { logo } = toRefs(props);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<header class="header bg-surface bg-opacity-90 backdrop-blur-md
|
|
17
|
+
sticky top-0 z-50 py-1 sm:py-2">
|
|
18
|
+
<div class="container">
|
|
19
|
+
<div class="grid grid-flow-col auto-cols-max justify-between items-center">
|
|
20
|
+
<slot name="aside">
|
|
21
|
+
<div class="header__aside md:hidden">
|
|
22
|
+
<div class="i-bars-3-bottom-left"></div>
|
|
23
|
+
</div>
|
|
24
|
+
</slot>
|
|
25
|
+
<slot name="logo" v-bind="{ logo }">
|
|
26
|
+
<a v-if="logo" href="/">
|
|
27
|
+
<component :is="(logo.alt && logoAltHeading) || 'span'" class="m-0">
|
|
28
|
+
<img v-bind="logo" />
|
|
29
|
+
</component>
|
|
30
|
+
</a>
|
|
31
|
+
</slot>
|
|
32
|
+
<div class="flex items-center">
|
|
33
|
+
<slot name="actions">
|
|
34
|
+
<slot name="nav" />
|
|
35
|
+
<slot name="search" />
|
|
36
|
+
<slot name="buttons" />
|
|
37
|
+
</slot>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</header>
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type CmsHeader from '@@storefront/types/cms-header';
|
|
3
|
+
import type CmsContacts from '@@storefront/types/cms-contacts';
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
marketingStripe: CmsHeader['marketing_stripe'];
|
|
7
|
+
hasNavbar?: boolean;
|
|
8
|
+
pageLinks: CmsHeader['contacts_stripe']['pages'];
|
|
9
|
+
contacts: CmsContacts;
|
|
10
|
+
hasPhoneLinks?: boolean;
|
|
11
|
+
hasNetworkLinks?: boolean;
|
|
12
|
+
socialNetworks?: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
withDefaults(defineProps<Props>(), {
|
|
16
|
+
hasNavbar: true,
|
|
17
|
+
hasPhoneLinks: true,
|
|
18
|
+
hasNetworksLinks: true,
|
|
19
|
+
socialNetworks() {
|
|
20
|
+
return ['facebook', 'twitter', 'youtube', 'pinterest', 'instagram', 'tiktok'];
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div class="top-bar w-full bg-surface">
|
|
27
|
+
<slot name="countdown" v-bind="{ marketingStripe }">
|
|
28
|
+
<template v-if="marketingStripe && marketingStripe.text">
|
|
29
|
+
<component
|
|
30
|
+
:is="marketingStripe.link ? 'a' : 'div'"
|
|
31
|
+
class="top-bar__countdown block text-sm text-center p-1
|
|
32
|
+
whitespace-nowrap overflow-x-auto"
|
|
33
|
+
:class="marketingStripe.link ? 'primary' : 'secondary'"
|
|
34
|
+
:href="marketingStripe.link"
|
|
35
|
+
>
|
|
36
|
+
{{ marketingStripe.text }}
|
|
37
|
+
</component>
|
|
38
|
+
</template>
|
|
39
|
+
</slot>
|
|
40
|
+
<div
|
|
41
|
+
v-if="hasNavbar"
|
|
42
|
+
class="top-bar__nav hidden md:block py-2"
|
|
43
|
+
>
|
|
44
|
+
<div class="container">
|
|
45
|
+
<div class="flex items-center lg:px-2 xl:px-4">
|
|
46
|
+
<div class="grow text-xs">
|
|
47
|
+
<slot name="page-links" v-bind="{ pageLinks }">
|
|
48
|
+
<nav
|
|
49
|
+
v-if="pageLinks"
|
|
50
|
+
class="top-bar__page-links inline-block mr-4 font-semibold"
|
|
51
|
+
>
|
|
52
|
+
<a
|
|
53
|
+
v-for="({ link, title }, i) in pageLinks"
|
|
54
|
+
class="mr-2 lg:mr-3"
|
|
55
|
+
:key="i"
|
|
56
|
+
:href="link"
|
|
57
|
+
>
|
|
58
|
+
{{ title }}
|
|
59
|
+
</a>
|
|
60
|
+
</nav>
|
|
61
|
+
</slot>
|
|
62
|
+
<slot
|
|
63
|
+
name="contact-links"
|
|
64
|
+
v-bind="{ contacts, hasPhoneLinks }"
|
|
65
|
+
>
|
|
66
|
+
<div
|
|
67
|
+
v-if="hasPhoneLinks"
|
|
68
|
+
class="top-bar__contact-links inline-block"
|
|
69
|
+
>
|
|
70
|
+
<a
|
|
71
|
+
v-if="contacts.whatsapp"
|
|
72
|
+
href="javascript:;"
|
|
73
|
+
target="_blank"
|
|
74
|
+
rel="noopener"
|
|
75
|
+
:data-whatsapp-tel="contacts.whatsapp.replace(/\D/g, '')"
|
|
76
|
+
class="mr-2"
|
|
77
|
+
>
|
|
78
|
+
<i class="i-whatsapp"></i>
|
|
79
|
+
{{ contacts.whatsapp }}
|
|
80
|
+
</a>
|
|
81
|
+
<a
|
|
82
|
+
v-if="contacts.phone && contacts.phone !== contacts.whatsapp"
|
|
83
|
+
:href="`tel:+${contacts.phone.replace(/\D/g, '')}`"
|
|
84
|
+
target="_blank"
|
|
85
|
+
rel="noopener"
|
|
86
|
+
class="mr-2"
|
|
87
|
+
>
|
|
88
|
+
<i class="i-phone"></i>
|
|
89
|
+
{{ contacts.phone }}
|
|
90
|
+
</a>
|
|
91
|
+
</div>
|
|
92
|
+
</slot>
|
|
93
|
+
</div>
|
|
94
|
+
<slot
|
|
95
|
+
name="social-networks"
|
|
96
|
+
v-bind="{ contacts, hasNetworkLinks }"
|
|
97
|
+
>
|
|
98
|
+
<div
|
|
99
|
+
v-if="hasNetworkLinks"
|
|
100
|
+
class="top-bar__social-networks leading-none"
|
|
101
|
+
>
|
|
102
|
+
<template v-for="network in socialNetworks">
|
|
103
|
+
<template v-if="contacts[network]">
|
|
104
|
+
<a
|
|
105
|
+
:key="network"
|
|
106
|
+
:href="contacts[network]"
|
|
107
|
+
target="_blank"
|
|
108
|
+
rel="noopener"
|
|
109
|
+
class="ml-2"
|
|
110
|
+
:aria-label="`Follow on ${network}`"
|
|
111
|
+
>
|
|
112
|
+
<i v-if="network === 'facebook'" class="i-facebook"></i>
|
|
113
|
+
<i v-else-if="network === 'youtube'" class="i-youtube"></i>
|
|
114
|
+
<i v-else-if="network === 'twitter'" class="i-twitter"></i>
|
|
115
|
+
<i v-else-if="network === 'pinterest'" class="i-pinterest"></i>
|
|
116
|
+
<i v-else-if="network === 'instagram'" class="i-instagram"></i>
|
|
117
|
+
<i v-else-if="network === 'tiktok'" class="i-tiktok"></i>
|
|
118
|
+
</a>
|
|
119
|
+
</template>
|
|
120
|
+
</template>
|
|
121
|
+
</div>
|
|
122
|
+
</slot>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|
|
128
|
+
|
|
129
|
+
<style>
|
|
130
|
+
.top-bar__nav a:not(:hover) {
|
|
131
|
+
color: var(--gray);
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {
|
|
3
|
+
i19myAccountAndOrders,
|
|
4
|
+
i19openCart,
|
|
5
|
+
} from '@@i18n';
|
|
6
|
+
import LoginDrawer, { Props as LoginDrawerProps } from '@@components/LoginDrawer.vue';
|
|
7
|
+
import HeaderButtonLink from '@@components/header/HeaderButtonLink.vue';
|
|
8
|
+
|
|
9
|
+
export interface Props {
|
|
10
|
+
accountUrl?: string;
|
|
11
|
+
cartUrl?: string;
|
|
12
|
+
loginDrawerAdditionalLinks?: LoginDrawerProps['additionalLinks'];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
withDefaults(defineProps<Props>(), {
|
|
16
|
+
accountUrl: '/app/account',
|
|
17
|
+
cartUrl: '/app/#/cart',
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<slot name="account">
|
|
23
|
+
<LoginDrawer
|
|
24
|
+
:account-url="accountUrl"
|
|
25
|
+
:additional-links="loginDrawerAdditionalLinks"
|
|
26
|
+
>
|
|
27
|
+
<template #toggle>
|
|
28
|
+
<HeaderButtonLink
|
|
29
|
+
:href="accountUrl"
|
|
30
|
+
:title="i19myAccountAndOrders"
|
|
31
|
+
>
|
|
32
|
+
<div class="i-user-circle"></div>
|
|
33
|
+
</HeaderButtonLink>
|
|
34
|
+
</template>
|
|
35
|
+
</LoginDrawer>
|
|
36
|
+
</slot>
|
|
37
|
+
<slot />
|
|
38
|
+
<slot name="cart">
|
|
39
|
+
<HeaderButtonLink
|
|
40
|
+
:href="cartUrl"
|
|
41
|
+
:title="i19openCart"
|
|
42
|
+
>
|
|
43
|
+
<div class="i-shopping-cart"></div>
|
|
44
|
+
</HeaderButtonLink>
|
|
45
|
+
</slot>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
import Base from '@@storefront/layouts/Base.astro';
|
|
4
|
+
import InlineScripts from '~/scripts/InlineScripts.astro';
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
pageContext: PageContext;
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { pageContext, title } = Astro.props as Props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Base pageContext={pageContext} title={title}>
|
|
15
|
+
<InlineScripts slot="before-head-end" />
|
|
16
|
+
<slot />
|
|
17
|
+
</Base>
|
|
18
|
+
|
|
19
|
+
<style is:global>
|
|
20
|
+
@media only screen and (prefers-color-scheme: dark) {
|
|
21
|
+
:root:not([data-theme=light]) a:not([role=button]) {
|
|
22
|
+
--color: var(--primary-100);
|
|
23
|
+
}
|
|
24
|
+
:root:not([data-theme=light]) a:not([role=button]):is([aria-current], :hover, :active, :focus) {
|
|
25
|
+
--color: var(--primary-300);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
html {
|
|
29
|
+
scroll-behavior: smooth;
|
|
30
|
+
}
|
|
31
|
+
body {
|
|
32
|
+
overflow-x: hidden;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
import Base from '~/layouts/Base.astro';
|
|
4
|
+
import Header from '~/layouts/PagesHeader.astro';
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
pageContext: PageContext;
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { pageContext, title } = Astro.props as Props;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Base pageContext={pageContext} title={title}>
|
|
15
|
+
<slot name="header">
|
|
16
|
+
<Header pageContext={pageContext} />
|
|
17
|
+
</slot>
|
|
18
|
+
<slot />
|
|
19
|
+
</Base>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Categories } from '@cloudcommerce/api/types';
|
|
3
|
+
import type CmsHeader from '@@storefront/types/cms-header';
|
|
4
|
+
import type CmsContacts from '@@storefront/types/cms-contacts';
|
|
5
|
+
import type { PageContext } from '@@storefront/ssr-context';
|
|
6
|
+
import { i19buyOnWhatsApp } from '@@i18n';
|
|
7
|
+
import { getImage } from '@@storefront/ssr/image';
|
|
8
|
+
import TopBar, { Props as TopBarProps } from '@@components/TopBar.vue';
|
|
9
|
+
import TheHeader, { Props as TheHeaderProps } from '@@components/TheHeader.vue';
|
|
10
|
+
import HeaderNav from '@@components/header/HeaderNav.vue';
|
|
11
|
+
import HeaderButtons, { Props as HeaderButtonsProps } from '@@components/header/HeaderButtons.vue';
|
|
12
|
+
|
|
13
|
+
export interface Props {
|
|
14
|
+
pageContext: PageContext;
|
|
15
|
+
logoTransformOptions?: Parameters<typeof getImage>[0];
|
|
16
|
+
topBarProps?: Partial<TopBarProps>;
|
|
17
|
+
theHeaderProps?: Partial<TheHeaderProps>;
|
|
18
|
+
headerButtonsProps?: Partial<HeaderButtonsProps>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
pageContext: {
|
|
23
|
+
apiState,
|
|
24
|
+
settings,
|
|
25
|
+
cms,
|
|
26
|
+
},
|
|
27
|
+
logoTransformOptions,
|
|
28
|
+
topBarProps,
|
|
29
|
+
theHeaderProps,
|
|
30
|
+
headerButtonsProps,
|
|
31
|
+
} = Astro.props as Props;
|
|
32
|
+
const header = cms('header') as CmsHeader;
|
|
33
|
+
const contacts = cms('contacts') as CmsContacts;
|
|
34
|
+
let headerCategories: Array<{ slug: string, name: string }> = [];
|
|
35
|
+
let isCategoriesNavFull: boolean | undefined;
|
|
36
|
+
if (header.categories_list) {
|
|
37
|
+
if (header.categories_list.featured.length) {
|
|
38
|
+
// Selected categories/collections/brands
|
|
39
|
+
headerCategories = header.categories_list.featured.map((pathAndName) => {
|
|
40
|
+
const [path, name] = pathAndName.split('?');
|
|
41
|
+
return { slug: path.slice(1), name };
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (header.categories_list.random) {
|
|
45
|
+
const mainCategories: Partial<Categories>[] | undefined = apiState
|
|
46
|
+
.categories?.filter(({ parent }) => (!parent || !parent.slug));
|
|
47
|
+
if (mainCategories) {
|
|
48
|
+
for (let i = 0; i < header.categories_list.random && i < mainCategories.length; i++) {
|
|
49
|
+
if (!headerCategories.find(({ slug }) => mainCategories[i].slug === slug)) {
|
|
50
|
+
headerCategories.push({
|
|
51
|
+
slug: mainCategories[i].slug,
|
|
52
|
+
name: mainCategories[i].name,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
isCategoriesNavFull = header.categories_list.full_width;
|
|
59
|
+
}
|
|
60
|
+
const loginDrawerAdditionalLinks: HeaderButtonsProps['loginDrawerAdditionalLinks']
|
|
61
|
+
= header.drawer_links?.map(({ title, link }) => ({ href: link, innerHTML: title })) || [];
|
|
62
|
+
if (contacts.whatsapp) {
|
|
63
|
+
loginDrawerAdditionalLinks.unshift({
|
|
64
|
+
href: `https://wa.me/55${contacts.whatsapp.replace(/\D/g, '')}`,
|
|
65
|
+
innerHTML: `<i class="i-whatsapp text-lg"></i> ${i19buyOnWhatsApp}`,
|
|
66
|
+
isBlank: true,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare global {
|
|
71
|
+
var TopBarProps: TopBarProps;
|
|
72
|
+
var TheHeaderProps: TheHeaderProps;
|
|
73
|
+
var HeaderButtonsProps: HeaderButtonsProps;
|
|
74
|
+
}
|
|
75
|
+
globalThis.TopBarProps = {
|
|
76
|
+
marketingStripe: header.marketing_stripe,
|
|
77
|
+
pageLinks: header.contacts_stripe.pages,
|
|
78
|
+
hasPhoneLinks: header.contacts_stripe.phone_wpp,
|
|
79
|
+
hasNetworkLinks: header.contacts_stripe.socials,
|
|
80
|
+
contacts,
|
|
81
|
+
...topBarProps,
|
|
82
|
+
};
|
|
83
|
+
globalThis.TheHeaderProps = {
|
|
84
|
+
logo: {
|
|
85
|
+
...await getImage({
|
|
86
|
+
src: settings.logo,
|
|
87
|
+
width: 150,
|
|
88
|
+
format: 'webp',
|
|
89
|
+
quality: 90,
|
|
90
|
+
...logoTransformOptions,
|
|
91
|
+
}) as any,
|
|
92
|
+
alt: settings.name,
|
|
93
|
+
},
|
|
94
|
+
logoAltHeading: Astro.url.pathname === '/' ? 'h1' : 'h2',
|
|
95
|
+
...theHeaderProps,
|
|
96
|
+
};
|
|
97
|
+
globalThis.HeaderButtonsProps = {
|
|
98
|
+
loginDrawerAdditionalLinks,
|
|
99
|
+
...headerButtonsProps,
|
|
100
|
+
};
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
<Fragment>
|
|
104
|
+
<slot name="top-bar">
|
|
105
|
+
<TopBar {...globalThis.TopBarProps} />
|
|
106
|
+
</slot>
|
|
107
|
+
<slot name="header">
|
|
108
|
+
<TheHeader {...globalThis.TheHeaderProps}>
|
|
109
|
+
<Fragment slot="nav">
|
|
110
|
+
<HeaderNav />
|
|
111
|
+
</Fragment>
|
|
112
|
+
<Fragment slot="buttons">
|
|
113
|
+
<HeaderButtons client:idle {...globalThis.HeaderButtonsProps} />
|
|
114
|
+
</Fragment>
|
|
115
|
+
</TheHeader>
|
|
116
|
+
</slot>
|
|
117
|
+
</Fragment>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
pageContext?: PageContext;
|
|
6
|
+
}
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<main>
|
|
10
|
+
<h1>Error :/</h1>
|
|
11
|
+
<p class="instructions">
|
|
12
|
+
Check out the <code>src/pages</code> directory to get started.<br/>
|
|
13
|
+
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
14
|
+
</p>
|
|
15
|
+
</main>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { PageContext } from '@@storefront/ssr-context';
|
|
3
|
+
import api from '@cloudcommerce/api';
|
|
4
|
+
|
|
5
|
+
export interface Props {
|
|
6
|
+
pageContext: PageContext;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const products = (await api.get('products')).data.result;
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<main>
|
|
13
|
+
<h1>Welcome to <span class="text-primary">Astro</span></h1>
|
|
14
|
+
<ul role="list" class="mt-3 fs-20">
|
|
15
|
+
{products.map((product) => <li>
|
|
16
|
+
<a href={`/${product.slug}`}>{product.sku}</a>
|
|
17
|
+
</li>)}
|
|
18
|
+
</ul>
|
|
19
|
+
</main>
|