fulldev-ui 0.6.0-beta.3 → 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 +33 -0
- package/src/blocks/Colleagues1.astro +73 -0
- package/src/blocks/Contact1.astro +12 -4
- 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 +35 -34
- package/src/blocks/Feature1.astro +20 -26
- package/src/blocks/Features1.astro +66 -0
- package/src/blocks/Footer.astro +27 -52
- package/src/blocks/Header.astro +154 -0
- package/src/blocks/Hero1.astro +41 -41
- package/src/blocks/Intro1.astro +32 -18
- package/src/blocks/Jobs1.astro +73 -0
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +4 -4
- package/src/blocks/Reviews1.astro +79 -0
- package/src/components/Badges.astro +12 -35
- package/src/components/Block.astro +5 -24
- package/src/components/Button.astro +1 -2
- package/src/components/Buttons.astro +12 -43
- package/src/components/Cart.astro +6 -12
- package/src/components/Drawer.astro +1 -2
- package/src/components/Form.astro +3 -3
- package/src/components/Grid.astro +39 -0
- package/src/components/{Banner.astro → Group.astro} +5 -6
- package/src/components/Heading.astro +5 -1
- package/src/components/Icon.astro +0 -1
- package/src/components/Image.astro +15 -50
- package/src/components/Layout.astro +35 -0
- package/src/components/Links.astro +14 -35
- package/src/components/Logo.astro +5 -7
- package/src/components/Masonry.astro +42 -0
- package/src/components/Menu.astro +17 -38
- package/src/components/Menus.astro +20 -0
- package/src/components/Panel.astro +1 -1
- package/src/components/Paragraph.astro +8 -8
- package/src/components/Prose.astro +15 -7
- package/src/components/Search.astro +1 -1
- package/src/components/Section.astro +1 -1
- package/src/components/Sidebar.astro +11 -42
- package/src/components/Stack.astro +25 -0
- package/src/components/Tagline.astro +1 -1
- package/src/components/Toc.astro +22 -30
- package/src/components/Writeup.astro +59 -0
- package/src/components/_Image.astro +79 -0
- package/src/content/config.ts +2 -28
- package/src/content/layouts/base.yml +4 -3
- 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/{docs → pages/docs}/components/text.mdx +1 -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 +1 -0
- 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 +1 -0
- 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 +3 -3
- package/src/content/{products → pages/products}/product.md +2 -2
- package/src/integration/index.ts +38 -16
- package/src/layouts/{CategoryLayout.astro → Category.astro} +19 -20
- 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} +20 -11
- package/src/pages/[...page].astro +36 -4
- package/src/pages/test.astro +25 -1
- package/src/schemas/components/block.ts +58 -15
- package/src/schemas/components/button.ts +1 -0
- package/src/schemas/components/image.ts +32 -18
- package/src/schemas/components/menu.ts +1 -0
- package/src/schemas/imageSchema.ts +3 -3
- package/src/schemas/page.ts +40 -0
- package/src/utils/getHref.ts +4 -21
- package/tailwind.config.ts +4 -0
- package/src/blocks/Banner1.astro +0 -35
- package/src/blocks/Header1.astro +0 -192
- package/src/content/layouts/docs.yml +0 -2
- package/src/layouts/DocLayout.astro +0 -59
- package/src/layouts/Layout.astro +0 -107
- package/src/layouts/PageLayout.astro +0 -27
- package/src/layouts/PostLayout.astro +0 -22
- 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/blocks/banner.ts +0 -10
- package/src/schemas/blocks/categories.ts +0 -14
- package/src/schemas/blocks/contact.ts +0 -18
- package/src/schemas/blocks/cta.ts +0 -18
- package/src/schemas/blocks/feature.ts +0 -18
- package/src/schemas/blocks/hero.ts +0 -20
- package/src/schemas/blocks/intro.ts +0 -16
- package/src/schemas/blocks/products.ts +0 -14
- package/src/schemas/categorySchema.ts +0 -16
- package/src/schemas/docSchema.ts +0 -14
- package/src/schemas/layoutSchema.ts +0 -22
- package/src/schemas/pageSchema.ts +0 -17
- package/src/schemas/postSchema.ts +0 -14
- package/src/schemas/productSchema.ts +0 -22
- /package/src/content/{categories → pages/categories}/category.md +0 -0
- /package/src/content/{posts → pages/posts}/post.md +0 -0
|
@@ -1,18 +1,61 @@
|
|
|
1
1
|
import { z } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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'
|
|
8
15
|
|
|
9
|
-
const
|
|
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
|
+
})
|
|
10
60
|
|
|
11
|
-
export
|
|
12
|
-
heroSchema.extend(_block),
|
|
13
|
-
ctaSchema.extend(_block),
|
|
14
|
-
featureSchema.extend(_block),
|
|
15
|
-
productsSchema.extend(_block),
|
|
16
|
-
categoriesSchema.extend(_block),
|
|
17
|
-
headerSchema.extend(_block),
|
|
18
|
-
])
|
|
61
|
+
export type BlockSchema = z.infer<typeof blockSchema>
|
|
@@ -8,6 +8,7 @@ export const buttonSchema = z
|
|
|
8
8
|
href: z.string().optional(),
|
|
9
9
|
target: z.literal('_blank').optional(),
|
|
10
10
|
size: z.enum(['sm', 'md', 'lg']).default('md').optional(),
|
|
11
|
+
reverse: z.boolean().optional(),
|
|
11
12
|
variant: z
|
|
12
13
|
.enum(['primary', 'secondary', 'outline', 'ghost'])
|
|
13
14
|
.default('primary')
|
|
@@ -1,26 +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
|
+
|
|
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()
|
|
9
27
|
|
|
10
28
|
export const imageSchema = z
|
|
11
|
-
.
|
|
12
|
-
|
|
29
|
+
.preprocess(
|
|
30
|
+
(data: unknown) => (typeof data === 'string' ? { src: data } : data),
|
|
13
31
|
z
|
|
14
32
|
.object({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
alt: z.string(),
|
|
20
|
-
width: z.number(),
|
|
21
|
-
height: z.number(),
|
|
33
|
+
src: z.string().optional(),
|
|
34
|
+
alt: z.string().optional(),
|
|
35
|
+
width: z.number().optional(),
|
|
36
|
+
height: z.number().optional(),
|
|
22
37
|
})
|
|
23
|
-
.
|
|
24
|
-
.passthrough()
|
|
38
|
+
.strict()
|
|
25
39
|
)
|
|
26
40
|
.optional()
|
|
@@ -5,9 +5,9 @@ export const imageSchema = z
|
|
|
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
13
|
|
|
@@ -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>
|
package/src/utils/getHref.ts
CHANGED
|
@@ -1,23 +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 (collection === 'pages' && slug === 'index') href = `/`
|
|
19
|
-
else if (slug === 'index') href = `/${routes[collection]}/`
|
|
20
|
-
else href = `/${routes[collection]}/${slug}/`
|
|
21
|
-
href = href?.replace('//', '/')
|
|
22
|
-
return href
|
|
3
|
+
export function getHref(slug: CollectionEntry<'pages'>['slug']) {
|
|
4
|
+
if (slug === 'index') return '/'
|
|
5
|
+
else return `/${slug}/`
|
|
23
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/src/blocks/Banner1.astro
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLTag } from 'astro/types'
|
|
3
|
-
import Banner from 'fulldev-ui/components/Banner.astro'
|
|
4
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
5
|
-
import Header from 'fulldev-ui/components/Header.astro'
|
|
6
|
-
import type { BannerSchema } from 'fulldev-ui/schemas/blocks/banner'
|
|
7
|
-
import type { ComponentProps } from 'svelte'
|
|
8
|
-
|
|
9
|
-
interface Props extends ComponentProps<typeof Header>, BannerSchema {
|
|
10
|
-
as?: HTMLTag
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { text, ...rest } = Astro.props
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<Banner
|
|
17
|
-
class:list="banner-1"
|
|
18
|
-
{...rest}
|
|
19
|
-
>
|
|
20
|
-
<Container>
|
|
21
|
-
<Fragment set:html={text} />
|
|
22
|
-
</Container>
|
|
23
|
-
</Banner>
|
|
24
|
-
|
|
25
|
-
<style is:global>
|
|
26
|
-
@layer fulldev {
|
|
27
|
-
.banner-1 {
|
|
28
|
-
@apply bg-primary text-primary-foreground;
|
|
29
|
-
|
|
30
|
-
.container {
|
|
31
|
-
@apply flex items-center justify-center overflow-hidden bg-primary text-center text-sm leading-none text-primary-foreground;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</style>
|
package/src/blocks/Header1.astro
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps } from 'astro/types'
|
|
3
|
-
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
|
-
import Cart from 'fulldev-ui/components/Cart.astro'
|
|
5
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
6
|
-
import Drawer from 'fulldev-ui/components/Drawer.astro'
|
|
7
|
-
import Element from 'fulldev-ui/components/Element.astro'
|
|
8
|
-
import Header from 'fulldev-ui/components/Header.astro'
|
|
9
|
-
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
10
|
-
import Link from 'fulldev-ui/components/Link.astro'
|
|
11
|
-
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
12
|
-
import Search from 'fulldev-ui/components/Search.astro'
|
|
13
|
-
import Social from 'fulldev-ui/components/Social.astro'
|
|
14
|
-
import Themer from 'fulldev-ui/components/Themer.astro'
|
|
15
|
-
import type { HeaderSchema } from 'fulldev-ui/schemas/components/header'
|
|
16
|
-
|
|
17
|
-
interface Props extends ComponentProps<typeof Header>, HeaderSchema {}
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
logo,
|
|
21
|
-
heading,
|
|
22
|
-
links,
|
|
23
|
-
socials,
|
|
24
|
-
menus,
|
|
25
|
-
search,
|
|
26
|
-
themer,
|
|
27
|
-
buttons,
|
|
28
|
-
cart,
|
|
29
|
-
...rest
|
|
30
|
-
} = Astro.props
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
<Header
|
|
34
|
-
class:list="header-1"
|
|
35
|
-
{...rest}
|
|
36
|
-
>
|
|
37
|
-
<Container>
|
|
38
|
-
<Element class:list="header-1-start">
|
|
39
|
-
<Logo {...logo} />
|
|
40
|
-
{
|
|
41
|
-
links?.map((link) => (
|
|
42
|
-
<Link
|
|
43
|
-
size="sm"
|
|
44
|
-
variant="muted"
|
|
45
|
-
{...link}
|
|
46
|
-
/>
|
|
47
|
-
))
|
|
48
|
-
}
|
|
49
|
-
</Element>
|
|
50
|
-
<Element class:list="header-1-end">
|
|
51
|
-
{
|
|
52
|
-
search && (
|
|
53
|
-
<Search
|
|
54
|
-
if={search}
|
|
55
|
-
variant="ghost"
|
|
56
|
-
size="sm"
|
|
57
|
-
/>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
{
|
|
61
|
-
buttons?.map((button) => (
|
|
62
|
-
<Button
|
|
63
|
-
size="sm"
|
|
64
|
-
{...button}
|
|
65
|
-
/>
|
|
66
|
-
))
|
|
67
|
-
}
|
|
68
|
-
{
|
|
69
|
-
cart && (
|
|
70
|
-
<Cart
|
|
71
|
-
if={cart}
|
|
72
|
-
variant="ghost"
|
|
73
|
-
size="sm"
|
|
74
|
-
/>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
<Themer
|
|
78
|
-
if={themer}
|
|
79
|
-
variant="ghost"
|
|
80
|
-
size="sm"
|
|
81
|
-
/>
|
|
82
|
-
{
|
|
83
|
-
socials?.map((social) => (
|
|
84
|
-
<Social
|
|
85
|
-
variant="ghost"
|
|
86
|
-
size="sm"
|
|
87
|
-
href={social}
|
|
88
|
-
/>
|
|
89
|
-
))
|
|
90
|
-
}
|
|
91
|
-
<!-- <Button
|
|
92
|
-
class:list="menu-button"
|
|
93
|
-
as="label"
|
|
94
|
-
for="sidebar-toggle"
|
|
95
|
-
icon="menu-2"
|
|
96
|
-
variant="ghost"
|
|
97
|
-
size="sm"
|
|
98
|
-
/> -->
|
|
99
|
-
<Drawer
|
|
100
|
-
id="header-1-drawer"
|
|
101
|
-
icon="menu-2"
|
|
102
|
-
size="sm"
|
|
103
|
-
>
|
|
104
|
-
<Container>
|
|
105
|
-
<Element class:list="header-1-links">
|
|
106
|
-
{
|
|
107
|
-
links?.map((link) => (
|
|
108
|
-
<Link
|
|
109
|
-
variant="muted"
|
|
110
|
-
{...link}
|
|
111
|
-
/>
|
|
112
|
-
))
|
|
113
|
-
}
|
|
114
|
-
</Element>
|
|
115
|
-
{
|
|
116
|
-
menus?.map(({ heading, links }) => (
|
|
117
|
-
<Element class:list="header-1-menu">
|
|
118
|
-
<Heading
|
|
119
|
-
text={heading}
|
|
120
|
-
size="md"
|
|
121
|
-
as="h6"
|
|
122
|
-
/>
|
|
123
|
-
<Element class:list="header-1-links">
|
|
124
|
-
{links?.map((link) => (
|
|
125
|
-
<Link
|
|
126
|
-
variant="muted"
|
|
127
|
-
{...link}
|
|
128
|
-
/>
|
|
129
|
-
))}
|
|
130
|
-
</Element>
|
|
131
|
-
</Element>
|
|
132
|
-
))
|
|
133
|
-
}
|
|
134
|
-
</Container>
|
|
135
|
-
</Drawer>
|
|
136
|
-
</Element>
|
|
137
|
-
</Container>
|
|
138
|
-
</Header>
|
|
139
|
-
|
|
140
|
-
<style is:global>
|
|
141
|
-
@layer fulldev {
|
|
142
|
-
.header-1 {
|
|
143
|
-
@apply sticky left-0 top-0 z-20 flex h-14 items-center overflow-hidden border-b bg-background;
|
|
144
|
-
|
|
145
|
-
.container {
|
|
146
|
-
@apply flex items-center gap-6;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.header-1-start {
|
|
150
|
-
@apply flex items-center gap-6;
|
|
151
|
-
|
|
152
|
-
.link {
|
|
153
|
-
@apply max-lg:hidden;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.header-1-home {
|
|
158
|
-
@apply flex items-center gap-2;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.header-1-end {
|
|
162
|
-
@apply ml-auto flex items-center gap-1;
|
|
163
|
-
|
|
164
|
-
.social,
|
|
165
|
-
.themer {
|
|
166
|
-
@apply max-lg:hidden;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.menu-button {
|
|
170
|
-
@apply lg:hidden;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.drawer {
|
|
175
|
-
@apply lg:hidden;
|
|
176
|
-
|
|
177
|
-
.container {
|
|
178
|
-
@apply flex w-full flex-col items-start gap-6 overflow-y-auto px-gutter pb-14 pt-8;
|
|
179
|
-
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.header-1-menu {
|
|
183
|
-
@apply flex flex-col gap-4;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.header-1-links {
|
|
187
|
-
@apply flex flex-col gap-3;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
</style>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { CollectionEntry } from 'astro:content'
|
|
3
|
-
import { getEntry } from 'astro:content'
|
|
4
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
5
|
-
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
|
-
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
7
|
-
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
8
|
-
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
9
|
-
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
10
|
-
import { mergeDeep } from 'remeda'
|
|
11
|
-
|
|
12
|
-
type Props = CollectionEntry<'docs'>
|
|
13
|
-
|
|
14
|
-
const layout = await getEntry('layouts', 'docs')
|
|
15
|
-
const merged = mergeDeep(layout || {}, Astro.props)
|
|
16
|
-
|
|
17
|
-
const {
|
|
18
|
-
render,
|
|
19
|
-
data: { title, description },
|
|
20
|
-
} = merged
|
|
21
|
-
|
|
22
|
-
const { Content } = await render()
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
<Layout
|
|
26
|
-
class:list="doc-layout"
|
|
27
|
-
{...merged}
|
|
28
|
-
>
|
|
29
|
-
<Container class:list="doc-layout-container">
|
|
30
|
-
<Toc {render} />
|
|
31
|
-
<Prose>
|
|
32
|
-
<Heading
|
|
33
|
-
as="h1"
|
|
34
|
-
size="4xl"
|
|
35
|
-
text={title}
|
|
36
|
-
/>
|
|
37
|
-
<Paragraph
|
|
38
|
-
muted
|
|
39
|
-
size="lg"
|
|
40
|
-
text={description}
|
|
41
|
-
/>
|
|
42
|
-
<Content />
|
|
43
|
-
</Prose>
|
|
44
|
-
</Container>
|
|
45
|
-
</Layout>
|
|
46
|
-
|
|
47
|
-
<style is:global>
|
|
48
|
-
@layer fulldev {
|
|
49
|
-
.doc-layout {
|
|
50
|
-
.doc-layout-container {
|
|
51
|
-
@apply relative flex w-full grow items-start justify-evenly gap-x-gutter;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.toc {
|
|
55
|
-
@apply order-last;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
</style>
|
package/src/layouts/Layout.astro
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import type { CollectionEntry, ContentCollectionKey } from 'astro:content'
|
|
4
|
-
import { getEntry } from 'astro:content'
|
|
5
|
-
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
|
-
import Block from 'fulldev-ui/components/Block.astro'
|
|
7
|
-
import Container from 'fulldev-ui/components/Container.astro'
|
|
8
|
-
import Element from 'fulldev-ui/components/Element.astro'
|
|
9
|
-
import Head from 'fulldev-ui/components/Head.astro'
|
|
10
|
-
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
11
|
-
import Subheader from 'fulldev-ui/components/Subheader.astro'
|
|
12
|
-
import { mergeDeep } from 'remeda'
|
|
13
|
-
|
|
14
|
-
type Props = HTMLAttributes<'body'> & CollectionEntry<ContentCollectionKey>
|
|
15
|
-
|
|
16
|
-
const layout = await getEntry('layouts', 'base')
|
|
17
|
-
const merged = mergeDeep(layout || {}, Astro.props)
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
collection,
|
|
21
|
-
slug,
|
|
22
|
-
id,
|
|
23
|
-
render,
|
|
24
|
-
body,
|
|
25
|
-
data: {
|
|
26
|
-
banner,
|
|
27
|
-
header,
|
|
28
|
-
subheader,
|
|
29
|
-
sidebar,
|
|
30
|
-
footer,
|
|
31
|
-
head,
|
|
32
|
-
navigation,
|
|
33
|
-
title,
|
|
34
|
-
description,
|
|
35
|
-
image,
|
|
36
|
-
},
|
|
37
|
-
...rest
|
|
38
|
-
} = merged
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
<!doctype html>
|
|
42
|
-
<Element
|
|
43
|
-
class:list="layout"
|
|
44
|
-
as="html"
|
|
45
|
-
{...rest}
|
|
46
|
-
>
|
|
47
|
-
<Head
|
|
48
|
-
{title}
|
|
49
|
-
{description}
|
|
50
|
-
{image}
|
|
51
|
-
{...head}
|
|
52
|
-
/>
|
|
53
|
-
<Element
|
|
54
|
-
class:list="layout-body"
|
|
55
|
-
as="body"
|
|
56
|
-
>
|
|
57
|
-
<Block
|
|
58
|
-
_block="Banner1"
|
|
59
|
-
{...banner}
|
|
60
|
-
/>
|
|
61
|
-
<Block
|
|
62
|
-
_block="Header1"
|
|
63
|
-
{...navigation?.header && navigation}
|
|
64
|
-
{...header}
|
|
65
|
-
/>
|
|
66
|
-
<Subheader {...subheader} />
|
|
67
|
-
<Container class:list={['layout-container', { 'has-sidebar': sidebar }]}>
|
|
68
|
-
<Sidebar
|
|
69
|
-
{...navigation?.sidebar && navigation}
|
|
70
|
-
{...sidebar}
|
|
71
|
-
/>
|
|
72
|
-
<main class="layout-main">
|
|
73
|
-
<slot />
|
|
74
|
-
</main>
|
|
75
|
-
</Container>
|
|
76
|
-
<Footer {...footer} />
|
|
77
|
-
<style is:global>
|
|
78
|
-
@layer fulldev {
|
|
79
|
-
.layout {
|
|
80
|
-
@apply w-full font-sans text-base leading-relaxed text-foreground;
|
|
81
|
-
color-scheme: light;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.dark {
|
|
85
|
-
color-scheme: dark;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.layout-body {
|
|
89
|
-
@apply flex min-h-screen w-full flex-col bg-background font-sans text-foreground;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.layout-container {
|
|
93
|
-
@apply flex w-full grow !px-0;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.layout-main {
|
|
97
|
-
@apply flex w-full max-w-full flex-1 shrink flex-col;
|
|
98
|
-
|
|
99
|
-
/* full width minus sidebar width */
|
|
100
|
-
@media (min-width: 1024px) {
|
|
101
|
-
max-width: calc(100% - var(--sidebar-width, 0px));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
</style>
|
|
106
|
-
</Element>
|
|
107
|
-
</Element>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { CollectionEntry } from 'astro:content'
|
|
3
|
-
import { getEntry } from 'astro:content'
|
|
4
|
-
import Blocks from 'fulldev-ui/components/Blocks.astro'
|
|
5
|
-
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
6
|
-
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
7
|
-
import { mergeDeep } from 'remeda'
|
|
8
|
-
|
|
9
|
-
type Props = CollectionEntry<'pages'>
|
|
10
|
-
|
|
11
|
-
const layout = await getEntry('layouts', 'pages')
|
|
12
|
-
const merged = mergeDeep(layout || {}, Astro.props)
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
render,
|
|
16
|
-
data: { blocks },
|
|
17
|
-
} = merged
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<Layout {...merged}>
|
|
21
|
-
<Prose
|
|
22
|
-
{render}
|
|
23
|
-
toc={false}
|
|
24
|
-
/>
|
|
25
|
-
<Blocks {blocks} />
|
|
26
|
-
<slot />
|
|
27
|
-
</Layout>
|