fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.6
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/astro.config.ts +1 -7
- package/cloudcannon.config.yml +269 -0
- package/package.json +1 -1
- package/src/blocks/Banner.astro +13 -15
- package/src/blocks/Colleagues1.astro +73 -0
- package/src/blocks/Contact1.astro +100 -0
- package/src/blocks/Content1.astro +79 -0
- package/src/blocks/Content2.astro +94 -0
- package/src/blocks/Content3.astro +70 -0
- package/src/blocks/Content4.astro +75 -0
- package/src/blocks/Cta1.astro +73 -0
- package/src/blocks/Feature1.astro +61 -0
- package/src/blocks/Features1.astro +66 -0
- package/src/blocks/Footer.astro +36 -68
- package/src/blocks/Header.astro +150 -3
- package/src/blocks/Hero1.astro +74 -0
- package/src/blocks/Intro1.astro +70 -0
- package/src/blocks/Jobs1.astro +73 -0
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +90 -0
- package/src/blocks/Reviews1.astro +79 -0
- package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
- package/src/components/Badge.astro +10 -18
- package/src/components/Badges.astro +12 -35
- package/src/components/Block.astro +30 -0
- package/src/components/Blocks.astro +26 -0
- package/src/components/Button.astro +11 -25
- package/src/components/Buttons.astro +12 -43
- package/src/components/Card.astro +8 -150
- package/src/components/Cart.astro +6 -11
- package/src/components/CartSummary.astro +3 -3
- package/src/components/Channel.astro +5 -14
- package/src/components/Container.astro +25 -0
- package/src/components/Drawer.astro +55 -117
- package/src/components/DrawerOld.astro +143 -0
- package/src/components/Element.astro +2 -0
- package/src/components/Form.astro +3 -1
- package/src/components/Grid.astro +39 -0
- package/src/components/Group.astro +25 -0
- package/src/components/Head.astro +18 -32
- package/src/components/Header.astro +8 -105
- package/src/components/Heading.astro +34 -71
- package/src/components/Icon.astro +5 -4
- package/src/components/Image.astro +15 -50
- package/src/components/Layout.astro +35 -0
- package/src/components/Link.astro +12 -18
- package/src/components/Links.astro +14 -35
- package/src/components/Logo.astro +26 -15
- package/src/components/Masonry.astro +42 -0
- package/src/components/Menu.astro +17 -38
- package/src/components/Menus.astro +20 -0
- package/src/components/Navigation.astro +39 -0
- package/src/components/Panel.astro +25 -0
- package/src/components/Paragraph.astro +24 -7
- package/src/components/Price.astro +4 -4
- package/src/components/Prose.astro +47 -130
- package/src/components/Rating.astro +24 -75
- package/src/components/Search.astro +5 -4
- package/src/components/Section.astro +20 -29
- package/src/components/Sidebar.astro +18 -69
- package/src/components/Social.astro +9 -2
- package/src/components/Stack.astro +25 -0
- package/src/components/Tagline.astro +21 -31
- package/src/components/Toc.astro +22 -21
- package/src/components/Writeup.astro +33 -82
- package/src/components/_Author.astro +90 -0
- package/src/components/_Header.astro +129 -0
- package/src/components/_Image.astro +79 -0
- package/src/components/_Prose copy.astro +172 -0
- package/src/components/_Sidebar copy.astro +87 -0
- package/src/content/config.ts +2 -29
- package/src/content/layouts/base.yml +42 -80
- package/src/content/pages/categories/category.md +7 -0
- package/src/content/{docs → pages/docs}/_internationalization.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/images.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_card.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_dialog.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_drawer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_localeswitcher.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_tagline.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_toggle.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/avatar.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badge.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badges.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/button.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/buttons.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channel.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channels.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/checkbox.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/code.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/heading.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/icon.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/image.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/input.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/label.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/link.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/links.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/list.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/logo.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/menu.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/prose.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/rating.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/section.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/select.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/social.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/socials.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/table.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/tagline.mdx +1 -0
- package/src/content/pages/docs/components/text.mdx +48 -0
- package/src/content/{docs → pages/docs}/components/textarea.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/themer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components.mdx +2 -4
- package/src/content/{docs → pages/docs}/customization.mdx +1 -0
- package/src/content/{docs → pages/docs}/frameworks.mdx +1 -0
- package/src/content/{docs → pages/docs}/generating-pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/index.mdx +2 -4
- package/src/content/{docs → pages/docs}/installation.mdx +1 -0
- package/src/content/{docs → pages/docs}/layouts.mdx +1 -0
- package/src/content/pages/index.mdx +20 -28
- package/src/content/{categories/mugs.md → pages/posts/post.md} +1 -1
- package/src/content/{products → pages/products}/product.md +4 -4
- package/src/css/theme.css +2 -0
- package/src/images/favicon/android-chrome-192x192.png +0 -0
- package/src/images/favicon/android-chrome-512x512.png +0 -0
- package/src/images/favicon/apple-touch-icon.png +0 -0
- package/src/images/favicon/browserconfig.xml +9 -0
- package/src/images/favicon/favicon-16x16.png +0 -0
- package/src/images/favicon/favicon-32x32.png +0 -0
- package/src/images/favicon/favicon-48x48.png +0 -0
- package/src/images/favicon/favicon.ico +0 -0
- package/src/images/favicon/favicon.svg +16 -0
- package/src/images/favicon/manifest.webmanifest +30 -0
- package/src/images/favicon/mstile-150x150.png +0 -0
- package/src/images/favicon/safari-pinned-tab.svg +16 -0
- package/src/images/favicon/yandex-browser-50x50.png +0 -0
- package/src/images/favicon/yandex-browser-manifest.json +9 -0
- package/src/integration/index.ts +48 -17
- package/src/layouts/{CategoryLayout.astro → Category.astro} +21 -15
- package/src/layouts/Doc.astro +70 -0
- package/src/layouts/Job.astro +62 -0
- package/src/layouts/Jobs.astro +72 -0
- package/src/layouts/Page.astro +29 -0
- package/src/layouts/Post.astro +52 -0
- package/src/layouts/{ProductLayout.astro → Product.astro} +25 -11
- package/src/pages/[...page].astro +36 -4
- package/src/pages/test.astro +32 -2
- package/src/schemas/components/avatar.ts +4 -1
- package/src/schemas/components/badge.ts +16 -11
- package/src/schemas/components/block.ts +61 -0
- package/src/schemas/components/button.ts +14 -19
- package/src/schemas/components/channel.ts +15 -9
- package/src/schemas/components/footer.ts +15 -14
- package/src/schemas/components/head.ts +17 -0
- package/src/schemas/components/header.ts +19 -16
- package/src/schemas/components/heading.ts +7 -1
- package/src/schemas/components/icon.ts +7 -1
- package/src/schemas/components/image.ts +38 -21
- package/src/schemas/components/link.ts +10 -16
- package/src/schemas/components/logo.ts +12 -2
- package/src/schemas/components/menu.ts +12 -13
- package/src/schemas/components/navigation.ts +10 -0
- package/src/schemas/components/paragraph.ts +9 -0
- package/src/schemas/components/price.ts +9 -0
- package/src/schemas/components/rating.ts +8 -13
- package/src/schemas/components/sidebar.ts +14 -12
- package/src/schemas/components/social.ts +16 -1
- package/src/schemas/components/tagline.ts +7 -1
- package/src/schemas/imageSchema.ts +33 -4
- package/src/schemas/page.ts +40 -0
- package/src/types/global-props.ts +0 -9
- package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
- package/src/utils/getHref.ts +4 -20
- package/tailwind.config.ts +4 -0
- package/tsconfig.json +1 -3
- package/example.svelte +0 -0
- package/parent.svelte +0 -0
- package/src/App.svelte +0 -0
- package/src/blocks/Categories.astro +0 -12
- package/src/blocks/Colleagues.astro +0 -12
- package/src/blocks/Contact.astro +0 -117
- package/src/blocks/Content.astro +0 -130
- package/src/blocks/Cta.astro +0 -13
- package/src/blocks/Excerpt.astro +0 -12
- package/src/blocks/Features.astro +0 -11
- package/src/blocks/Intro.astro +0 -101
- package/src/blocks/Jobs.astro +0 -12
- package/src/blocks/Posts.astro +0 -11
- package/src/blocks/Prices.astro +0 -24
- package/src/blocks/Product.astro +0 -89
- package/src/blocks/Products.astro +0 -101
- package/src/blocks/Reviews.astro +0 -12
- package/src/blocks/_Contact.astro +0 -112
- package/src/components/CartForm.astro +0 -120
- package/src/components/CartList.astro +0 -122
- package/src/components/Lead.astro +0 -46
- package/src/components/ProductCard.astro +0 -52
- package/src/components/Text.astro +0 -43
- package/src/components/_CartList backup.astro +0 -125
- package/src/components/_CartList copy.astro +0 -213
- package/src/components/_CartListSimple.astro +0 -148
- package/src/components/sections.astro +0 -28
- package/src/content/docs/components/lead.mdx +0 -49
- package/src/content/docs/components/paragraph.mdx +0 -49
- package/src/content/layouts/docs.yml +0 -70
- package/src/layouts/DocLayout.astro +0 -17
- package/src/layouts/Layout.astro +0 -79
- package/src/layouts/PageLayout.astro +0 -20
- package/src/layouts/PostLayout.astro +0 -20
- package/src/loaders/imageLoader.ts +0 -26
- package/src/pages/[...category].astro +0 -17
- package/src/pages/[...doc].astro +0 -17
- package/src/pages/[...post].astro +0 -17
- package/src/pages/[...product].astro +0 -17
- package/src/schemas/archive/_pageSchema.ts +0 -94
- package/src/schemas/categorySchema.ts +0 -16
- package/src/schemas/components/avatars.ts +0 -4
- package/src/schemas/components/banner.ts +0 -3
- package/src/schemas/components/buttons.ts +0 -4
- package/src/schemas/components/card.ts +0 -43
- package/src/schemas/components/cards.ts +0 -4
- package/src/schemas/components/channels.ts +0 -4
- package/src/schemas/components/global.ts +0 -16
- package/src/schemas/components/links.ts +0 -4
- package/src/schemas/components/list.ts +0 -3
- package/src/schemas/components/section.ts +0 -17
- package/src/schemas/components/sections.ts +0 -3
- package/src/schemas/components/socials.ts +0 -4
- package/src/schemas/components/subheader.ts +0 -10
- package/src/schemas/components/text.ts +0 -3
- package/src/schemas/components/themer.ts +0 -3
- package/src/schemas/components/toc.ts +0 -3
- package/src/schemas/components/writeup.ts +0 -20
- package/src/schemas/docSchema.ts +0 -10
- package/src/schemas/fields/categories.ts +0 -3
- package/src/schemas/fields/description.ts +0 -3
- package/src/schemas/fields/href.ts +0 -3
- package/src/schemas/fields/image.ts +0 -24
- package/src/schemas/fields/images.ts +0 -4
- package/src/schemas/fields/order.ts +0 -3
- package/src/schemas/fields/price.ts +0 -3
- package/src/schemas/fields/products.ts +0 -5
- package/src/schemas/fields/seo.ts +0 -12
- package/src/schemas/fields/soldout.ts +0 -3
- package/src/schemas/fields/title.ts +0 -3
- package/src/schemas/fields/variants.ts +0 -3
- package/src/schemas/layoutSchema.ts +0 -28
- package/src/schemas/pageSchema.ts +0 -20
- package/src/schemas/postSchema.ts +0 -16
- package/src/schemas/productSchema.ts +0 -22
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import type { CollectionEntry } from 'astro:content'
|
|
4
|
+
import { getCollection } from 'astro:content'
|
|
5
|
+
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
|
+
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
7
|
+
import Intro1 from 'fulldev-ui/blocks/Intro1.astro'
|
|
8
|
+
import Jobs1 from 'fulldev-ui/blocks/Jobs1.astro'
|
|
9
|
+
import Container from 'fulldev-ui/components/Container.astro'
|
|
10
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
11
|
+
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
12
|
+
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
13
|
+
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
14
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
15
|
+
|
|
16
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
17
|
+
slug: CollectionEntry<'pages'>['slug']
|
|
18
|
+
render: CollectionEntry<'pages'>['render']
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { slug, header, sidebar, render, title, description, footer } =
|
|
22
|
+
Astro.props
|
|
23
|
+
|
|
24
|
+
const { Content } = await render()
|
|
25
|
+
|
|
26
|
+
const children = (
|
|
27
|
+
await getCollection('pages', ({ data }) =>
|
|
28
|
+
data.parents?.some((p) => p.slug.includes(slug))
|
|
29
|
+
)
|
|
30
|
+
)?.map(({ collection, slug }) => ({ collection, slug }))
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
<Layout
|
|
34
|
+
class:list="jobs"
|
|
35
|
+
{...Astro.props}
|
|
36
|
+
>
|
|
37
|
+
<Header
|
|
38
|
+
{...sidebar}
|
|
39
|
+
{...header}
|
|
40
|
+
/>
|
|
41
|
+
<Container class:list="jobs-container">
|
|
42
|
+
<Sidebar {...sidebar} />
|
|
43
|
+
<Element
|
|
44
|
+
class:list="jobs-main"
|
|
45
|
+
as="main"
|
|
46
|
+
>
|
|
47
|
+
<Intro1
|
|
48
|
+
heading={title}
|
|
49
|
+
paragraph={description}
|
|
50
|
+
/>
|
|
51
|
+
<Jobs1 pages={children} />
|
|
52
|
+
<Prose>
|
|
53
|
+
<Content />
|
|
54
|
+
</Prose>
|
|
55
|
+
</Element>
|
|
56
|
+
</Container>
|
|
57
|
+
</Layout>
|
|
58
|
+
<Footer {...footer} />
|
|
59
|
+
|
|
60
|
+
<style is:global>
|
|
61
|
+
@layer fulldev {
|
|
62
|
+
.jobs {
|
|
63
|
+
.jobs-container {
|
|
64
|
+
@apply flex !pr-0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.jobs-main {
|
|
68
|
+
@apply flex w-full flex-col;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Banner from 'fulldev-ui/blocks/Banner.astro'
|
|
4
|
+
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
5
|
+
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
6
|
+
import Block from 'fulldev-ui/components/Block.astro'
|
|
7
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
|
+
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
9
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
10
|
+
|
|
11
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {}
|
|
12
|
+
|
|
13
|
+
const { banner, sidebar, header, blocks, footer } = Astro.props
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<Layout
|
|
17
|
+
class:list="page"
|
|
18
|
+
{...Astro.props}
|
|
19
|
+
>
|
|
20
|
+
<Banner {...banner} />
|
|
21
|
+
<Header
|
|
22
|
+
{...sidebar}
|
|
23
|
+
{...header}
|
|
24
|
+
/>
|
|
25
|
+
<Element as="main">
|
|
26
|
+
{blocks?.map((block) => <Block {...block} />)}
|
|
27
|
+
</Element>
|
|
28
|
+
<Footer {...footer} />
|
|
29
|
+
</Layout>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import type { CollectionEntry } from 'astro:content'
|
|
4
|
+
import Content1 from 'fulldev-ui/blocks/Content1.astro'
|
|
5
|
+
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
|
+
import Header from 'fulldev-ui/blocks/Header.astro'
|
|
7
|
+
import Block from 'fulldev-ui/components/Block.astro'
|
|
8
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
9
|
+
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
10
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page'
|
|
11
|
+
|
|
12
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
13
|
+
render: CollectionEntry<'pages'>['render']
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
title,
|
|
18
|
+
description,
|
|
19
|
+
list,
|
|
20
|
+
button,
|
|
21
|
+
header,
|
|
22
|
+
sidebar,
|
|
23
|
+
blocks,
|
|
24
|
+
footer,
|
|
25
|
+
render,
|
|
26
|
+
} = Astro.props
|
|
27
|
+
|
|
28
|
+
const { Content, headings } = await render()
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<Layout
|
|
32
|
+
class:list="post"
|
|
33
|
+
{...Astro.props}
|
|
34
|
+
>
|
|
35
|
+
<Header
|
|
36
|
+
{...sidebar}
|
|
37
|
+
{...header}
|
|
38
|
+
/>
|
|
39
|
+
<Element as="main">
|
|
40
|
+
<Content1
|
|
41
|
+
heading={title}
|
|
42
|
+
paragraph={description}
|
|
43
|
+
{list}
|
|
44
|
+
{button}
|
|
45
|
+
{headings}
|
|
46
|
+
>
|
|
47
|
+
<Content />
|
|
48
|
+
</Content1>
|
|
49
|
+
{blocks?.map((block) => <Block {...block} />)}
|
|
50
|
+
</Element>
|
|
51
|
+
<Footer {...footer} />
|
|
52
|
+
</Layout>
|
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
2
3
|
import { getImage } from 'astro:assets'
|
|
3
4
|
import type { CollectionEntry } from 'astro:content'
|
|
4
5
|
import { getCollection, getEntry } from 'astro:content'
|
|
5
|
-
import
|
|
6
|
+
import Products1 from 'fulldev-ui/blocks/Products1.astro'
|
|
6
7
|
import CartForm from 'fulldev-ui/components/CartForm.svelte'
|
|
7
8
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
9
|
import Gallery from 'fulldev-ui/components/Gallery.astro'
|
|
9
10
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
11
|
+
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
10
12
|
import List from 'fulldev-ui/components/List.astro'
|
|
11
13
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
12
14
|
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
13
|
-
import
|
|
15
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page'
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
18
|
+
render: CollectionEntry<'pages'>['render']
|
|
19
|
+
}
|
|
16
20
|
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
const {
|
|
22
|
+
render,
|
|
23
|
+
title,
|
|
24
|
+
price,
|
|
25
|
+
images,
|
|
26
|
+
description,
|
|
27
|
+
soldout,
|
|
28
|
+
categories,
|
|
29
|
+
variants,
|
|
30
|
+
} = Astro.props
|
|
20
31
|
|
|
21
32
|
const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') || 'index'
|
|
22
33
|
const imageId = images?.[0]?.id
|
|
@@ -35,7 +46,10 @@ const relatedProducts = await getCollection('products', (product) =>
|
|
|
35
46
|
const baseLayout = await getEntry('layouts', 'base')
|
|
36
47
|
---
|
|
37
48
|
|
|
38
|
-
<Layout
|
|
49
|
+
<Layout
|
|
50
|
+
class:list="product"
|
|
51
|
+
{...Astro.props}
|
|
52
|
+
>
|
|
39
53
|
<Element
|
|
40
54
|
class:list="product"
|
|
41
55
|
as="section"
|
|
@@ -49,15 +63,15 @@ const baseLayout = await getEntry('layouts', 'base')
|
|
|
49
63
|
<Element class:list="product-content">
|
|
50
64
|
<Heading
|
|
51
65
|
as="h1"
|
|
52
|
-
|
|
66
|
+
size="3xl"
|
|
53
67
|
text={title}
|
|
54
68
|
/>
|
|
55
69
|
<Paragraph text={description} />
|
|
56
70
|
</Element>
|
|
57
|
-
<CartForm
|
|
71
|
+
<!-- <CartForm
|
|
58
72
|
product={Astro.props}
|
|
59
73
|
client:load
|
|
60
|
-
/>
|
|
74
|
+
/> -->
|
|
61
75
|
<List
|
|
62
76
|
size="sm"
|
|
63
77
|
items={baseLayout.data.banner?.split('|')}
|
|
@@ -65,7 +79,7 @@ const baseLayout = await getEntry('layouts', 'base')
|
|
|
65
79
|
</Element>
|
|
66
80
|
</Element>
|
|
67
81
|
</Element>
|
|
68
|
-
<
|
|
82
|
+
<Products1
|
|
69
83
|
heading="Gerelateerde producten"
|
|
70
84
|
products={[...relatedProducts].sort(() => Math.random() - 0.5).slice(0, 6)}
|
|
71
85
|
/>
|
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { getCollection } from 'astro:content'
|
|
3
|
-
import PageLayout from 'fulldev-ui/layouts/PageLayout.astro'
|
|
2
|
+
import { getCollection, getEntry } from 'astro:content'
|
|
4
3
|
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
4
|
+
import { dash, pascal } from 'radash'
|
|
5
|
+
import { mergeDeep } from 'remeda'
|
|
5
6
|
|
|
6
7
|
export async function getStaticPaths() {
|
|
7
8
|
const collection = await getCollection('pages')
|
|
8
9
|
return collection.map((entry) => ({
|
|
9
10
|
params: {
|
|
10
|
-
page: getHref(entry.
|
|
11
|
+
page: getHref(entry.slug),
|
|
11
12
|
},
|
|
12
13
|
props: entry,
|
|
13
14
|
}))
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
const layoutName = Astro.props.data._layout ?? 'Page'
|
|
18
|
+
const layoutComponentName = pascal(layoutName)
|
|
19
|
+
|
|
20
|
+
const layoutsComponents = {
|
|
21
|
+
...import.meta.glob('/src/layouts/**/*.astro'),
|
|
22
|
+
...import.meta.glob('../layouts/**/*.astro'),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const layoutComponentPath = Object.keys(layoutsComponents).find(
|
|
26
|
+
(path) => path.split('/').pop()?.split('.')[0] === layoutComponentName
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
const LayoutComponent =
|
|
30
|
+
layoutComponentPath &&
|
|
31
|
+
(await (layoutsComponents[layoutComponentPath] as any)()).default
|
|
32
|
+
|
|
33
|
+
const layoutEntryName = dash(layoutName)
|
|
34
|
+
const layoutEntry = await getEntry('layouts', layoutEntryName)
|
|
35
|
+
const baseLayout = await getEntry('layouts', 'base')
|
|
36
|
+
const mergedLayouts = mergeDeep(baseLayout || {}, layoutEntry || {})
|
|
37
|
+
const merged = mergeDeep(mergedLayouts, Astro.props)
|
|
38
|
+
|
|
39
|
+
const { data, ...rest } = merged
|
|
15
40
|
---
|
|
16
41
|
|
|
17
|
-
|
|
42
|
+
{
|
|
43
|
+
LayoutComponent && (
|
|
44
|
+
<LayoutComponent
|
|
45
|
+
{...data}
|
|
46
|
+
{...rest}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
package/src/pages/test.astro
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import Hero1 from 'fulldev-ui/blocks/Hero1.astro'
|
|
3
|
+
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
4
|
+
|
|
5
|
+
import { $cart } from 'fulldev-ui/stores/cart'
|
|
6
|
+
|
|
7
|
+
const value = $cart.get()
|
|
3
8
|
---
|
|
4
9
|
|
|
5
|
-
<Layout
|
|
10
|
+
<Layout>
|
|
11
|
+
<Hero1
|
|
12
|
+
heading="hello world"
|
|
13
|
+
class="hoi"
|
|
14
|
+
/>
|
|
15
|
+
{value}
|
|
16
|
+
|
|
17
|
+
<button id="myyy-button">Add item</button>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { addItem } from 'fulldev-ui/stores/cart'
|
|
21
|
+
|
|
22
|
+
const button = document.querySelector('#myyy-button')
|
|
23
|
+
button?.addEventListener('click', () => {
|
|
24
|
+
console.log('clicked')
|
|
25
|
+
addItem({
|
|
26
|
+
slug: 'test',
|
|
27
|
+
title: 'title',
|
|
28
|
+
price: 10,
|
|
29
|
+
quantity: 10,
|
|
30
|
+
image: '',
|
|
31
|
+
variants: [],
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
</Layout>
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
2
|
+
import { iconSchema } from './icon'
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
4
|
+
export const badgeSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
icon: iconSchema.shape.name,
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
target: z.literal('_blank').optional(),
|
|
10
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
11
|
+
variant: z
|
|
12
|
+
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
13
|
+
.default('outline')
|
|
14
|
+
.optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict()
|
|
17
|
+
|
|
18
|
+
export type BadgeSchema = z.infer<typeof badgeSchema>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import pathSchema from '../utils/pathSchema'
|
|
3
|
+
import { badgeSchema } from './badge'
|
|
4
|
+
import { buttonSchema } from './button'
|
|
5
|
+
import { channelSchema } from './channel'
|
|
6
|
+
import { headingSchema } from './heading'
|
|
7
|
+
import { iconSchema } from './icon'
|
|
8
|
+
import { imageSchema } from './image'
|
|
9
|
+
import { linkSchema } from './link'
|
|
10
|
+
import { logoSchema } from './logo'
|
|
11
|
+
import { menuSchema } from './menu'
|
|
12
|
+
import { paragraphSchema } from './paragraph'
|
|
13
|
+
import { socialSchema } from './social'
|
|
14
|
+
import { taglineSchema } from './tagline'
|
|
15
|
+
|
|
16
|
+
export const blockSchema = z.object({
|
|
17
|
+
_block: z.string().optional(),
|
|
18
|
+
dark: z.boolean().optional(),
|
|
19
|
+
logo: logoSchema.optional(),
|
|
20
|
+
link: linkSchema.optional(),
|
|
21
|
+
links: linkSchema.array().optional(),
|
|
22
|
+
menus: menuSchema.array().optional(),
|
|
23
|
+
themer: z.boolean().optional(),
|
|
24
|
+
search: z.boolean().optional(),
|
|
25
|
+
cart: z.boolean().optional(),
|
|
26
|
+
text: z.string().optional(),
|
|
27
|
+
tagline: taglineSchema.shape.text,
|
|
28
|
+
badge: badgeSchema.optional(),
|
|
29
|
+
badges: badgeSchema.array().optional(),
|
|
30
|
+
heading: headingSchema.shape.text,
|
|
31
|
+
paragraph: paragraphSchema.shape.text,
|
|
32
|
+
list: z.string().array().optional(),
|
|
33
|
+
content: z.string().optional(),
|
|
34
|
+
button: buttonSchema.optional(),
|
|
35
|
+
buttons: buttonSchema.array().optional(),
|
|
36
|
+
image: imageSchema.optional(),
|
|
37
|
+
images: imageSchema.array().optional(),
|
|
38
|
+
channels: channelSchema.array().optional(),
|
|
39
|
+
socials: socialSchema.shape.href.array().optional(),
|
|
40
|
+
pages: pathSchema('pages').array().optional(),
|
|
41
|
+
products: pathSchema('pages').array().optional(),
|
|
42
|
+
cards: z
|
|
43
|
+
.object({
|
|
44
|
+
image: imageSchema.optional(),
|
|
45
|
+
icon: iconSchema.shape.name,
|
|
46
|
+
rating: z.number().optional(),
|
|
47
|
+
tagline: taglineSchema.shape.text,
|
|
48
|
+
badge: badgeSchema.optional(),
|
|
49
|
+
badges: badgeSchema.array().optional(),
|
|
50
|
+
heading: headingSchema.shape.text,
|
|
51
|
+
paragraph: paragraphSchema.shape.text,
|
|
52
|
+
list: z.string().array().optional(),
|
|
53
|
+
button: buttonSchema.optional(),
|
|
54
|
+
buttons: buttonSchema.array().optional(),
|
|
55
|
+
})
|
|
56
|
+
.strict()
|
|
57
|
+
.array()
|
|
58
|
+
.optional(),
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
export type BlockSchema = z.infer<typeof blockSchema>
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import globalSchema from './global'
|
|
2
|
+
import { iconSchema } from './icon'
|
|
4
3
|
|
|
5
4
|
export const buttonSchema = z
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.merge(globalSchema)
|
|
20
|
-
)
|
|
5
|
+
.object({
|
|
6
|
+
icon: iconSchema.shape.name,
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
target: z.literal('_blank').optional(),
|
|
10
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
11
|
+
reverse: z.boolean().optional(),
|
|
12
|
+
variant: z
|
|
13
|
+
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
14
|
+
.default('primary')
|
|
15
|
+
.optional(),
|
|
16
|
+
})
|
|
17
|
+
.strict()
|
|
21
18
|
|
|
22
19
|
export type ButtonSchema = z.infer<typeof buttonSchema>
|
|
23
|
-
|
|
24
|
-
export default buttonSchema
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import text from './text'
|
|
2
|
+
import { headingSchema } from './heading'
|
|
3
|
+
import { iconSchema } from './icon'
|
|
5
4
|
|
|
6
|
-
export
|
|
5
|
+
export const channelSchema = z
|
|
7
6
|
.object({
|
|
8
|
-
|
|
9
|
-
text,
|
|
10
|
-
|
|
11
|
-
href: z.string(),
|
|
7
|
+
icon: iconSchema.shape.name,
|
|
8
|
+
heading: headingSchema.shape.text,
|
|
9
|
+
text: z.string().optional(),
|
|
10
|
+
href: z.string().optional(),
|
|
11
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
12
|
+
variant: z
|
|
13
|
+
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
14
|
+
.default('secondary')
|
|
15
|
+
.optional(),
|
|
12
16
|
})
|
|
13
|
-
.
|
|
17
|
+
.strict()
|
|
18
|
+
|
|
19
|
+
export type ChannelSchema = z.infer<typeof channelSchema>
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import { channelSchema } from 'fulldev-ui/schemas/components/channel.ts'
|
|
3
|
+
import { logoSchema } from 'fulldev-ui/schemas/components/logo.ts'
|
|
4
|
+
import { menuSchema } from 'fulldev-ui/schemas/components/menu.ts'
|
|
5
|
+
import { headingSchema } from './heading'
|
|
6
|
+
import { paragraphSchema } from './paragraph'
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export const footerSchema = z
|
|
9
9
|
.object({
|
|
10
|
-
logo,
|
|
11
|
-
text,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
logo: logoSchema.optional(),
|
|
11
|
+
heading: headingSchema.shape.text,
|
|
12
|
+
paragraph: paragraphSchema.shape.text,
|
|
13
|
+
socials: z.string().url().array().optional(),
|
|
14
|
+
channels: channelSchema.array().optional(),
|
|
15
|
+
menus: menuSchema.array().optional(),
|
|
15
16
|
})
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
.strict()
|
|
18
|
+
|
|
19
|
+
export type FooterSchema = z.infer<typeof footerSchema>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
|
|
3
|
+
|
|
4
|
+
export const headSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
title: z.string().optional(),
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
image: imageSchema.optional(),
|
|
9
|
+
theme: z.enum(['light', 'dark', 'system']).default('light').optional(),
|
|
10
|
+
favicon: z.string().optional(),
|
|
11
|
+
company: z.string().optional(),
|
|
12
|
+
scripts: z.string().array().optional(),
|
|
13
|
+
code: z.string().optional(),
|
|
14
|
+
})
|
|
15
|
+
.strict()
|
|
16
|
+
|
|
17
|
+
export type HeadSchema = z.infer<typeof headSchema>
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
|
|
3
|
+
import { linkSchema } from 'fulldev-ui/schemas/components/link.ts'
|
|
4
|
+
import { logoSchema } from 'fulldev-ui/schemas/components/logo.ts'
|
|
5
|
+
import { menuSchema } from 'fulldev-ui/schemas/components/menu.ts'
|
|
6
|
+
import { headingSchema } from './heading'
|
|
7
|
+
import { socialSchema } from './social'
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export const headerSchema = z
|
|
10
10
|
.object({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
logo: logoSchema.optional(),
|
|
12
|
+
heading: headingSchema.shape.text,
|
|
13
|
+
links: linkSchema.array().optional(),
|
|
14
|
+
socials: socialSchema.shape.href.array().optional(),
|
|
15
|
+
buttons: buttonSchema.array().optional(),
|
|
16
|
+
menus: menuSchema.array().optional(),
|
|
17
|
+
themer: z.boolean().optional(),
|
|
18
|
+
cart: z.boolean().optional(),
|
|
19
|
+
search: z.boolean().optional(),
|
|
17
20
|
})
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
.strict()
|
|
22
|
+
|
|
23
|
+
export type HeaderSchema = z.infer<typeof headerSchema>
|