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
|
@@ -1,23 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
2
|
|
|
3
|
-
const imagePath = z.preprocess((data: unknown) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, reference('images'))
|
|
3
|
+
// const imagePath = z.preprocess((data: unknown) => {
|
|
4
|
+
// if (typeof data === 'string') {
|
|
5
|
+
// return data.split('/').pop()
|
|
6
|
+
// }
|
|
7
|
+
// return data
|
|
8
|
+
// }, reference('images'))
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
)
|
|
10
|
+
// export const imageSchema = z
|
|
11
|
+
// .union([imagePath, z.object({}).passthrough()])
|
|
12
|
+
// .pipe(
|
|
13
|
+
// z
|
|
14
|
+
// .object({
|
|
15
|
+
// id: z
|
|
16
|
+
// .string()
|
|
17
|
+
// .refine(async (data) => await reference('images').parseAsync(data)),
|
|
18
|
+
// src: z.string(),
|
|
19
|
+
// alt: z.string(),
|
|
20
|
+
// width: z.number(),
|
|
21
|
+
// height: z.number(),
|
|
22
|
+
// })
|
|
23
|
+
// .partial()
|
|
24
|
+
// .passthrough()
|
|
25
|
+
// )
|
|
26
|
+
// .optional()
|
|
27
|
+
|
|
28
|
+
export const imageSchema = z
|
|
29
|
+
.preprocess(
|
|
30
|
+
(data: unknown) => (typeof data === 'string' ? { src: data } : data),
|
|
31
|
+
z
|
|
32
|
+
.object({
|
|
33
|
+
src: z.string().optional(),
|
|
34
|
+
alt: z.string().optional(),
|
|
35
|
+
width: z.number().optional(),
|
|
36
|
+
height: z.number().optional(),
|
|
37
|
+
})
|
|
38
|
+
.strict()
|
|
39
|
+
)
|
|
40
|
+
.optional()
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
// z
|
|
5
|
-
// .object({
|
|
6
|
-
// slug: z
|
|
7
|
-
// .string()
|
|
8
|
-
// .refine(async (data) => await pathSchema('pages').parseAsync(data)),
|
|
9
|
-
// text: z.string(),
|
|
10
|
-
// href: z.string(),
|
|
11
|
-
// icon: z.string(),
|
|
12
|
-
// })
|
|
13
|
-
// .partial()
|
|
14
|
-
// .passthrough()
|
|
15
|
-
// )
|
|
16
|
-
|
|
17
|
-
export default z
|
|
3
|
+
export const linkSchema = z
|
|
18
4
|
.object({
|
|
19
5
|
text: z.string().optional(),
|
|
20
6
|
href: z.string().optional(),
|
|
7
|
+
icon: z.string().optional(),
|
|
8
|
+
target: z.literal('_blank').optional(),
|
|
9
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
10
|
+
variant: z
|
|
11
|
+
.enum(['primary', 'underline', 'muted'])
|
|
12
|
+
.default('primary')
|
|
13
|
+
.optional(),
|
|
21
14
|
})
|
|
22
15
|
.strict()
|
|
23
|
-
|
|
16
|
+
|
|
17
|
+
export type LinkSchema = z.infer<typeof linkSchema>
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export const logoSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
image: imageSchema,
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
10
|
+
})
|
|
11
|
+
.strict()
|
|
12
|
+
|
|
13
|
+
export type LogoSchema = z.infer<typeof logoSchema>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import links from './links'
|
|
2
|
+
import { linkSchema } from 'fulldev-ui/schemas/components/link.ts'
|
|
3
|
+
import { headingSchema } from './heading'
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
export const menuSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
heading: headingSchema.shape.text,
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
links: linkSchema.array().optional(),
|
|
10
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
11
|
+
})
|
|
12
|
+
.strict()
|
|
13
|
+
|
|
14
|
+
export type MenuSchema = z.infer<typeof menuSchema>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { headerSchema } from './header'
|
|
3
|
+
import { sidebarSchema } from './sidebar'
|
|
4
|
+
|
|
5
|
+
export const navigationSchema = headerSchema.merge(sidebarSchema).extend({
|
|
6
|
+
header: z.boolean().optional(),
|
|
7
|
+
sidebar: z.boolean().optional(),
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
export type NavigationSchema = z.infer<typeof navigationSchema>
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import avatar from './avatar'
|
|
3
|
-
import avatars from './avatars'
|
|
4
|
-
import text from './text'
|
|
5
2
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.partial()
|
|
15
|
-
)
|
|
3
|
+
export const ratingSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
score: z.number().optional(),
|
|
6
|
+
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
7
|
+
})
|
|
8
|
+
.strict()
|
|
9
|
+
|
|
10
|
+
export type RatingSchema = z.infer<typeof ratingSchema>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { logoSchema } from '../components/logo'
|
|
3
|
+
import { headingSchema } from './heading'
|
|
4
|
+
import { linkSchema } from './link'
|
|
5
|
+
import { menuSchema } from './menu'
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const sidebarSchema = z
|
|
8
8
|
.object({
|
|
9
|
-
|
|
10
|
-
logo,
|
|
11
|
-
heading,
|
|
12
|
-
|
|
9
|
+
company: z.string().optional(),
|
|
10
|
+
logo: logoSchema.optional(),
|
|
11
|
+
heading: headingSchema.shape.text,
|
|
12
|
+
themer: z.boolean().optional(),
|
|
13
|
+
menus: menuSchema.array().optional(),
|
|
14
|
+
links: linkSchema.array().optional(),
|
|
13
15
|
})
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
.strict()
|
|
17
|
+
|
|
18
|
+
export type SidebarSchema = z.infer<typeof sidebarSchema>
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
+
import { iconSchema } from './icon'
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export const socialSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
icon: iconSchema.optional(),
|
|
7
|
+
text: z.string().optional(),
|
|
8
|
+
href: z.string().optional(),
|
|
9
|
+
target: z.literal('_blank').default('_blank').optional(),
|
|
10
|
+
size: z.enum(['sm', 'md', 'lg']).default('sm').optional(),
|
|
11
|
+
variant: z
|
|
12
|
+
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
13
|
+
.default('secondary')
|
|
14
|
+
.optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict()
|
|
17
|
+
|
|
18
|
+
export type ButtonSchema = z.infer<typeof socialSchema>
|
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export const imageSchema = z
|
|
4
4
|
.object({
|
|
5
5
|
id: z.string(),
|
|
6
6
|
src: z.string(),
|
|
7
7
|
alt: z.string().default(''),
|
|
8
|
-
width: z.number(),
|
|
9
|
-
height: z.number(),
|
|
10
|
-
format: z.string(),
|
|
8
|
+
width: z.number().optional(),
|
|
9
|
+
height: z.number().optional(),
|
|
10
|
+
format: z.string().optional(),
|
|
11
11
|
})
|
|
12
12
|
.passthrough()
|
|
13
|
+
|
|
14
|
+
export type ImageSchema = z.infer<typeof imageSchema>
|
|
15
|
+
|
|
16
|
+
export const imageLoader = async () => {
|
|
17
|
+
const files = import.meta.glob('/src/images/**/*.{webp,png,jpg,jpeg,svg}', {
|
|
18
|
+
eager: true,
|
|
19
|
+
})
|
|
20
|
+
const entries = import.meta.glob('/src/images/**/*.{yml,yaml,json}', {
|
|
21
|
+
eager: true,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const allImages = Object.entries(files).map(([src, file]) => {
|
|
25
|
+
const id = src.split('/images/').pop()
|
|
26
|
+
const matchPath = Object.keys(entries).find(
|
|
27
|
+
(entry) => entry.split('.').shift() === src
|
|
28
|
+
) as any
|
|
29
|
+
const matchFile = entries[matchPath]
|
|
30
|
+
const matchData = matchFile ? (matchFile as any).default : {}
|
|
31
|
+
const fileData = file ? (file as any).default : {}
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
...fileData,
|
|
35
|
+
src,
|
|
36
|
+
...matchData,
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return allImages as any
|
|
41
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'astro:content'
|
|
2
|
+
import { blockSchema } from 'fulldev-ui/schemas/components/block.ts'
|
|
3
|
+
import { buttonSchema } from 'fulldev-ui/schemas/components/button.ts'
|
|
4
|
+
import { headSchema } from 'fulldev-ui/schemas/components/head.ts'
|
|
5
|
+
import { imageSchema } from 'fulldev-ui/schemas/components/image.ts'
|
|
6
|
+
import { priceSchema } from 'fulldev-ui/schemas/components/price.ts'
|
|
7
|
+
import pathSchema from 'fulldev-ui/schemas/utils/pathSchema.ts'
|
|
8
|
+
|
|
9
|
+
export const pageSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
_layout: z.string().default('Page').optional(),
|
|
12
|
+
_schema: z.string().optional(),
|
|
13
|
+
href: z.string().optional(),
|
|
14
|
+
draft: z.boolean().optional(),
|
|
15
|
+
title: z.string().optional(),
|
|
16
|
+
description: z.string().optional(),
|
|
17
|
+
list: z.string().array().optional(),
|
|
18
|
+
image: imageSchema.optional(),
|
|
19
|
+
images: imageSchema.array().optional(),
|
|
20
|
+
price: priceSchema.shape.amount,
|
|
21
|
+
order: z.number().optional(),
|
|
22
|
+
variants: z.record(z.string(), z.string().array()).optional(),
|
|
23
|
+
soldout: z.boolean().optional(),
|
|
24
|
+
head: headSchema.optional(),
|
|
25
|
+
button: buttonSchema.optional(),
|
|
26
|
+
buttons: buttonSchema.array().optional(),
|
|
27
|
+
banner: blockSchema.optional(),
|
|
28
|
+
navigation: blockSchema.optional(),
|
|
29
|
+
header: blockSchema.optional(),
|
|
30
|
+
blocks: blockSchema.array().optional(),
|
|
31
|
+
subheader: blockSchema.array().optional(),
|
|
32
|
+
sidebar: blockSchema.optional(),
|
|
33
|
+
footer: blockSchema.optional(),
|
|
34
|
+
parents: pathSchema('pages').array().optional(),
|
|
35
|
+
children: pathSchema('pages').array().optional(),
|
|
36
|
+
siblings: pathSchema('pages').array().optional(),
|
|
37
|
+
})
|
|
38
|
+
.strict()
|
|
39
|
+
|
|
40
|
+
export type PageSchema = z.infer<typeof pageSchema>
|
|
@@ -5,12 +5,3 @@ export type GlobalProps = {
|
|
|
5
5
|
size?: 'sm' | 'md' | 'lg' | string | number | null | undefined
|
|
6
6
|
contrast?: boolean | undefined
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
// declare global {
|
|
10
|
-
// type GlobalProps = {
|
|
11
|
-
// theme?: 'light' | 'dark' | undefined
|
|
12
|
-
// color?: 'base' | 'brand' | undefined
|
|
13
|
-
// size?: 'sm' | 'md' | 'lg' | undefined
|
|
14
|
-
// contrast?: boolean | undefined
|
|
15
|
-
// }
|
|
16
|
-
// }
|
package/src/utils/getHref.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import type { CollectionEntry
|
|
1
|
+
import type { CollectionEntry } from 'astro:content'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
categories: 'categorieen',
|
|
7
|
-
docs: 'docs',
|
|
8
|
-
pages: '',
|
|
9
|
-
posts: 'blog',
|
|
10
|
-
products: 'producten',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function getHref(
|
|
14
|
-
collection: ContentCollectionKey,
|
|
15
|
-
slug: CollectionEntry<ContentCollectionKey>['slug']
|
|
16
|
-
) {
|
|
17
|
-
let href
|
|
18
|
-
if (slug === 'index') href = `/`
|
|
19
|
-
else if (slug) href = `/${routes[collection]}/${slug}/`
|
|
20
|
-
href = href?.replace('//', '/')
|
|
21
|
-
return href
|
|
3
|
+
export function getHref(slug: CollectionEntry<'pages'>['slug']) {
|
|
4
|
+
if (slug === 'index') return '/'
|
|
5
|
+
else return `/${slug}/`
|
|
22
6
|
}
|
package/tailwind.config.ts
CHANGED
|
@@ -16,6 +16,10 @@ export default {
|
|
|
16
16
|
gutter: 'clamp(16px, 4vw, 32px)',
|
|
17
17
|
container: 'var(--container, 1536px)',
|
|
18
18
|
hero: 'calc(100vh - var(--header-height, 0px) - var(--subheader-height, 0px) - var(--banner-height, 0px))',
|
|
19
|
+
'sticky-8':
|
|
20
|
+
'calc(var(--header-height, 0px) + var(--subheader-height, 0px) + 2rem)',
|
|
21
|
+
'sticky-16':
|
|
22
|
+
'calc(var(--header-height, 0px) + var(--subheader-height, 0px) + 4rem)',
|
|
19
23
|
},
|
|
20
24
|
colors: {
|
|
21
25
|
border: 'hsl(var(--border))',
|
package/tsconfig.json
CHANGED
package/example.svelte
DELETED
|
File without changes
|
package/parent.svelte
DELETED
|
File without changes
|
package/src/App.svelte
DELETED
|
File without changes
|
package/src/blocks/Contact.astro
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import Channels from 'fulldev-ui/components/Channels.astro'
|
|
3
|
-
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
-
import Form from 'fulldev-ui/components/Form.astro'
|
|
5
|
-
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
|
-
import Image from 'fulldev-ui/components/Image.astro'
|
|
7
|
-
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
8
|
-
import Socials from 'fulldev-ui/components/Socials.astro'
|
|
9
|
-
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
as = 'section',
|
|
13
|
-
size = 'md',
|
|
14
|
-
variant = 1,
|
|
15
|
-
heading,
|
|
16
|
-
form,
|
|
17
|
-
text,
|
|
18
|
-
tagline,
|
|
19
|
-
googleMaps,
|
|
20
|
-
paragraph,
|
|
21
|
-
buttons,
|
|
22
|
-
socials,
|
|
23
|
-
position,
|
|
24
|
-
image,
|
|
25
|
-
channels,
|
|
26
|
-
level = 1,
|
|
27
|
-
...rest
|
|
28
|
-
} = Astro.props
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
<Element
|
|
32
|
-
class:list="contact"
|
|
33
|
-
{as}
|
|
34
|
-
{size}
|
|
35
|
-
{variant}
|
|
36
|
-
{...rest}
|
|
37
|
-
>
|
|
38
|
-
<Element class:list="contact-container">
|
|
39
|
-
<Element class:list="contact-segment">
|
|
40
|
-
<Element class:list="contact-content">
|
|
41
|
-
<Tagline text={tagline} />
|
|
42
|
-
<Heading
|
|
43
|
-
size={'sm'}
|
|
44
|
-
level={level}
|
|
45
|
-
text={heading}
|
|
46
|
-
/>
|
|
47
|
-
<Paragraph text={paragraph} />
|
|
48
|
-
</Element>
|
|
49
|
-
<Channels {channels} />
|
|
50
|
-
<Socials {socials} />
|
|
51
|
-
<Form
|
|
52
|
-
action="/thank-you"
|
|
53
|
-
method="POST"
|
|
54
|
-
{...form}
|
|
55
|
-
/>
|
|
56
|
-
</Element>
|
|
57
|
-
<Image
|
|
58
|
-
class:list="contact-image"
|
|
59
|
-
{position}
|
|
60
|
-
{...image}
|
|
61
|
-
/>
|
|
62
|
-
</Element>
|
|
63
|
-
</Element>
|
|
64
|
-
|
|
65
|
-
<style is:global>
|
|
66
|
-
@layer fulldev {
|
|
67
|
-
.contact {
|
|
68
|
-
@apply relative w-full;
|
|
69
|
-
|
|
70
|
-
.contact-container {
|
|
71
|
-
@apply mx-auto flex h-full w-full flex-col;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.contact-segment {
|
|
75
|
-
@apply z-10 flex flex-col items-start gap-8;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.contact-content {
|
|
79
|
-
@apply flex max-w-screen-md flex-col gap-6;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&.dark {
|
|
83
|
-
@apply bg-background;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Narrow left aligned */
|
|
87
|
-
&.variant-1 {
|
|
88
|
-
.contact-container {
|
|
89
|
-
@apply max-w-screen-md px-gutter py-8;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.contact-segment {
|
|
93
|
-
@apply gap-8 py-16;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.content-image {
|
|
97
|
-
@apply rounded-lg;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* Split */
|
|
102
|
-
&.variant-2 {
|
|
103
|
-
.contact-container {
|
|
104
|
-
@apply container gap-x-gutter gap-y-16 py-20 lg:grid lg:grid-cols-2 lg:items-center;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.contact-segment {
|
|
108
|
-
@apply max-w-xl;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.contact-image {
|
|
112
|
-
@apply rounded-lg;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
</style>
|