cloudcommerce 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/ecomplus-stores/barra-doce/conf/firebase.json +7 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/astro.config.mjs +18 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/3.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/4.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/5.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/dos.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/uno.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.md +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.md +20 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.md +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/brands.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/categories.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/collections.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/search.json +7 -0
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +10 -9
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +23 -9
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/BannersGrid.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/BlogPosts.vue +88 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.vue +49 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +14 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Collapse.vue +4 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ContentEntry.vue +23 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/DocBanners.vue +26 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +5 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PageTitle.vue +43 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Pagination.vue +67 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +3 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +4 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +34 -18
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductSpecifications.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchFilters.vue +122 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +97 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +169 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +10 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +61 -63
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +7 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/env.d.ts +4 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +4 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +28 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Main.astro +26 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/content/Hero.astro +33 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/{Sections.astro → content/Sections.astro} +27 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +35 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +6 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +24 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/[page].astro +71 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/_blog-pages.ts +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +9 -2
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/config/astro/context-directive.mjs +16 -2
- package/packages/storefront/config/astro/index.d.ts +3 -1
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/components/SharedData.astro +1 -1
- package/packages/storefront/src/lib/composables/use-shared-data.ts +2 -1
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/.gitkeep +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.astro +0 -44
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +0 -37
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +0 -18
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.0.1](https://github.com/ecomplus/cloud-commerce/compare/v2.0.0...v2.0.1) (2024-01-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **storefront:** Shared data scripts should be async to perform well (reduced TBT) ([ce8ce82](https://github.com/ecomplus/cloud-commerce/commit/ce8ce820f624f489388628c816c16c9ca617fbdf))
|
|
11
|
+
* **storefront:** Updating custom `client-context=` Astro directive to support awaiting shared data ([cf16fa6](https://github.com/ecomplus/cloud-commerce/commit/cf16fa6a74ef6bb87fd5f06485f0bea7640adc5f))
|
|
12
|
+
|
|
5
13
|
## [2.0.0](https://github.com/ecomplus/cloud-commerce/compare/v0.41.6...v2.0.0) (2024-01-05)
|
|
6
14
|
|
|
7
15
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/passport": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^2.0.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^2.0.0",
|
|
20
|
+
"@cloudcommerce/passport": "^2.0.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { defineConfig } from 'astro/config';
|
|
2
|
+
import { astroConfig } from '@cloudcommerce/storefront/astro.config.mjs';
|
|
3
|
+
import { FontaineTransform } from 'fontaine';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const fontaineTransform = FontaineTransform.vite({
|
|
6
|
+
fallbacks: ['Inter', 'Arial'],
|
|
7
|
+
resolvePath: (id) => new URL(`./public${id}`, import.meta.url),
|
|
8
|
+
});
|
|
9
|
+
const __fontaineTransform = fontaineTransform.transform;
|
|
10
|
+
fontaineTransform.transform = async (src, id) => {
|
|
11
|
+
const r = await __fontaineTransform(src, id);
|
|
12
|
+
if (r?.code) {
|
|
13
|
+
r.code = r.code.replace('local("Inter");', 'local("Inter"),local("Inter-Regular");');
|
|
14
|
+
}
|
|
15
|
+
return r;
|
|
16
|
+
};
|
|
17
|
+
astroConfig.vite.plugins.push(fontaineTransform);
|
|
18
|
+
|
|
19
|
+
export default defineConfig(astroConfig);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Blog 3"
|
|
3
|
+
date: "12/08/2023"
|
|
4
|
+
thumbnail: "https://picsum.photos/750/500?3"
|
|
5
|
+
author: "Fulano de Tal"
|
|
6
|
+
description: "Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve pectus verba, ad incerti Hyrie."
|
|
7
|
+
meta_title: ""
|
|
8
|
+
meta_description: ""
|
|
9
|
+
hero:
|
|
10
|
+
slides: []
|
|
11
|
+
sections: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Tendere quoque liquidus
|
|
15
|
+
|
|
16
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
17
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
18
|
+
standi summa.
|
|
19
|
+
|
|
20
|
+
1. Contenta adpellatque temptata vocabula
|
|
21
|
+
2. Caesae captatus quas Oenidae harenae
|
|
22
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
23
|
+
4. Fuerat operis evanuit harenosae illo
|
|
24
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Blog 4"
|
|
3
|
+
date: ""
|
|
4
|
+
thumbnail: "https://picsum.photos/750/500?4"
|
|
5
|
+
author: ""
|
|
6
|
+
description: ""
|
|
7
|
+
meta_title: ""
|
|
8
|
+
meta_description: ""
|
|
9
|
+
hero:
|
|
10
|
+
slides: []
|
|
11
|
+
sections: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Tendere quoque liquidus
|
|
15
|
+
|
|
16
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
17
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
18
|
+
standi summa.
|
|
19
|
+
|
|
20
|
+
1. Contenta adpellatque temptata vocabula
|
|
21
|
+
2. Caesae captatus quas Oenidae harenae
|
|
22
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
23
|
+
4. Fuerat operis evanuit harenosae illo
|
|
24
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Blog 5"
|
|
3
|
+
date: ""
|
|
4
|
+
thumbnail: "https://picsum.photos/750/500?5"
|
|
5
|
+
author: ""
|
|
6
|
+
description: ""
|
|
7
|
+
meta_title: ""
|
|
8
|
+
meta_description: ""
|
|
9
|
+
hero:
|
|
10
|
+
slides: []
|
|
11
|
+
sections: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Tendere quoque liquidus
|
|
15
|
+
|
|
16
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
17
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
18
|
+
standi summa.
|
|
19
|
+
|
|
20
|
+
1. Contenta adpellatque temptata vocabula
|
|
21
|
+
2. Caesae captatus quas Oenidae harenae
|
|
22
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
23
|
+
4. Fuerat operis evanuit harenosae illo
|
|
24
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Blog 2"
|
|
3
|
+
date: "12/08/2022"
|
|
4
|
+
thumbnail: "https://picsum.photos/750/500?2"
|
|
5
|
+
author: ""
|
|
6
|
+
description: "Lorem ipsum dolor sit amet"
|
|
7
|
+
meta_title: ""
|
|
8
|
+
meta_description: ""
|
|
9
|
+
hero:
|
|
10
|
+
slides: []
|
|
11
|
+
sections: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Tendere quoque liquidus
|
|
15
|
+
|
|
16
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
17
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
18
|
+
standi summa.
|
|
19
|
+
|
|
20
|
+
1. Contenta adpellatque temptata vocabula
|
|
21
|
+
2. Caesae captatus quas Oenidae harenae
|
|
22
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
23
|
+
4. Fuerat operis evanuit harenosae illo
|
|
24
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Blog 1"
|
|
3
|
+
date: ""
|
|
4
|
+
thumbnail: "https://picsum.photos/750?1"
|
|
5
|
+
author: ""
|
|
6
|
+
description: "Lorem ipsum dolor sit amet"
|
|
7
|
+
meta_title: ""
|
|
8
|
+
meta_description: ""
|
|
9
|
+
hero:
|
|
10
|
+
slides: []
|
|
11
|
+
sections: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Tendere quoque liquidus
|
|
15
|
+
|
|
16
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
17
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
18
|
+
standi summa.
|
|
19
|
+
|
|
20
|
+
1. Contenta adpellatque temptata vocabula
|
|
21
|
+
2. Caesae captatus quas Oenidae harenae
|
|
22
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
23
|
+
4. Fuerat operis evanuit harenosae illo
|
|
24
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Privacidade e termos de serviço"
|
|
3
|
+
meta_title: ""
|
|
4
|
+
meta_description: ""
|
|
5
|
+
hero:
|
|
6
|
+
slides: []
|
|
7
|
+
sections: []
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Tendere quoque liquidus
|
|
11
|
+
|
|
12
|
+
Lorem markdownum renascitur cineres, sed surgit muneribusque vidit laudatve
|
|
13
|
+
pectus verba, ad incerti Hyrie. Amici urbes micantes serpens incendia, neve opus
|
|
14
|
+
standi summa.
|
|
15
|
+
|
|
16
|
+
1. Contenta adpellatque temptata vocabula
|
|
17
|
+
2. Caesae captatus quas Oenidae harenae
|
|
18
|
+
3. Coronida elabique retinebat sinat et ceditis vel
|
|
19
|
+
4. Fuerat operis evanuit harenosae illo
|
|
20
|
+
5. Hic possis ignotae terris Perseus aliquid
|
|
@@ -17,17 +17,18 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.
|
|
20
|
+
"@cloudcommerce/api": "^2.0.0",
|
|
21
|
+
"@cloudcommerce/firebase": "^2.0.0",
|
|
22
|
+
"@cloudcommerce/ssr": "^2.0.0",
|
|
23
23
|
"@headlessui/vue": "^1.7.16"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@cloudcommerce/i18n": "^0.
|
|
27
|
-
"@cloudcommerce/storefront": "^0.
|
|
28
|
-
"@cloudcommerce/types": "^0.
|
|
29
|
-
"@fontsource/croissant-one": "^5.0.
|
|
30
|
-
"@iconify-json/mingcute": "^1.1.
|
|
31
|
-
"
|
|
26
|
+
"@cloudcommerce/i18n": "^2.0.0",
|
|
27
|
+
"@cloudcommerce/storefront": "^2.0.0",
|
|
28
|
+
"@cloudcommerce/types": "^2.0.0",
|
|
29
|
+
"@fontsource/croissant-one": "^5.0.18",
|
|
30
|
+
"@iconify-json/mingcute": "^1.1.15",
|
|
31
|
+
"fontaine": "^0.4.1",
|
|
32
|
+
"photoswipe": "^5.4.3"
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-brand: "Croissant One";
|
|
2
|
+
--font-brand: "Croissant One", "Croissant One fallback";
|
|
3
3
|
}
|
|
4
4
|
html {
|
|
5
5
|
scroll-behavior: smooth;
|
|
6
6
|
}
|
|
7
7
|
body {
|
|
8
8
|
overflow-x: hidden;
|
|
9
|
+
overflow-y: scroll;
|
|
10
|
+
min-height: 100dvh;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
9
13
|
}
|
|
10
14
|
a, button, button > *, [role=button], [role=button] > * {
|
|
11
15
|
transition: background-color var(--transition),
|
|
@@ -14,36 +18,46 @@ a, button, button > *, [role=button], [role=button] > * {
|
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
.ui-link {
|
|
17
|
-
@apply
|
|
21
|
+
@apply font-medium text-primary underline underline-offset-4
|
|
18
22
|
hover:text-primary-bold active:text-primary-subtle;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
[class*=ui-btn] {
|
|
22
|
-
@apply
|
|
23
|
-
border-
|
|
26
|
+
@apply inline-block text-base font-medium px-4 py-1.5 rounded
|
|
27
|
+
border-3 border-transparent underline-offset-4 decoration-2
|
|
28
|
+
shadow focus:ring-1 focus:ring-offset-1 active:ring-2;
|
|
24
29
|
}
|
|
25
30
|
.ui-btn-sm {
|
|
26
31
|
@apply text-sm px-3 py-1.5 border-1;
|
|
27
32
|
}
|
|
28
33
|
.ui-btn-lg {
|
|
29
|
-
@apply text-lg font-bold px-6 py-3 lg:text-base lg:py-2
|
|
34
|
+
@apply text-lg font-bold px-6 py-3 lg:text-base lg:py-2 active:ring-3;
|
|
30
35
|
}
|
|
31
36
|
.ui-btn-primary {
|
|
32
|
-
@apply primary
|
|
37
|
+
@apply from-primary-400 to-primary bg-gradient-to-br text-primary-50
|
|
38
|
+
border-primary hover:text-white hover:border-primary-700
|
|
39
|
+
ring-primary/30;
|
|
33
40
|
}
|
|
34
41
|
.ui-btn-secondary {
|
|
35
42
|
@apply bg-secondary-100/50 text-secondary border-secondary
|
|
36
|
-
hover:
|
|
43
|
+
hover:primary ring-secondary/30;
|
|
37
44
|
}
|
|
38
45
|
.ui-btn-contrast {
|
|
39
|
-
@apply
|
|
46
|
+
@apply from-white to-primary-50 bg-gradient-to-br text-primary-600
|
|
47
|
+
border-primary-100 hover:bg-primary-100 hover:text-primary-700
|
|
48
|
+
hover:border-primary-200 ring-primary-100/30;
|
|
49
|
+
}
|
|
50
|
+
.ui-btn-danger {
|
|
51
|
+
@apply bg-danger-50 text-danger-700 border-danger-100
|
|
52
|
+
hover:bg-danger-600 hover:text-white
|
|
53
|
+
hover:border-danger-600 ring-danger-600/30;
|
|
40
54
|
}
|
|
41
55
|
|
|
42
56
|
.ui-text-brand, .ui-title {
|
|
43
57
|
@apply font-brand font-normal not-italic;
|
|
44
58
|
}
|
|
45
59
|
.ui-title {
|
|
46
|
-
@apply
|
|
60
|
+
@apply text-3xl xl:text-5xl;
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
[class*=ui-badge] {
|
|
@@ -13,7 +13,7 @@ const { banners } = Astro.props;
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<section class="ui-section">
|
|
16
|
-
<ul class="flex flex-wrap lg:flex-nowrap
|
|
16
|
+
<ul class="flex flex-wrap gap-4 lg:flex-nowrap">
|
|
17
17
|
{banners.map((banner) => (
|
|
18
18
|
<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
|
|
19
19
|
<Banner {...banner}>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="mb-9 mt-6 md:mb-12 md:mt-8">
|
|
3
|
+
<section class="ui-section">
|
|
4
|
+
<article v-if="featured" class="mb-9 flex flex-wrap gap-x-8 lg:flex-nowrap">
|
|
5
|
+
<a :href="`/posts/${featured.slug}`" class="w-full max-w-[600px]">
|
|
6
|
+
<AImg
|
|
7
|
+
v-if="featured.thumbnail"
|
|
8
|
+
:picture="{ url: featured.thumbnail, size: '750x500' }"
|
|
9
|
+
class="aspect-[3/2] w-full max-w-[600px] rounded object-cover"
|
|
10
|
+
/>
|
|
11
|
+
</a>
|
|
12
|
+
<div class="prose grow pt-5">
|
|
13
|
+
<small class="text-base-500 font-semibold uppercase">Blog</small>
|
|
14
|
+
<a :href="`/posts/${featured.slug}`" class="not-prose">
|
|
15
|
+
<h1 class="ui-title mb-4 mt-2">
|
|
16
|
+
{{ featured.title }}
|
|
17
|
+
</h1>
|
|
18
|
+
</a>
|
|
19
|
+
<p class="text-xl">
|
|
20
|
+
{{ featured.description }}
|
|
21
|
+
</p>
|
|
22
|
+
<span v-if="featured.date" class="text-base-600 mr-4">
|
|
23
|
+
{{ featured.date }}
|
|
24
|
+
</span>
|
|
25
|
+
<em v-if="featured.author" class="text-base-600">
|
|
26
|
+
--- {{ featured.author }}
|
|
27
|
+
</em>
|
|
28
|
+
<div class="not-prose mt-5">
|
|
29
|
+
<a :href="`/posts/${featured.slug}`" class="ui-btn-lg ui-btn-primary">
|
|
30
|
+
<i class="i-chevron-right mr-1"></i>
|
|
31
|
+
{{ $t.i19seeMore }}
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</article>
|
|
36
|
+
<ul class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
|
|
37
|
+
<li v-for="(post, i) in gridPosts" :key="i">
|
|
38
|
+
<article>
|
|
39
|
+
<a :href="`/posts/${post.slug}`">
|
|
40
|
+
<AImg
|
|
41
|
+
v-if="post.thumbnail"
|
|
42
|
+
:picture="{ url: post.thumbnail, size: '750x500' }"
|
|
43
|
+
class="aspect-[3/2] w-full rounded object-cover"
|
|
44
|
+
/>
|
|
45
|
+
<div class="text-base-700 px-3 pt-4">
|
|
46
|
+
<h3 class="text-base-800 mb-1 text-xl font-medium">
|
|
47
|
+
{{ post.title }}
|
|
48
|
+
</h3>
|
|
49
|
+
<p>{{ post.description }}</p>
|
|
50
|
+
<small v-if="post.date" class="text-base-500 mt-1 block">
|
|
51
|
+
{{ post.date }}
|
|
52
|
+
</small>
|
|
53
|
+
</div>
|
|
54
|
+
</a>
|
|
55
|
+
</article>
|
|
56
|
+
</li>
|
|
57
|
+
</ul>
|
|
58
|
+
</section>
|
|
59
|
+
<section v-if="totalPages > 1" class="ui-section">
|
|
60
|
+
<Pagination
|
|
61
|
+
:page="page"
|
|
62
|
+
:total-pages="totalPages"
|
|
63
|
+
is-url-path
|
|
64
|
+
/>
|
|
65
|
+
</section>
|
|
66
|
+
</article>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import Pagination from '~/components/Pagination.vue';
|
|
71
|
+
|
|
72
|
+
export interface Props {
|
|
73
|
+
page: number;
|
|
74
|
+
totalPages: number;
|
|
75
|
+
posts: Array<{
|
|
76
|
+
slug: string;
|
|
77
|
+
title?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
author?: string;
|
|
80
|
+
thumbnail?: string;
|
|
81
|
+
date?: string;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const props = defineProps<Props>();
|
|
86
|
+
const featured = computed(() => props.posts[0]);
|
|
87
|
+
const gridPosts = computed(() => props.posts.slice(1));
|
|
88
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section v-if="breadcrumbs.length > 1" class="ui-section-slim">
|
|
3
|
+
<nav aria-label="Breadcrumb" class="w-full overflow-hidden text-lg md:text-sm">
|
|
4
|
+
<ol class="text-base-600 flex items-center gap-1">
|
|
5
|
+
<li>
|
|
6
|
+
<a href="/" class="hover:text-primary">
|
|
7
|
+
<span class="sr-only">{{ $t.i19home }}</span>
|
|
8
|
+
<i class="i-home"></i>
|
|
9
|
+
</a>
|
|
10
|
+
</li>
|
|
11
|
+
<template v-for="({ name, link }, i) in breadcrumbs" :key="i">
|
|
12
|
+
<template v-if="i + 1 < breadcrumbs.length">
|
|
13
|
+
<li class="text-base-300">
|
|
14
|
+
<i class="i-chevron-right"></i>
|
|
15
|
+
</li>
|
|
16
|
+
<li class="whitespace-nowrap">
|
|
17
|
+
<a :href="link" class="hover:text-primary">{{ name }}</a>
|
|
18
|
+
</li>
|
|
19
|
+
</template>
|
|
20
|
+
<template v-else>
|
|
21
|
+
<li class="text-base-300 hidden lg:block">
|
|
22
|
+
<i class="i-chevron-right"></i>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="hidden truncate lg:block">
|
|
25
|
+
<span class="text-base-500">{{ name }}</span>
|
|
26
|
+
</li>
|
|
27
|
+
</template>
|
|
28
|
+
</template>
|
|
29
|
+
</ol>
|
|
30
|
+
</nav>
|
|
31
|
+
</section>
|
|
32
|
+
<script
|
|
33
|
+
v-if="inlineJSONLd"
|
|
34
|
+
type="application/ld+json"
|
|
35
|
+
v-html="inlineJSONLd"
|
|
36
|
+
></script>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import {
|
|
41
|
+
type Props as UseBreadcrumbsProps,
|
|
42
|
+
useBreadcrumbs,
|
|
43
|
+
} from '@@sf/composables/use-breadcrumbs';
|
|
44
|
+
|
|
45
|
+
export interface Props extends UseBreadcrumbsProps {}
|
|
46
|
+
|
|
47
|
+
const props = defineProps<Props>();
|
|
48
|
+
const { breadcrumbs, inlineJSONLd } = await useBreadcrumbs(props);
|
|
49
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<aside class="flex h-screen flex-col bg-white">
|
|
3
|
-
<header class="z-10 flex items-center justify-end gap-3
|
|
4
|
-
py-4 shadow ring-1 ring-black/5">
|
|
3
|
+
<header class="z-10 flex items-center justify-end gap-3
|
|
4
|
+
px-6 py-4 shadow ring-1 ring-black/5">
|
|
5
5
|
<span class="text-base-600 text-right text-base font-medium">
|
|
6
6
|
{{ $t.i19myShoppingCart }}
|
|
7
7
|
</span>
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<article class="flex min-h-screen flex-col justify-end">
|
|
3
|
+
<section class="bg-base-50">
|
|
4
|
+
<div class="ui-section flex flex-wrap
|
|
5
|
+
items-center justify-center gap-6 lg:gap-12">
|
|
6
|
+
<a href="/">
|
|
7
|
+
<slot name="logo" />
|
|
8
|
+
</a>
|
|
9
|
+
<div class="flex items-center gap-2">
|
|
10
|
+
<i class="i-shield-check-solid bg-success-400 m-0 text-3xl"></i>
|
|
11
|
+
<span class="text-base-600 text-base">
|
|
12
|
+
{{ $t.i19safeBuy }}
|
|
13
|
+
</span>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</section>
|
|
3
17
|
<section class="grow">
|
|
4
18
|
<article id="storefront-app"></article>
|
|
5
19
|
</section>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<details class="[&_i]:open
|
|
2
|
+
<details class="group my-4 md:my-5 [&_i]:open:-rotate-90">
|
|
3
3
|
<summary role="button" class="text-base-700 hover:text-base-800
|
|
4
|
-
[&>i]:hover:text-primary
|
|
5
|
-
|
|
6
|
-
<i class="i-chevron-
|
|
4
|
+
[&>i]:hover:text-primary list-none text-2xl font-medium
|
|
5
|
+
lowercase group-open:mb-3">
|
|
6
|
+
<i class="i-chevron-right mr-1 rotate-90"></i>
|
|
7
7
|
<span>{{ title }}</span>
|
|
8
8
|
</summary>
|
|
9
9
|
<slot />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="ui-section">
|
|
3
|
+
<article class="prose">
|
|
4
|
+
<h1 class="ui-title not-prose my-4">{{ title }}</h1>
|
|
5
|
+
<ContentClearfix :html="html" />
|
|
6
|
+
</article>
|
|
7
|
+
</section>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { micromark } from 'micromark';
|
|
12
|
+
import ContentClearfix from '@@sf/components/ContentClearfix.vue';
|
|
13
|
+
|
|
14
|
+
export interface Props {
|
|
15
|
+
title: string;
|
|
16
|
+
markdown: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const props = defineProps<Props>();
|
|
20
|
+
const html = computed(() => micromark(props.markdown, {
|
|
21
|
+
allowDangerousHtml: true,
|
|
22
|
+
}));
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section v-if="pictures.length" class="ui-section">
|
|
3
|
+
<ul class="flex flex-wrap gap-4 lg:flex-nowrap">
|
|
4
|
+
<li
|
|
5
|
+
v-for="(picture, i) in pictures" :key="i"
|
|
6
|
+
class="lg:flex-1 [&_img]:w-full [&_img]:object-cover"
|
|
7
|
+
>
|
|
8
|
+
<AImg :picture="picture" />
|
|
9
|
+
</li>
|
|
10
|
+
</ul>
|
|
11
|
+
</section>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { Categories, Brands, Collections } from '@cloudcommerce/api/types';
|
|
16
|
+
|
|
17
|
+
export interface Props {
|
|
18
|
+
apiDoc?: Partial<Categories | Brands | Collections>;
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
23
|
+
apiDoc: () => globalThis.$storefront.apiContext?.doc as Categories,
|
|
24
|
+
});
|
|
25
|
+
const pictures = computed(() => props.apiDoc.pictures || []);
|
|
26
|
+
</script>
|