cloudcommerce 0.0.115 → 0.0.116
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 +29 -0
- 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/.eslintrc.cjs +6 -0
- package/ecomplus-stores/monocard/functions/ssr/content/contacts.json +3 -3
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +0 -7
- package/ecomplus-stores/monocard/functions/ssr/package.json +10 -4
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/img_1.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/phone-nfc.json +1 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/fluxo.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/padronagem-tilada.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/sua-logo-aqui.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +5 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/HowItWorksAccordion.vue +32 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +19 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +358 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/TheHeader.vue +40 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/TopBar.vue +10 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtonLink.vue +5 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtons.vue +59 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNav.vue +61 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNavLink.vue +5 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +58 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +18 -41
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PagesHeader.astro +51 -0
- package/{packages/storefront/src/lib → ecomplus-stores/monocard/functions/ssr/src}/main/Fallback.astro +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +63 -0
- package/{packages/storefront/src/lib → ecomplus-stores/monocard/functions/ssr/src}/main/Wildcard.astro +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +45 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +3 -3
- package/{packages/storefront/src/components/.gitkeep → ecomplus-stores/monocard/functions/ssr/src/pages/monocard.astro} +0 -0
- package/ecomplus-stores/monocard/functions/ssr/tsconfig.json +14 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/package.json +8 -8
- package/packages/api/lib/types.d.ts +14 -3
- package/packages/api/package.json +1 -1
- package/packages/api/src/types.ts +35 -12
- 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/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/lib/config.js +12 -4
- package/packages/config/lib/config.js.map +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/config.ts +12 -4
- package/packages/events/package.json +2 -2
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/modules/src/firebase/serve-modules-api.ts +1 -0
- package/packages/passport/package.json +1 -1
- package/packages/passport/src/firebase/authenticate-customer.ts +1 -1
- package/packages/passport/src/firebase/serve-passport-api.ts +2 -0
- package/packages/ssr/package.json +3 -3
- package/packages/storefront/astro.config.mjs +22 -17
- package/packages/storefront/package.json +6 -7
- package/packages/storefront/scripts/prepare-monorepo.sh +6 -0
- package/packages/storefront/src/env.d.ts +1 -1
- package/packages/storefront/src/lib/assets/pico.css +12 -11
- package/packages/storefront/src/lib/components/ADrawer.vue +33 -21
- package/packages/storefront/src/lib/components/LoginDrawer.vue +7 -13
- package/packages/storefront/src/lib/components/LoginForm.vue +3 -1
- package/packages/storefront/src/lib/layouts/Base.astro +3 -3
- package/packages/storefront/src/lib/layouts/BaseStateJson.astro +5 -0
- package/packages/storefront/src/lib/ssr-context.ts +6 -1
- package/packages/storefront/src/lib/state/customer-session.ts +1 -1
- package/packages/storefront/src/lib/types/cms-code.d.ts +1 -1
- package/packages/storefront/src/lib/types/cms-contacts.d.ts +1 -1
- package/packages/storefront/src/lib/types/cms-header.d.ts +1 -1
- package/packages/storefront/src/lib/types/cms-settings.d.ts +1 -1
- package/packages/storefront/src/lib/types/cms-social.d.ts +1 -1
- package/packages/storefront/tailwind.config.cjs +76 -1
- package/packages/storefront/tsconfig.json +4 -1
- package/packages/storefront/uno.config.ts +12 -31
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/img-placeholder.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/payments.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner1.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner2.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headless.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headphone.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/passion.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/pwa-reliable.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect89.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/ssl-safe.png +0 -0
- package/packages/storefront/content/blog.json +0 -18
- package/packages/storefront/content/brands.json +0 -24
- package/packages/storefront/content/categories.json +0 -24
- package/packages/storefront/content/code.json +0 -5
- package/packages/storefront/content/collections.json +0 -24
- package/packages/storefront/content/contacts.json +0 -13
- package/packages/storefront/content/footer.json +0 -46
- package/packages/storefront/content/header.json +0 -35
- package/packages/storefront/content/home.json +0 -45
- package/packages/storefront/content/info.json +0 -18
- package/packages/storefront/content/maintenance.json +0 -6
- package/packages/storefront/content/menu.json +0 -6
- package/packages/storefront/content/pages/contato.json +0 -6
- package/packages/storefront/content/pages/entrega.json +0 -6
- package/packages/storefront/content/pages/faq.json +0 -6
- package/packages/storefront/content/pages/pagamentos.json +0 -6
- package/packages/storefront/content/pages/privacidade.json +0 -6
- package/packages/storefront/content/pages/sobre-nos.json +0 -6
- package/packages/storefront/content/pages/termos.json +0 -6
- package/packages/storefront/content/pages/trocas.json +0 -6
- package/packages/storefront/content/posts/esta-loja-e-um-pwa.json +0 -9
- package/packages/storefront/content/products.json +0 -32
- package/packages/storefront/content/search.json +0 -8
- package/packages/storefront/content/settings.json +0 -21
- package/packages/storefront/content/social.json +0 -5
- package/packages/storefront/content/widgets/analytics.json +0 -11
- package/packages/storefront/content/widgets/compre-confie.json +0 -11
- package/packages/storefront/content/widgets/ebit.json +0 -11
- package/packages/storefront/content/widgets/fb-pixel.json +0 -12
- package/packages/storefront/content/widgets/gmc-ratings.json +0 -12
- package/packages/storefront/content/widgets/minicart.json +0 -6
- package/packages/storefront/content/widgets/offers-notification.json +0 -11
- package/packages/storefront/content/widgets/opinioes-verificadas.json +0 -18
- package/packages/storefront/content/widgets/product-card.json +0 -10
- package/packages/storefront/content/widgets/product.json +0 -13
- package/packages/storefront/content/widgets/search-engine.json +0 -8
- package/packages/storefront/content/widgets/search.json +0 -6
- package/packages/storefront/content/widgets/tag-manager.json +0 -12
- package/packages/storefront/content/widgets/tawkto.json +0 -12
- package/packages/storefront/content/widgets/trustvox.json +0 -15
- package/packages/storefront/content/widgets/user.json +0 -5
- package/packages/storefront/dist/server/assets/_...slug_.648f7d81.css +0 -4
- package/packages/storefront/dist/server/manifest.webmanifest +0 -1
- package/packages/storefront/dist/server/registerSW.js +0 -1
- package/packages/storefront/public/admin/config.json +0 -1
- package/packages/storefront/public/assets/cms-preview.css +0 -274
- package/packages/storefront/public/assets/cms.css +0 -114
- package/packages/storefront/public/assets/cvv.png +0 -0
- package/packages/storefront/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/public/assets/img-placeholder.png +0 -0
- package/packages/storefront/public/assets/payments.png +0 -0
- package/packages/storefront/public/assets/ssl-safe.png +0 -0
- package/packages/storefront/public/img/icon.png +0 -0
- package/packages/storefront/public/img/large-icon.png +0 -0
- package/packages/storefront/public/img/uploads/banner1.png +0 -0
- package/packages/storefront/public/img/uploads/banner2.png +0 -0
- package/packages/storefront/public/img/uploads/banner2.webp +0 -0
- package/packages/storefront/public/img/uploads/favicon.png +0 -0
- package/packages/storefront/public/img/uploads/headless.png +0 -0
- package/packages/storefront/public/img/uploads/headphone.png +0 -0
- package/packages/storefront/public/img/uploads/headphone.webp +0 -0
- package/packages/storefront/public/img/uploads/icon.png +0 -0
- package/packages/storefront/public/img/uploads/large-icon.png +0 -0
- package/packages/storefront/public/img/uploads/logo.png +0 -0
- package/packages/storefront/public/img/uploads/logo.webp +0 -0
- package/packages/storefront/public/img/uploads/og-image.png +0 -0
- package/packages/storefront/public/img/uploads/passion.png +0 -0
- package/packages/storefront/public/img/uploads/passion.webp +0 -0
- package/packages/storefront/public/img/uploads/pwa-reliable.png +0 -0
- package/packages/storefront/public/img/uploads/rect8589.png +0 -0
- package/packages/storefront/public/img/uploads/rect859.png +0 -0
- package/packages/storefront/public/img/uploads/rect89.png +0 -0
- package/packages/storefront/public/img/uploads/rect89.webp +0 -0
- package/packages/storefront/public/img/uploads/ssl-safe.png +0 -0
- package/packages/storefront/public/robots.txt +0 -8
- package/packages/storefront/scripts/prerelease.sh +0 -4
- package/packages/storefront/src/layouts/Pages.astro +0 -38
- package/packages/storefront/src/lib/components/TheHeader.vue +0 -49
- package/packages/storefront/src/lib/components/TopBar.vue +0 -133
- package/packages/storefront/src/lib/layouts/Checkout.astro +0 -0
- package/packages/storefront/src/lib/layouts/Pages.astro +0 -26
- package/packages/storefront/src/lib/layouts/PagesHeader.astro +0 -116
- package/packages/storefront/src/lib/main/Home.astro +0 -19
- package/packages/storefront/src/pages/[...slug].astro +0 -36
- package/packages/storefront/src/pages/app/account.astro +0 -0
- package/packages/storefront/src/pages/app/index.astro +0 -0
- package/packages/storefront/src/pages/fallback.astro +0 -19
- package/packages/storefront/src/pages/index.astro +0 -26
- package/packages/storefront/src/scripts/InlineScripts.astro +0 -11
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import PagesLayout,
|
|
3
|
-
{ Props as PagesLayoutProps } from '../lib/layouts/Pages.astro';
|
|
4
|
-
import InlineScripts from '../scripts/InlineScripts.astro';
|
|
5
|
-
|
|
6
|
-
export interface Props extends PagesLayoutProps {}
|
|
7
|
-
|
|
8
|
-
const props = Astro.props as Props;
|
|
9
|
-
const pagesLayoutProps: PagesLayoutProps = {
|
|
10
|
-
...props,
|
|
11
|
-
headerProps: {
|
|
12
|
-
...props.headerProps,
|
|
13
|
-
logoTransformOptions: {
|
|
14
|
-
quality: 80,
|
|
15
|
-
...props.headerProps?.logoTransformOptions,
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
<PagesLayout {...pagesLayoutProps}>
|
|
22
|
-
<InlineScripts slot="before-head-end" />
|
|
23
|
-
<slot />
|
|
24
|
-
</PagesLayout>
|
|
25
|
-
|
|
26
|
-
<style is:global>
|
|
27
|
-
@media only screen and (prefers-color-scheme: dark) {
|
|
28
|
-
:root:not([data-theme=light]) a:not([role=button]) {
|
|
29
|
-
--color: var(--primary-100);
|
|
30
|
-
}
|
|
31
|
-
:root:not([data-theme=light]) a:not([role=button]):is([aria-current], :hover, :active, :focus) {
|
|
32
|
-
--color: var(--primary-300);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
body {
|
|
36
|
-
overflow-x: hidden;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { toRefs, ImgHTMLAttributes } from 'vue';
|
|
3
|
-
|
|
4
|
-
export interface Props {
|
|
5
|
-
logo?: ImgHTMLAttributes;
|
|
6
|
-
gridClass?: string;
|
|
7
|
-
actionsGridClass?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
11
|
-
gridClass: 'grid grid-flow-col auto-cols-max justify-between items-center',
|
|
12
|
-
actionsGridClass: 'grid items-center text-2xl',
|
|
13
|
-
});
|
|
14
|
-
const { logo } = toRefs(props);
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<header class="header bg-surface bg-opacity-70 sticky py-1 sm:py-2">
|
|
19
|
-
<div class="container">
|
|
20
|
-
<div :class="gridClass">
|
|
21
|
-
<slot name="aside">
|
|
22
|
-
<div class="header__aside md:hidden">
|
|
23
|
-
<div class="i-bars-3-bottom-left"></div>
|
|
24
|
-
</div>
|
|
25
|
-
</slot>
|
|
26
|
-
<slot name="logo" v-bind="{ logo }">
|
|
27
|
-
<a v-if="logo" href="/" class="header__logo">
|
|
28
|
-
<component :is="logo.alt ? 'h1' : 'span'" class="m-0">
|
|
29
|
-
<img v-bind="logo" />
|
|
30
|
-
</component>
|
|
31
|
-
</a>
|
|
32
|
-
</slot>
|
|
33
|
-
<slot name="actions-grid">
|
|
34
|
-
<div :class="actionsGridClass">
|
|
35
|
-
<slot name="nav" />
|
|
36
|
-
<slot name="search" />
|
|
37
|
-
<slot name="buttons" />
|
|
38
|
-
</div>
|
|
39
|
-
</slot>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</header>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<style>
|
|
46
|
-
.header a:not(:hover) [class^="i-"] {
|
|
47
|
-
color: var(--gray-accent);
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
@@ -1,133 +0,0 @@
|
|
|
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-1"
|
|
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>
|
|
File without changes
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { PageContext } from '@@storefront/ssr-context';
|
|
3
|
-
import Base from './Base.astro';
|
|
4
|
-
import Header, { Props as HeaderProps } from './PagesHeader.astro';
|
|
5
|
-
|
|
6
|
-
export interface Props {
|
|
7
|
-
pageContext: PageContext;
|
|
8
|
-
title?: string;
|
|
9
|
-
headerProps?: HeaderProps;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const { pageContext, title, headerProps } = Astro.props as Props;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<Base pageContext={pageContext} title={title}>
|
|
16
|
-
<Fragment slot="before-head-end">
|
|
17
|
-
<slot name="before-head-end" />
|
|
18
|
-
</Fragment>
|
|
19
|
-
<slot name="header">
|
|
20
|
-
<Header pageContext={pageContext} {...headerProps} />
|
|
21
|
-
</slot>
|
|
22
|
-
<slot />
|
|
23
|
-
<Fragment slot="before-body-end">
|
|
24
|
-
<slot name="before-body-end" />
|
|
25
|
-
</Fragment>
|
|
26
|
-
</Base>
|
|
@@ -1,116 +0,0 @@
|
|
|
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';
|
|
9
|
-
import TheHeader, { Props as TheHeaderProps } from '@@components/TheHeader';
|
|
10
|
-
import LoginDrawer, { Props as LoginDrawerProps } from '@@components/LoginDrawer';
|
|
11
|
-
|
|
12
|
-
export interface Props {
|
|
13
|
-
pageContext: PageContext;
|
|
14
|
-
logoTransformOptions?: Parameters<typeof getImage>[0];
|
|
15
|
-
topBarProps?: Partial<TopBarProps>;
|
|
16
|
-
theHeaderProps?: Partial<TheHeaderProps>;
|
|
17
|
-
loginDrawerProps?: Partial<LoginDrawerProps>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const {
|
|
21
|
-
pageContext: {
|
|
22
|
-
apiState,
|
|
23
|
-
settings,
|
|
24
|
-
cms,
|
|
25
|
-
},
|
|
26
|
-
logoTransformOptions,
|
|
27
|
-
topBarProps,
|
|
28
|
-
theHeaderProps,
|
|
29
|
-
loginDrawerProps,
|
|
30
|
-
} = Astro.props as Props;
|
|
31
|
-
const header = cms('header') as CmsHeader;
|
|
32
|
-
const contacts = cms('contacts') as CmsContacts;
|
|
33
|
-
const customThemeName = settings.theme.custom || '';
|
|
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: 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 hasMegamenu: boolean | undefined = header.desktop_megamenu;
|
|
61
|
-
const isAlphabeticalOrderSubmenu: boolean | undefined = header.alphabetical_order_submenu;
|
|
62
|
-
const isFullWidthSubmenu: boolean | undefined = header.full_width_submenu;
|
|
63
|
-
const loginDrawerAdditionalLinks: LoginDrawerProps['additionalLinks'] = header.drawer_links
|
|
64
|
-
?.map(({ title, link }) => ({ href: link, innerHTML: title })) || [];
|
|
65
|
-
if (contacts.whatsapp) {
|
|
66
|
-
loginDrawerAdditionalLinks.unshift({
|
|
67
|
-
href: `https://wa.me/55${contacts.whatsapp.replace(/\D/g, '')}`,
|
|
68
|
-
innerHTML: `<i class="i-whatsapp text-lg"></i> ${i19buyOnWhatsApp}`,
|
|
69
|
-
isBlank: true,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
declare global {
|
|
74
|
-
var TopBarProps: TopBarProps;
|
|
75
|
-
var TheHeaderProps: TheHeaderProps;
|
|
76
|
-
var LoginDrawerProps: LoginDrawerProps;
|
|
77
|
-
}
|
|
78
|
-
globalThis.TopBarProps = {
|
|
79
|
-
marketingStripe: header.marketing_stripe,
|
|
80
|
-
pageLinks: header.contacts_stripe.pages,
|
|
81
|
-
hasPhoneLinks: header.contacts_stripe.phone_wpp,
|
|
82
|
-
hasNetworkLinks: header.contacts_stripe.socials,
|
|
83
|
-
contacts,
|
|
84
|
-
...topBarProps,
|
|
85
|
-
};
|
|
86
|
-
globalThis.TheHeaderProps = {
|
|
87
|
-
logo: {
|
|
88
|
-
...await getImage({
|
|
89
|
-
src: settings.logo,
|
|
90
|
-
width: 150,
|
|
91
|
-
format: 'webp',
|
|
92
|
-
quality: 90,
|
|
93
|
-
...logoTransformOptions,
|
|
94
|
-
}) as any,
|
|
95
|
-
alt: settings.name,
|
|
96
|
-
},
|
|
97
|
-
...theHeaderProps,
|
|
98
|
-
};
|
|
99
|
-
globalThis.LoginDrawerProps = {
|
|
100
|
-
additionalLinks: loginDrawerAdditionalLinks,
|
|
101
|
-
...loginDrawerProps,
|
|
102
|
-
};
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
<Fragment>
|
|
106
|
-
<slot name="top-bar">
|
|
107
|
-
<TopBar {...globalThis.TopBarProps} />
|
|
108
|
-
</slot>
|
|
109
|
-
<slot name="header">
|
|
110
|
-
<TheHeader {...globalThis.TheHeaderProps}>
|
|
111
|
-
<Fragment slot="buttons">
|
|
112
|
-
<LoginDrawer client:idle {...globalThis.LoginDrawerProps} />
|
|
113
|
-
</Fragment>
|
|
114
|
-
</TheHeader>
|
|
115
|
-
</slot>
|
|
116
|
-
</Fragment>
|
|
@@ -1,19 +0,0 @@
|
|
|
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>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
|
-
import api from '@cloudcommerce/api';
|
|
4
|
-
import WildcardMain from '@@storefront/main/Wildcard.astro';
|
|
5
|
-
import PagesLayout from '../layouts/Pages.astro';
|
|
6
|
-
|
|
7
|
-
if (String(Astro.params.slug).endsWith('.css.map')) {
|
|
8
|
-
return new Response(null, { status: 404 });
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let pageContext: PageContext;
|
|
12
|
-
let loadError: any;
|
|
13
|
-
try {
|
|
14
|
-
pageContext = await loadPageContext(Astro);
|
|
15
|
-
} catch (err) {
|
|
16
|
-
if (err.astroResponse) {
|
|
17
|
-
return err.astroResponse;
|
|
18
|
-
}
|
|
19
|
-
loadError = err;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export async function getStaticPaths() {
|
|
23
|
-
return (await api.get('products?sort=-sales&limit=4&fields=slug'))
|
|
24
|
-
.data.result.map(({ slug }) => ({ params: { slug } }));
|
|
25
|
-
}
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
<!DOCTYPE html>
|
|
29
|
-
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
30
|
-
{pageContext &&
|
|
31
|
-
<PagesLayout pageContext={pageContext}>
|
|
32
|
-
<WildcardMain pageContext={pageContext} />
|
|
33
|
-
</PagesLayout>
|
|
34
|
-
}
|
|
35
|
-
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
36
|
-
</html>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
|
-
import FallbackMain from '@@storefront/main/Fallback.astro';
|
|
4
|
-
import PagesLayout from '../layouts/Pages.astro';
|
|
5
|
-
|
|
6
|
-
let pageContext: PageContext;
|
|
7
|
-
try {
|
|
8
|
-
pageContext = await loadPageContext(Astro);
|
|
9
|
-
} catch (err) {
|
|
10
|
-
return err.astroResponse;
|
|
11
|
-
}
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<!DOCTYPE html>
|
|
15
|
-
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
16
|
-
<PagesLayout pageContext={pageContext}>
|
|
17
|
-
<FallbackMain pageContext={pageContext} />
|
|
18
|
-
</PagesLayout>
|
|
19
|
-
</html>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import loadPageContext, { PageContext } from '@@storefront/ssr-context';
|
|
3
|
-
import HomeMain from '@@storefront/main/Home.astro';
|
|
4
|
-
import PagesLayout from '../layouts/Pages.astro';
|
|
5
|
-
|
|
6
|
-
let pageContext: PageContext;
|
|
7
|
-
let loadError: any;
|
|
8
|
-
try {
|
|
9
|
-
pageContext = await loadPageContext(Astro);
|
|
10
|
-
} catch (err) {
|
|
11
|
-
if (err.astroResponse) {
|
|
12
|
-
return err.astroResponse;
|
|
13
|
-
}
|
|
14
|
-
loadError = err;
|
|
15
|
-
}
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
<!DOCTYPE html>
|
|
19
|
-
<html lang={pageContext?.lang.replace('_', '-')}>
|
|
20
|
-
{pageContext &&
|
|
21
|
-
<PagesLayout pageContext={pageContext}>
|
|
22
|
-
<HomeMain pageContext={pageContext} />
|
|
23
|
-
</PagesLayout>
|
|
24
|
-
}
|
|
25
|
-
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
26
|
-
</html>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script is:inline>
|
|
2
|
-
window.firebaseConfig = {
|
|
3
|
-
apiKey: 'AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0',
|
|
4
|
-
authDomain: 'ecom2-002.firebaseapp.com',
|
|
5
|
-
projectId: 'ecom2-002',
|
|
6
|
-
storageBucket: 'ecom2-002.appspot.com',
|
|
7
|
-
messagingSenderId: '402807248219',
|
|
8
|
-
appId: '1:402807248219:web:cf7d57759751e74776367e',
|
|
9
|
-
measurementId: 'G-SC592CE0GB',
|
|
10
|
-
};
|
|
11
|
-
</script>
|