fulldev-ui 0.6.0-beta-4 → 0.6.0-beta-5
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/cloudcannon.config.yml +25 -7
- package/package.json +1 -1
- package/src/blocks/Banner.astro +2 -2
- package/src/blocks/Contact1.astro +2 -2
- package/src/blocks/Content1.astro +77 -0
- package/src/blocks/Content2.astro +91 -0
- package/src/blocks/Content3.astro +70 -0
- package/src/blocks/Content4.astro +72 -0
- package/src/blocks/Cta1.astro +16 -30
- package/src/blocks/Feature1.astro +19 -25
- package/src/blocks/Features1.astro +23 -32
- package/src/blocks/Footer.astro +2 -2
- package/src/blocks/Header.astro +2 -2
- package/src/blocks/Hero1.astro +22 -36
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +2 -2
- package/src/blocks/Reviews1.astro +2 -2
- package/src/components/Block.astro +5 -24
- package/src/components/{Banner.astro → Group.astro} +5 -6
- package/src/components/Heading.astro +1 -1
- package/src/components/Layout.astro +1 -1
- package/src/components/Panel.astro +1 -1
- package/src/components/Paragraph.astro +8 -8
- package/src/components/Prose.astro +15 -7
- package/src/components/Section.astro +1 -1
- 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/content/config.ts +2 -3
- package/src/layouts/Category.astro +7 -2
- package/src/layouts/Doc.astro +4 -20
- package/src/layouts/Job.astro +16 -20
- package/src/layouts/Page.astro +5 -6
- package/src/layouts/Post.astro +39 -7
- package/src/layouts/Product.astro +5 -1
- package/src/schemas/components/block.ts +57 -19
- package/src/schemas/imageSchema.ts +3 -3
- package/src/schemas/{pageSchema.ts → page.ts} +10 -2
- package/tailwind.config.ts +4 -0
- package/src/blocks/Job1.astro +0 -97
- 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 -19
- package/src/schemas/blocks/feature.ts +0 -18
- package/src/schemas/blocks/features.ts +0 -24
- 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/blocks/reviews.ts +0 -24
- package/src/schemas/layoutSchema.ts +0 -22
package/src/blocks/Hero1.astro
CHANGED
|
@@ -3,15 +3,15 @@ import type { ComponentProps } from 'astro/types'
|
|
|
3
3
|
import Badge from 'fulldev-ui/components/Badge.astro'
|
|
4
4
|
import Buttons from 'fulldev-ui/components/Buttons.astro'
|
|
5
5
|
import Container from 'fulldev-ui/components/Container.astro'
|
|
6
|
-
import Element from 'fulldev-ui/components/Element.astro'
|
|
7
6
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
8
7
|
import Image from 'fulldev-ui/components/Image.astro'
|
|
9
8
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
10
9
|
import Section from 'fulldev-ui/components/Section.astro'
|
|
11
10
|
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
12
|
-
import
|
|
11
|
+
import Writeup from 'fulldev-ui/components/Writeup.astro'
|
|
12
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/components/block'
|
|
13
13
|
|
|
14
|
-
interface Props extends ComponentProps<typeof Section>,
|
|
14
|
+
interface Props extends ComponentProps<typeof Section>, BlockSchema {}
|
|
15
15
|
|
|
16
16
|
const { badge, tagline, heading, paragraph, buttons, image, ...rest } =
|
|
17
17
|
Astro.props
|
|
@@ -22,31 +22,29 @@ const { badge, tagline, heading, paragraph, buttons, image, ...rest } =
|
|
|
22
22
|
{...rest}
|
|
23
23
|
>
|
|
24
24
|
<Container>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/>
|
|
44
|
-
</Element>
|
|
25
|
+
<Writeup align="center">
|
|
26
|
+
<Badge
|
|
27
|
+
size="lg"
|
|
28
|
+
{...badge}
|
|
29
|
+
/>
|
|
30
|
+
<Tagline
|
|
31
|
+
size="sm"
|
|
32
|
+
text={tagline}
|
|
33
|
+
/>
|
|
34
|
+
<Heading
|
|
35
|
+
as="h1"
|
|
36
|
+
size="6xl"
|
|
37
|
+
text={heading}
|
|
38
|
+
/>
|
|
39
|
+
<Paragraph
|
|
40
|
+
size="xl"
|
|
41
|
+
text={paragraph}
|
|
42
|
+
/>
|
|
45
43
|
<Buttons
|
|
46
44
|
{buttons}
|
|
47
45
|
size="lg"
|
|
48
46
|
/>
|
|
49
|
-
</
|
|
47
|
+
</Writeup>
|
|
50
48
|
<Image {...image} />
|
|
51
49
|
</Container>
|
|
52
50
|
</Section>
|
|
@@ -54,18 +52,6 @@ const { badge, tagline, heading, paragraph, buttons, image, ...rest } =
|
|
|
54
52
|
<style is:global>
|
|
55
53
|
@layer fulldev {
|
|
56
54
|
.hero-1 {
|
|
57
|
-
.hero-1-segment {
|
|
58
|
-
@apply flex flex-col items-center gap-8 text-center;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.hero-1-content {
|
|
62
|
-
@apply flex max-w-screen-md flex-col items-center gap-4 text-center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.paragraph {
|
|
66
|
-
@apply text-balance;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
55
|
.image {
|
|
70
56
|
@apply rounded-lg;
|
|
71
57
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Container from 'fulldev-ui/components/Container.astro'
|
|
4
|
+
import Element from 'fulldev-ui/components/Element.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 Section from 'fulldev-ui/components/Section.astro'
|
|
9
|
+
import Writeup from 'fulldev-ui/components/Writeup.astro'
|
|
10
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/components/block.ts'
|
|
11
|
+
|
|
12
|
+
interface Props extends ComponentProps<typeof Section>, BlockSchema {}
|
|
13
|
+
|
|
14
|
+
const { tagline, heading, paragraph, images, ...rest } = Astro.props
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<Section
|
|
18
|
+
class:list="logos-1"
|
|
19
|
+
{...rest}
|
|
20
|
+
>
|
|
21
|
+
<Container>
|
|
22
|
+
<Writeup>
|
|
23
|
+
<Heading
|
|
24
|
+
size="lg"
|
|
25
|
+
text={heading}
|
|
26
|
+
/>
|
|
27
|
+
<Paragraph
|
|
28
|
+
size="sm"
|
|
29
|
+
muted
|
|
30
|
+
text={paragraph}
|
|
31
|
+
/>
|
|
32
|
+
</Writeup>
|
|
33
|
+
<Element class:list="logos-1-cards">
|
|
34
|
+
{images?.map((image) => <Image {...image} />)}
|
|
35
|
+
</Element>
|
|
36
|
+
</Container>
|
|
37
|
+
</Section>
|
|
38
|
+
|
|
39
|
+
<style is:global>
|
|
40
|
+
@layer fulldev {
|
|
41
|
+
.logos-1 {
|
|
42
|
+
.logos-1-cards {
|
|
43
|
+
@apply grid grid-cols-1 gap-6 lg:grid-cols-3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.logos-1-card {
|
|
47
|
+
@apply flex flex-col gap-3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.icon {
|
|
51
|
+
@apply text-primary;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -9,10 +9,10 @@ import Heading from 'fulldev-ui/components/Heading.astro'
|
|
|
9
9
|
import Image from 'fulldev-ui/components/Image.astro'
|
|
10
10
|
import Price from 'fulldev-ui/components/Price.astro'
|
|
11
11
|
import Section from 'fulldev-ui/components/Section.astro'
|
|
12
|
-
import type {
|
|
12
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/components/block'
|
|
13
13
|
import { getHref } from 'fulldev-ui/utils/getHref'
|
|
14
14
|
|
|
15
|
-
interface Props extends ComponentProps<typeof Section>,
|
|
15
|
+
interface Props extends ComponentProps<typeof Section>, BlockSchema {}
|
|
16
16
|
|
|
17
17
|
const { heading, button, products, ...rest } = Astro.props
|
|
18
18
|
|
|
@@ -7,9 +7,9 @@ import Icon from 'fulldev-ui/components/Icon.astro'
|
|
|
7
7
|
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
8
8
|
import Section from 'fulldev-ui/components/Section.astro'
|
|
9
9
|
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
10
|
-
import type {
|
|
10
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/components/block'
|
|
11
11
|
|
|
12
|
-
interface Props extends ComponentProps<typeof Section>,
|
|
12
|
+
interface Props extends ComponentProps<typeof Section>, BlockSchema {}
|
|
13
13
|
|
|
14
14
|
const { tagline, heading, paragraph, cards, ...rest } = Astro.props
|
|
15
15
|
---
|
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { getEntries } from 'astro:content'
|
|
3
|
-
import type {
|
|
4
|
-
import type { CategoriesSchema } from 'fulldev-ui/schemas/blocks/categories'
|
|
5
|
-
import type { CtaSchema } from 'fulldev-ui/schemas/blocks/cta'
|
|
6
|
-
import type { FeatureSchema } from 'fulldev-ui/schemas/blocks/feature'
|
|
7
|
-
import type { HeroSchema } from 'fulldev-ui/schemas/blocks/hero'
|
|
8
|
-
import type { ProductsSchema } from 'fulldev-ui/schemas/blocks/products'
|
|
9
|
-
import type { FooterSchema } from 'fulldev-ui/schemas/components/footer'
|
|
10
|
-
import type { HeaderSchema } from 'fulldev-ui/schemas/components/header'
|
|
3
|
+
import type { BlockSchema } from 'fulldev-ui/schemas/components/block'
|
|
11
4
|
|
|
12
|
-
interface Props
|
|
13
|
-
extends HeroSchema,
|
|
14
|
-
CtaSchema,
|
|
15
|
-
FeatureSchema,
|
|
16
|
-
CategoriesSchema,
|
|
17
|
-
ProductsSchema,
|
|
18
|
-
HeaderSchema,
|
|
19
|
-
FooterSchema,
|
|
20
|
-
BannerSchema {
|
|
21
|
-
_block: string
|
|
22
|
-
}
|
|
5
|
+
interface Props extends BlockSchema {}
|
|
23
6
|
|
|
24
|
-
let { _block,
|
|
7
|
+
let { _block, pages, ...rest } = Astro.props
|
|
25
8
|
|
|
26
|
-
|
|
27
|
-
categories = categories && (await getEntries(categories))
|
|
9
|
+
pages = pages && (await getEntries(pages))
|
|
28
10
|
|
|
29
11
|
const blocks = {
|
|
30
12
|
...import.meta.glob('/src/blocks/**/*.astro'),
|
|
@@ -41,8 +23,7 @@ const BlockComponent = path && (await (blocks[path] as any)()).default
|
|
|
41
23
|
{
|
|
42
24
|
BlockComponent && (
|
|
43
25
|
<BlockComponent
|
|
44
|
-
{
|
|
45
|
-
{categories}
|
|
26
|
+
{pages}
|
|
46
27
|
{...rest}
|
|
47
28
|
/>
|
|
48
29
|
)
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
4
|
|
|
5
|
-
interface Props extends HTMLAttributes<'
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
6
|
as?: HTMLTag
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const {
|
|
9
|
+
const { ...rest } = Astro.props
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
<Element
|
|
13
|
-
class:list="
|
|
14
|
-
{as}
|
|
13
|
+
class:list="group"
|
|
15
14
|
{...rest}
|
|
16
15
|
>
|
|
17
16
|
<slot />
|
|
@@ -19,8 +18,8 @@ const { as = 'header', ...rest } = Astro.props
|
|
|
19
18
|
|
|
20
19
|
<style is:global>
|
|
21
20
|
@layer fulldev {
|
|
22
|
-
.
|
|
23
|
-
@apply
|
|
21
|
+
.group {
|
|
22
|
+
@apply flex flex-wrap justify-stretch gap-2;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
</style>
|
|
@@ -4,7 +4,7 @@ import Element from 'fulldev-ui/components/Element.astro'
|
|
|
4
4
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
5
5
|
import { slugify } from 'fulldev-ui/utils/slugify'
|
|
6
6
|
|
|
7
|
-
interface Props extends GlobalProps, HTMLAttributes<'h2'> {
|
|
7
|
+
interface Props extends GlobalProps, HTMLAttributes<'h2'>, HTMLAttributes<'a'> {
|
|
8
8
|
as?: HTMLTag
|
|
9
9
|
text?: string | undefined
|
|
10
10
|
muted?: boolean | undefined
|
|
@@ -3,7 +3,7 @@ import type { HTMLAttributes } from 'astro/types'
|
|
|
3
3
|
import Head from 'fulldev-ui/components/Head.astro'
|
|
4
4
|
import type { HeadSchema } from 'fulldev-ui/schemas/components/head'
|
|
5
5
|
|
|
6
|
-
type Props = HTMLAttributes<'body'> & {
|
|
6
|
+
type Props = Omit<HTMLAttributes<'body'>, 'title'> & {
|
|
7
7
|
head?: HeadSchema
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ const { ...rest } = Astro.props
|
|
|
19
19
|
<style is:global>
|
|
20
20
|
@layer fulldev {
|
|
21
21
|
.panel {
|
|
22
|
-
@apply w-full gap-x-gutter rounded-lg border bg-card px-gutter py-
|
|
22
|
+
@apply w-full gap-x-gutter rounded-lg border bg-card px-gutter py-20 text-card-foreground lg:px-20;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
</style>
|
|
@@ -13,7 +13,7 @@ const { as = 'p', text, ...rest } = Astro.props
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<Element
|
|
16
|
-
class:list="
|
|
16
|
+
class:list="paragraph"
|
|
17
17
|
{as}
|
|
18
18
|
{...rest}
|
|
19
19
|
>
|
|
@@ -23,32 +23,32 @@ const { as = 'p', text, ...rest } = Astro.props
|
|
|
23
23
|
|
|
24
24
|
<style is:global>
|
|
25
25
|
@layer fulldev {
|
|
26
|
-
.
|
|
26
|
+
.paragraph,
|
|
27
27
|
.prose-content p {
|
|
28
|
-
@apply
|
|
28
|
+
@apply text-foreground;
|
|
29
29
|
|
|
30
30
|
&.muted {
|
|
31
31
|
@apply text-muted-foreground;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&.size-xs {
|
|
35
|
-
@apply text-xs;
|
|
35
|
+
@apply text-xs leading-relaxed;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&.size-sm {
|
|
39
|
-
@apply text-sm;
|
|
39
|
+
@apply text-sm leading-relaxed;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&.size-md {
|
|
43
|
-
@apply text-base;
|
|
43
|
+
@apply text-base leading-relaxed;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&.size-lg {
|
|
47
|
-
@apply text-lg;
|
|
47
|
+
@apply text-lg leading-relaxed;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
&.size-xl {
|
|
51
|
-
@apply text-xl;
|
|
51
|
+
@apply text-xl leading-relaxed;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -19,14 +19,14 @@ const { ...rest } = Astro.props
|
|
|
19
19
|
<style is:global>
|
|
20
20
|
@layer fulldev {
|
|
21
21
|
.prose {
|
|
22
|
-
@apply relative w-full max-w-screen-md
|
|
22
|
+
@apply relative w-full max-w-screen-md;
|
|
23
23
|
|
|
24
24
|
> * {
|
|
25
|
-
@apply mt-6
|
|
25
|
+
@apply mt-6;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
p {
|
|
29
|
-
@apply mt-4
|
|
29
|
+
@apply mt-4;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
code:not(.astro-code code) {
|
|
@@ -39,7 +39,7 @@ const { ...rest } = Astro.props
|
|
|
39
39
|
h4,
|
|
40
40
|
h5,
|
|
41
41
|
h6 {
|
|
42
|
-
@apply
|
|
42
|
+
@apply scroll-m-20 font-bold;
|
|
43
43
|
|
|
44
44
|
code {
|
|
45
45
|
font-size: inherit !important;
|
|
@@ -51,11 +51,11 @@ const { ...rest } = Astro.props
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
> h2 {
|
|
54
|
-
@apply text-2xl;
|
|
54
|
+
@apply mt-10 text-2xl;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
> h3 {
|
|
58
|
-
@apply text-xl;
|
|
58
|
+
@apply mt-8 text-xl;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
> h4 {
|
|
@@ -71,7 +71,15 @@ const { ...rest } = Astro.props
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
> aside {
|
|
74
|
-
@apply
|
|
74
|
+
@apply rounded-md border border-destructive p-4 text-destructive;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
img {
|
|
78
|
+
@apply my-12 rounded-lg;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> *:first-child {
|
|
82
|
+
@apply mt-0;
|
|
75
83
|
}
|
|
76
84
|
}
|
|
77
85
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
as?: HTMLTag
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { ...rest } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Element
|
|
13
|
+
class:list="stack"
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</Element>
|
|
18
|
+
|
|
19
|
+
<style is:global>
|
|
20
|
+
@layer fulldev {
|
|
21
|
+
.stack {
|
|
22
|
+
@apply relative grid w-full auto-cols-fr items-start gap-x-16 gap-y-8 lg:grid-flow-col;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
package/src/components/Toc.astro
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { MarkdownHeading } from 'astro'
|
|
3
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
4
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
5
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
6
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
7
|
-
import
|
|
7
|
+
import Link from './Link.astro'
|
|
8
8
|
|
|
9
9
|
interface Props extends GlobalProps, HTMLAttributes<'div'> {
|
|
10
|
-
|
|
11
|
-
render?: CollectionEntry<'pages'>['render'] | undefined
|
|
10
|
+
headings?: MarkdownHeading[] | undefined
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
const {
|
|
13
|
+
const { headings, ...rest } = Astro.props
|
|
15
14
|
|
|
16
|
-
const headings = render ? (await render())?.headings : []
|
|
17
15
|
const filteredHeadings = headings?.filter(
|
|
18
16
|
(heading: any) => heading.depth >= 2 && heading.depth <= 4
|
|
19
17
|
)
|
|
18
|
+
|
|
19
|
+
const h1 = headings?.find((heading: any) => heading.depth === 1)
|
|
20
|
+
|
|
20
21
|
const links = filteredHeadings?.map((button: any) => ({
|
|
21
22
|
text: button.text,
|
|
22
23
|
href: `#${button.slug}`,
|
|
@@ -25,41 +26,32 @@ const links = filteredHeadings?.map((button: any) => ({
|
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
<Element
|
|
28
|
-
if={filteredHeadings?.length > 1}
|
|
29
29
|
class:list="toc"
|
|
30
|
-
{
|
|
30
|
+
if={filteredHeadings?.length}
|
|
31
31
|
{...rest}
|
|
32
32
|
>
|
|
33
33
|
<Heading
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
/>
|
|
38
|
-
<Links
|
|
39
|
-
direction="column"
|
|
40
|
-
{links}
|
|
41
|
-
{size}
|
|
34
|
+
as="a"
|
|
35
|
+
href="#"
|
|
36
|
+
{...h1}
|
|
42
37
|
/>
|
|
38
|
+
{
|
|
39
|
+
links?.map((link) => (
|
|
40
|
+
<Link
|
|
41
|
+
variant="muted"
|
|
42
|
+
size="sm"
|
|
43
|
+
{...link}
|
|
44
|
+
/>
|
|
45
|
+
))
|
|
46
|
+
}
|
|
43
47
|
</Element>
|
|
44
48
|
|
|
45
49
|
<style is:global>
|
|
46
50
|
@layer fulldev {
|
|
47
51
|
.toc {
|
|
48
|
-
@apply sticky bottom-0 z-10 hidden shrink-0 flex-col items-start justify-start gap-3 overflow-y-auto
|
|
52
|
+
@apply lg:top-sticky-16 sticky bottom-0 z-10 hidden w-48 shrink-0 flex-col items-start justify-start gap-3 overflow-y-auto md:flex;
|
|
49
53
|
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
50
54
|
|
|
51
|
-
--headers: calc(var(--header-height, 0px) + var(--subheader-height, 0px));
|
|
52
|
-
top: var(--headers);
|
|
53
|
-
width: var(--toc-width);
|
|
54
|
-
max-height: calc(100vh - var(--headers));
|
|
55
|
-
|
|
56
|
-
&,
|
|
57
|
-
& ~ * {
|
|
58
|
-
@media (min-width: 768px) {
|
|
59
|
-
--toc-width: 12rem;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
55
|
.depth-3 {
|
|
64
56
|
@apply pl-3;
|
|
65
57
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
as?: HTMLTag
|
|
7
|
+
align?: 'left' | 'center' | 'right'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { align = 'start', ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Element
|
|
14
|
+
class:list="writeup"
|
|
15
|
+
{align}
|
|
16
|
+
{...rest}
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</Element>
|
|
20
|
+
|
|
21
|
+
<style is:global>
|
|
22
|
+
@layer fulldev {
|
|
23
|
+
.writeup {
|
|
24
|
+
@apply relative w-full;
|
|
25
|
+
|
|
26
|
+
&.align-left {
|
|
27
|
+
@apply mr-auto flex flex-col items-start text-left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.align-center {
|
|
31
|
+
@apply mx-auto flex flex-col items-center text-center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.align-right {
|
|
35
|
+
@apply ml-auto flex flex-col items-end text-right;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.heading {
|
|
39
|
+
@apply max-w-screen-lg text-balance;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.paragraph {
|
|
43
|
+
@apply max-w-screen-md text-balance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> * {
|
|
47
|
+
& + * {
|
|
48
|
+
@apply mt-4;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& + .group,
|
|
52
|
+
& + .button,
|
|
53
|
+
& + .buttons {
|
|
54
|
+
@apply mt-8;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
package/src/content/config.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineCollection } from 'astro:content'
|
|
2
|
-
import {
|
|
3
|
-
import { pageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
|
|
2
|
+
import { pageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
4
3
|
|
|
5
4
|
export const collections = {
|
|
6
5
|
pages: defineCollection({
|
|
@@ -9,6 +8,6 @@ export const collections = {
|
|
|
9
8
|
}),
|
|
10
9
|
layouts: defineCollection({
|
|
11
10
|
type: 'data',
|
|
12
|
-
schema:
|
|
11
|
+
schema: pageSchema,
|
|
13
12
|
}),
|
|
14
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import type { CollectionEntry } from 'astro:content'
|
|
3
4
|
import { getCollection } from 'astro:content'
|
|
4
5
|
import Products1 from 'fulldev-ui/blocks/Products1.astro'
|
|
5
6
|
import Carousel from 'fulldev-ui/components/Carousel.astro'
|
|
@@ -7,9 +8,13 @@ import Element from 'fulldev-ui/components/Element.astro'
|
|
|
7
8
|
import Layout from 'fulldev-ui/components/Layout.astro'
|
|
8
9
|
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
9
10
|
import Select from 'fulldev-ui/components/Select.astro'
|
|
10
|
-
import {
|
|
11
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
12
|
+
import { getHref } from 'fulldev-ui/utils/getHref.ts'
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
15
|
+
render: CollectionEntry<'pages'>['render']
|
|
16
|
+
slug: CollectionEntry<'pages'>['slug']
|
|
17
|
+
}
|
|
13
18
|
|
|
14
19
|
const { render, slug, title, description } = Astro.props
|
|
15
20
|
|
package/src/layouts/Doc.astro
CHANGED
|
@@ -11,13 +11,11 @@ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
|
11
11
|
import Prose from 'fulldev-ui/components/Prose.astro'
|
|
12
12
|
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
13
13
|
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
14
|
-
import type {
|
|
15
|
-
import type { PageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
|
|
14
|
+
import type { PageSchema } from 'fulldev-ui/schemas/page.ts'
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Pick<CollectionEntry<'pages'>, 'render'>
|
|
16
|
+
interface Props extends ComponentProps<typeof Layout>, PageSchema {
|
|
17
|
+
render: CollectionEntry<'pages'>['render']
|
|
18
|
+
}
|
|
21
19
|
|
|
22
20
|
const { header, sidebar, render, title, description, footer } = Astro.props
|
|
23
21
|
|
|
@@ -56,17 +54,3 @@ const { Content } = await render()
|
|
|
56
54
|
</Container>
|
|
57
55
|
<Footer {...footer} />
|
|
58
56
|
</Layout>
|
|
59
|
-
|
|
60
|
-
<style is:global>
|
|
61
|
-
@layer fulldev {
|
|
62
|
-
.doc {
|
|
63
|
-
.doc-container {
|
|
64
|
-
@apply flex gap-x-gutter;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.doc-main {
|
|
68
|
-
@apply flex grow justify-evenly gap-x-gutter;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</style>
|