fulldev-ui 0.6.0-beta.9 → 0.6.0

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.
Files changed (153) hide show
  1. package/astro.config.ts +6 -8
  2. package/cloudcannon.config.yml +57 -86
  3. package/package.json +2 -1
  4. package/public/images/block-code.png +0 -0
  5. package/public/images/component-code.png +0 -0
  6. package/src/blocks/Banner.astro +3 -5
  7. package/src/blocks/Colleagues1.astro +4 -3
  8. package/src/blocks/Content1.astro +6 -28
  9. package/src/blocks/Content2.astro +25 -49
  10. package/src/blocks/Content3.astro +25 -54
  11. package/src/blocks/Content4.astro +27 -50
  12. package/src/blocks/Content5.astro +7 -37
  13. package/src/blocks/Content6.astro +56 -0
  14. package/src/blocks/Content7.astro +64 -0
  15. package/src/blocks/Content8.astro +47 -0
  16. package/src/blocks/Cta1.astro +6 -9
  17. package/src/blocks/Cta2.astro +52 -0
  18. package/src/blocks/Features1.astro +5 -4
  19. package/src/blocks/Features2.astro +70 -0
  20. package/src/blocks/Footer.astro +2 -6
  21. package/src/blocks/Header.astro +8 -25
  22. package/src/blocks/Hero1.astro +19 -27
  23. package/src/blocks/Intro1.astro +3 -4
  24. package/src/blocks/{Industries1.astro → JobCategories1.astro} +13 -38
  25. package/src/blocks/JobCategory1.astro +90 -0
  26. package/src/blocks/Jobs1.astro +7 -10
  27. package/src/blocks/Logos1.astro +4 -4
  28. package/src/blocks/Pages1.astro +85 -0
  29. package/src/blocks/Pricings1.astro +61 -0
  30. package/src/blocks/Products1.astro +7 -10
  31. package/src/blocks/Projects1.astro +59 -83
  32. package/src/blocks/Reviews1.astro +10 -10
  33. package/src/blocks/Subheader.astro +4 -9
  34. package/src/blocks/{Contact1.astro → _Contact1.astro} +1 -3
  35. package/src/components/Avatar.astro +40 -0
  36. package/src/components/Avatars.astro +20 -0
  37. package/src/components/Badge.astro +6 -35
  38. package/src/components/Block.astro +19 -4
  39. package/src/components/Chip.astro +73 -0
  40. package/src/components/Element.astro +1 -0
  41. package/src/components/Heading.astro +13 -5
  42. package/src/components/Image.astro +1 -1
  43. package/src/components/Link.astro +1 -1
  44. package/src/components/Menu.astro +9 -5
  45. package/src/components/Proof.astro +52 -0
  46. package/src/components/Toc.astro +33 -35
  47. package/src/content/config.ts +5 -0
  48. package/src/content/layouts/base.yml +133 -143
  49. package/src/content/pages/{base → _base}/toggle.mdx +1 -1
  50. package/src/content/pages/_showcase/stark-vulcanising-products.md +0 -1
  51. package/src/content/pages/docs/blocks/_categories.mdx +1 -17
  52. package/src/content/pages/docs/blocks/banner.mdx +1 -1
  53. package/src/content/pages/docs/blocks/colleagues.mdx +1 -1
  54. package/src/content/pages/docs/blocks/content.mdx +162 -1
  55. package/src/content/pages/docs/blocks/cta.mdx +1 -1
  56. package/src/content/pages/docs/blocks/features.mdx +66 -1
  57. package/src/content/pages/docs/blocks/footer.mdx +1 -1
  58. package/src/content/pages/docs/blocks/header.mdx +1 -1
  59. package/src/content/pages/docs/blocks/hero.mdx +1 -1
  60. package/src/content/pages/docs/blocks/intro.mdx +1 -1
  61. package/src/content/pages/docs/blocks/logos.mdx +1 -1
  62. package/src/content/pages/docs/blocks/projects.mdx +1 -1
  63. package/src/content/pages/docs/blocks/reviews.mdx +1 -1
  64. package/src/content/pages/docs/blocks.mdx +1 -7
  65. package/src/content/pages/docs/collections/images.mdx +1 -1
  66. package/src/content/pages/docs/collections/pages.mdx +1 -1
  67. package/src/content/pages/docs/collections/presets.mdx +1 -1
  68. package/src/content/pages/docs/components/_localeswitcher.mdx +1 -1
  69. package/src/content/pages/docs/components/_table.mdx +1 -1
  70. package/src/content/pages/docs/components/_tagline.mdx +1 -1
  71. package/src/content/pages/docs/components/_themer.mdx +1 -1
  72. package/src/content/pages/docs/components/_toggle.mdx +1 -1
  73. package/src/content/pages/docs/components/avatar.mdx +32 -0
  74. package/src/content/pages/docs/components/badge.mdx +1 -34
  75. package/src/content/pages/docs/components/badges.mdx +1 -13
  76. package/src/content/pages/docs/components/button.mdx +1 -1
  77. package/src/content/pages/docs/components/buttons.mdx +1 -1
  78. package/src/content/pages/docs/components/channel.mdx +1 -1
  79. package/src/content/pages/docs/components/channels.mdx +1 -1
  80. package/src/content/pages/docs/components/checkbox.mdx +1 -1
  81. package/src/content/pages/docs/components/chip.mdx +75 -0
  82. package/src/content/pages/docs/components/heading.mdx +1 -1
  83. package/src/content/pages/docs/components/icon.mdx +1 -1
  84. package/src/content/pages/docs/components/image.mdx +2 -1
  85. package/src/content/pages/docs/components/input.mdx +1 -1
  86. package/src/content/pages/docs/components/label.mdx +1 -1
  87. package/src/content/pages/docs/components/link.mdx +1 -1
  88. package/src/content/pages/docs/components/links.mdx +11 -52
  89. package/src/content/pages/docs/components/list.mdx +1 -1
  90. package/src/content/pages/docs/components/logo.mdx +1 -1
  91. package/src/content/pages/docs/components/menu.mdx +5 -18
  92. package/src/content/pages/docs/components/paragraph.mdx +1 -1
  93. package/src/content/pages/docs/components/rating.mdx +1 -1
  94. package/src/content/pages/docs/components/select.mdx +1 -1
  95. package/src/content/pages/docs/components/social.mdx +1 -1
  96. package/src/content/pages/docs/components/socials.mdx +1 -1
  97. package/src/content/pages/docs/components/switch.mdx +1 -1
  98. package/src/content/pages/docs/components/tagline.mdx +1 -1
  99. package/src/content/pages/docs/components/textarea.mdx +1 -1
  100. package/src/content/pages/docs/components.mdx +1 -1
  101. package/src/content/pages/docs/customization.mdx +1 -1
  102. package/src/content/pages/docs/frameworks.mdx +1 -1
  103. package/src/content/pages/docs/index.mdx +1 -1
  104. package/src/content/pages/docs/installation.mdx +1 -24
  105. package/src/content/pages/docs/layouts/doc.mdx +1 -1
  106. package/src/content/pages/docs/layouts/page.mdx +1 -1
  107. package/src/content/pages/docs/pages.mdx +1 -1
  108. package/src/content/pages/docs/structures/_card.mdx +1 -1
  109. package/src/content/pages/docs/structures/_dialog.mdx +1 -1
  110. package/src/content/pages/docs/structures/_drawer.mdx +1 -1
  111. package/src/content/pages/docs/structures/card.mdx +1 -1
  112. package/src/content/pages/docs/structures/code.mdx +1 -1
  113. package/src/content/pages/docs/structures/container.mdx +1 -1
  114. package/src/content/pages/docs/structures/drawer.mdx +1 -1
  115. package/src/content/pages/docs/structures/group.mdx +1 -1
  116. package/src/content/pages/docs/structures/layout.mdx +1 -1
  117. package/src/content/pages/docs/structures/masonry.mdx +1 -1
  118. package/src/content/pages/docs/structures/matrix.mdx +1 -1
  119. package/src/content/pages/docs/structures/panel.mdx +1 -1
  120. package/src/content/pages/docs/structures/prose.mdx +1 -1
  121. package/src/content/pages/docs/structures/section.mdx +1 -1
  122. package/src/content/pages/docs/structures/stack.mdx +1 -1
  123. package/src/content/pages/docs/structures/writeup.mdx +1 -1
  124. package/src/content/pages/docs/structures.mdx +1 -1
  125. package/src/content/pages/index.mdx +20 -25
  126. package/src/layouts/Page.astro +44 -10
  127. package/src/layouts/{Product.astro → _Product.astro} +6 -6
  128. package/src/pages/test.astro +16 -0
  129. package/src/schemas/block.ts +18 -44
  130. package/src/schemas/button.ts +2 -0
  131. package/src/schemas/card.ts +43 -0
  132. package/src/schemas/{badge.ts → chip.ts} +3 -3
  133. package/src/schemas/page.ts +4 -18
  134. package/src/schemas/proof.ts +12 -0
  135. package/src/structures/Drawer.astro +2 -3
  136. package/src/structures/Prose.astro +31 -40
  137. package/src/structures/Section.astro +1 -1
  138. package/src/structures/Sidebar.astro +3 -4
  139. package/src/structures/Split.astro +38 -0
  140. package/tailwind.config.ts +4 -1
  141. package/pnpm-lock.yaml +0 -5186
  142. package/src/blocks/_Hero.astro +0 -245
  143. package/src/components/Blocks.astro +0 -26
  144. package/src/components/Sidebar.astro +0 -43
  145. package/src/content/pages/docs/blocks/feature.mdx +0 -17
  146. package/src/content/pages/docs/layouts.mdx +0 -80
  147. package/src/layouts/Block.astro +0 -81
  148. package/src/layouts/Category.astro +0 -136
  149. package/src/layouts/Doc.astro +0 -96
  150. package/src/layouts/Job.astro +0 -60
  151. package/src/layouts/Jobs.astro +0 -72
  152. package/src/layouts/Post.astro +0 -53
  153. /package/src/content/pages/{posts → _posts}/post.md +0 -0
@@ -1,6 +1,4 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
- import type { CollectionEntry } from 'astro:content'
4
2
  import Button from 'fulldev-ui/components/Button.astro'
5
3
  import Element from 'fulldev-ui/components/Element.astro'
6
4
  import Heading from 'fulldev-ui/components/Heading.astro'
@@ -12,24 +10,22 @@ import Container from 'fulldev-ui/structures/Container.astro'
12
10
  import Matrix from 'fulldev-ui/structures/Matrix.astro'
13
11
  import Section from 'fulldev-ui/structures/Section.astro'
14
12
  import Writeup from 'fulldev-ui/structures/Writeup.astro'
15
- import { getHref } from 'fulldev-ui/utils/getHref'
16
13
 
17
- interface Props extends ComponentProps<typeof Section>, BlockSchema {
18
- pages: CollectionEntry<'pages'>[]
19
- }
14
+ interface Props extends BlockSchema {}
20
15
 
21
- const { heading, button, pages, ...rest } = Astro.props
16
+ const { depth = 2, heading, button, cards, ...rest } = Astro.props
22
17
  ---
23
18
 
24
19
  <Section
25
- class:list="industries-1"
20
+ class="job-categories-1"
26
21
  {...rest}
27
22
  >
28
- <Container>
29
- <Element class:list="industries-1-segment">
23
+ <Container class="flex flex-col gap-12">
24
+ <Element class="flex items-center justify-between gap-8">
30
25
  <Heading
31
26
  size="3xl"
32
27
  text={heading}
28
+ {depth}
33
29
  />
34
30
  <Button
35
31
  size="sm"
@@ -37,19 +33,20 @@ const { heading, button, pages, ...rest } = Astro.props
37
33
  {...button}
38
34
  />
39
35
  </Element>
40
- <Matrix size="lg">
36
+ <Matrix>
41
37
  {
42
- pages?.map(({ slug, data: { title, list, image } }) => (
38
+ cards?.map(({ href, heading, list, image }) => (
43
39
  <Card
44
- class="industries-1-card"
45
- href={getHref(slug)}
40
+ class="p-0"
41
+ {href}
46
42
  >
47
43
  <Image {...image} />
48
- <Writeup>
44
+ <Writeup class="p-4">
49
45
  <Heading
46
+ depth={(depth + 1) as 3}
50
47
  as="h2"
51
48
  size="lg"
52
- text={title}
49
+ text={heading}
53
50
  />
54
51
  <List
55
52
  size="sm"
@@ -62,25 +59,3 @@ const { heading, button, pages, ...rest } = Astro.props
62
59
  </Matrix>
63
60
  </Container>
64
61
  </Section>
65
-
66
- <style is:global>
67
- @layer fulldev {
68
- .industries-1 {
69
- .container {
70
- @apply flex flex-col gap-12;
71
- }
72
-
73
- .industries-1-segment {
74
- @apply flex items-center justify-between gap-8;
75
- }
76
-
77
- .card {
78
- @apply overflow-hidden p-0;
79
-
80
- .writeup {
81
- @apply p-4;
82
- }
83
- }
84
- }
85
- }
86
- </style>
@@ -0,0 +1,90 @@
1
+ ---
2
+ import type { CollectionEntry } from 'astro:content'
3
+ import { getCollection } from 'astro:content'
4
+ import Heading from 'fulldev-ui/components/Heading.astro'
5
+ import Image from 'fulldev-ui/components/Image.astro'
6
+ import List from 'fulldev-ui/components/List.astro'
7
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
8
+ import Card from 'fulldev-ui/structures/Card.astro'
9
+ import Container from 'fulldev-ui/structures/Container.astro'
10
+ import Matrix from 'fulldev-ui/structures/Matrix.astro'
11
+ import Prose from 'fulldev-ui/structures/Prose.astro'
12
+ import Section from 'fulldev-ui/structures/Section.astro'
13
+ import { getHref } from 'fulldev-ui/utils/getHref'
14
+
15
+ interface Props {
16
+ slug?: CollectionEntry<'pages'>['slug']
17
+ heading?: string | undefined
18
+ paragraph?: string | undefined
19
+ pages?: CollectionEntry<'pages'>[]
20
+ }
21
+
22
+ const { slug, heading, paragraph, pages, ...rest } = Astro.props
23
+
24
+ // Jobs that reference the current category, or any of `pages` select categories
25
+ const jobs = await getCollection('pages', (page) =>
26
+ page.data.categories?.some(
27
+ (category) =>
28
+ category.slug == slug || pages?.some((p) => p.slug == category.slug)
29
+ )
30
+ )
31
+ ---
32
+
33
+ <Section
34
+ class:list="job-category-1 flex flex-col gap-12 pt-0"
35
+ {...rest}
36
+ >
37
+ <Container class="border-b py-12">
38
+ <Prose>
39
+ <Heading
40
+ as="h1"
41
+ size="3xl"
42
+ text={heading}
43
+ />
44
+ <Paragraph text={paragraph} />
45
+ </Prose>
46
+ </Container>
47
+ <Container class="flex flex-col gap-12">
48
+ <Matrix class="gap-2">
49
+ {
50
+ pages?.map(({ slug, data: { title, image } }) => (
51
+ <Card
52
+ class="grid grid-cols-3 items-center bg-transparent p-0"
53
+ href={getHref(slug)}
54
+ >
55
+ <Image
56
+ class="h-full w-auto rounded-sm object-cover"
57
+ {...image}
58
+ />
59
+ <Heading
60
+ class="col-span-2 p-4"
61
+ as="h3"
62
+ size="md"
63
+ text={title}
64
+ />
65
+ </Card>
66
+ ))
67
+ }
68
+ </Matrix>
69
+ <Matrix>
70
+ {
71
+ jobs?.map(({ slug, data: { title, list } }) => (
72
+ <Card
73
+ class="jobs-1-card flex flex-col gap-3"
74
+ href={getHref(slug)}
75
+ >
76
+ <Heading
77
+ as="h2"
78
+ size="lg"
79
+ text={title}
80
+ />
81
+ <List
82
+ size="sm"
83
+ items={list}
84
+ />
85
+ </Card>
86
+ ))
87
+ }
88
+ </Matrix>
89
+ </Container>
90
+ </Section>
@@ -1,6 +1,4 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
- import type { CollectionEntry } from 'astro:content'
4
2
  import Button from 'fulldev-ui/components/Button.astro'
5
3
  import Element from 'fulldev-ui/components/Element.astro'
6
4
  import Heading from 'fulldev-ui/components/Heading.astro'
@@ -10,13 +8,10 @@ import Card from 'fulldev-ui/structures/Card.astro'
10
8
  import Container from 'fulldev-ui/structures/Container.astro'
11
9
  import Matrix from 'fulldev-ui/structures/Matrix.astro'
12
10
  import Section from 'fulldev-ui/structures/Section.astro'
13
- import { getHref } from 'fulldev-ui/utils/getHref'
14
11
 
15
- interface Props extends ComponentProps<typeof Section>, BlockSchema {
16
- pages: CollectionEntry<'pages'>[]
17
- }
12
+ interface Props extends BlockSchema {}
18
13
 
19
- const { heading, button, pages, ...rest } = Astro.props
14
+ const { depth = 2, heading, button, cards, ...rest } = Astro.props
20
15
  ---
21
16
 
22
17
  <Section
@@ -28,6 +23,7 @@ const { heading, button, pages, ...rest } = Astro.props
28
23
  <Heading
29
24
  size="3xl"
30
25
  text={heading}
26
+ {depth}
31
27
  />
32
28
  <Button
33
29
  size="sm"
@@ -37,15 +33,16 @@ const { heading, button, pages, ...rest } = Astro.props
37
33
  </Element>
38
34
  <Matrix>
39
35
  {
40
- pages?.map(({ slug, data: { title, list } }) => (
36
+ cards?.map(({ href, heading, list }) => (
41
37
  <Card
42
38
  class="jobs-1-card"
43
- href={getHref(slug)}
39
+ {href}
44
40
  >
45
41
  <Heading
42
+ depth={(depth + 1) as 3}
46
43
  as="h2"
47
44
  size="lg"
48
- text={title}
45
+ text={heading}
49
46
  />
50
47
  <List
51
48
  size="sm"
@@ -1,5 +1,4 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
2
  import Element from 'fulldev-ui/components/Element.astro'
4
3
  import Heading from 'fulldev-ui/components/Heading.astro'
5
4
  import Image from 'fulldev-ui/components/Image.astro'
@@ -9,9 +8,9 @@ import Container from 'fulldev-ui/structures/Container.astro'
9
8
  import Section from 'fulldev-ui/structures/Section.astro'
10
9
  import Writeup from 'fulldev-ui/structures/Writeup.astro'
11
10
 
12
- interface Props extends ComponentProps<typeof Section>, BlockSchema {}
11
+ interface Props extends BlockSchema {}
13
12
 
14
- const { tagline, heading, paragraph, images, ...rest } = Astro.props
13
+ const { depth = 2, tagline, heading, paragraph, images, ...rest } = Astro.props
15
14
  ---
16
15
 
17
16
  <Section
@@ -23,6 +22,7 @@ const { tagline, heading, paragraph, images, ...rest } = Astro.props
23
22
  <Heading
24
23
  size="xl"
25
24
  text={heading}
25
+ {depth}
26
26
  />
27
27
  <Paragraph
28
28
  size="sm"
@@ -44,7 +44,7 @@ const { tagline, heading, paragraph, images, ...rest } = Astro.props
44
44
  }
45
45
 
46
46
  .logos-1-cards {
47
- @apply flex flex-wrap justify-center gap-12;
47
+ @apply flex flex-wrap justify-center gap-8;
48
48
  }
49
49
 
50
50
  .image {
@@ -0,0 +1,85 @@
1
+ ---
2
+ // Heading etc left, image and content right, sticky
3
+ import Badges from 'fulldev-ui/components/Badges.astro'
4
+ import Buttons from 'fulldev-ui/components/Buttons.astro'
5
+ import Element from 'fulldev-ui/components/Element.astro'
6
+ import Heading from 'fulldev-ui/components/Heading.astro'
7
+ import Image from 'fulldev-ui/components/Image.astro'
8
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
9
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
10
+ import type { BlockSchema } from 'fulldev-ui/schemas/block'
11
+ import Container from 'fulldev-ui/structures/Container.astro'
12
+ import Group from 'fulldev-ui/structures/Group.astro'
13
+ import Prose from 'fulldev-ui/structures/Prose.astro'
14
+ import Section from 'fulldev-ui/structures/Section.astro'
15
+ import Split from 'fulldev-ui/structures/Split.astro'
16
+
17
+ interface Props extends BlockSchema {}
18
+
19
+ const {
20
+ depth = 2,
21
+ tagline,
22
+ heading,
23
+ paragraph,
24
+ buttons,
25
+ content,
26
+ cards,
27
+ } = Astro.props
28
+ ---
29
+
30
+ <Section class="pages-1">
31
+ <Container>
32
+ <Split class="items-start">
33
+ <Prose class="lg:sticky lg:top-sticky-16 lg:max-w-xl">
34
+ <Tagline text={tagline} />
35
+ <Heading
36
+ as="h2"
37
+ size="4xl"
38
+ text={heading}
39
+ {depth}
40
+ />
41
+ <Paragraph
42
+ muted
43
+ size="lg"
44
+ text={paragraph}
45
+ />
46
+ <Fragment set:html={content} />
47
+ <Group>
48
+ <Buttons
49
+ variant="secondary"
50
+ {buttons}
51
+ />
52
+ </Group>
53
+ </Prose>
54
+ <Element class="flex flex-col gap-8">
55
+ {
56
+ cards?.map(({ href, image, badges, heading, paragraph }) => (
57
+ <Element
58
+ as="a"
59
+ class="flex flex-col gap-2"
60
+ {href}
61
+ >
62
+ <Image
63
+ class="mb-4"
64
+ {...image}
65
+ />
66
+ <Group>
67
+ <Badges
68
+ size="sm"
69
+ {badges}
70
+ />
71
+ </Group>
72
+ <Heading
73
+ depth={(depth + 1) as 3}
74
+ as="h3"
75
+ size="xl"
76
+ text={heading}
77
+ />
78
+ <Paragraph text={paragraph} />
79
+ </Element>
80
+ ))
81
+ }
82
+ </Element>
83
+ </Split>
84
+ </Container>
85
+ </Section>
@@ -0,0 +1,61 @@
1
+ ---
2
+ import Button from 'fulldev-ui/components/Button.astro'
3
+ import Heading from 'fulldev-ui/components/Heading.astro'
4
+ import List from 'fulldev-ui/components/List.astro'
5
+ import Paragraph from 'fulldev-ui/components/Paragraph.astro'
6
+ import Tagline from 'fulldev-ui/components/Tagline.astro'
7
+ import type { BlockSchema } from 'fulldev-ui/schemas/block'
8
+ import Card from 'fulldev-ui/structures/Card.astro'
9
+ import Container from 'fulldev-ui/structures/Container.astro'
10
+ import Prose from 'fulldev-ui/structures/Prose.astro'
11
+ import Section from 'fulldev-ui/structures/Section.astro'
12
+ import Stack from 'fulldev-ui/structures/Stack.astro'
13
+
14
+ interface Props extends BlockSchema {}
15
+
16
+ const { depth = 2, heading, paragraph, cards } = Astro.props
17
+ ---
18
+
19
+ <Section class="pricings-1">
20
+ <Container class="flex flex-col items-center gap-16">
21
+ <Prose class="text-center">
22
+ <Heading
23
+ size="5xl"
24
+ text={heading}
25
+ {depth}
26
+ />
27
+ <Paragraph
28
+ size="xl"
29
+ text={paragraph}
30
+ />
31
+ </Prose>
32
+ <Stack class="mx-auto flex flex-wrap items-stretch justify-center">
33
+ {
34
+ cards?.map(({ tagline, heading, paragraph, list, button }) => (
35
+ <Card class="min-w-sm flex max-w-md flex-col justify-between gap-8 p-8">
36
+ <Prose>
37
+ <Tagline text={tagline} />
38
+ <Heading
39
+ depth={(depth + 1) as 3}
40
+ size="3xl"
41
+ text={heading}
42
+ />
43
+ <Paragraph
44
+ muted
45
+ text={paragraph}
46
+ />
47
+ <List
48
+ size="sm"
49
+ items={list}
50
+ />
51
+ </Prose>
52
+ <Button
53
+ class=""
54
+ {...button}
55
+ />
56
+ </Card>
57
+ ))
58
+ }
59
+ </Stack>
60
+ </Container>
61
+ </Section>
@@ -1,6 +1,4 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
- import { getEntries } from 'astro:content'
4
2
  import Button from 'fulldev-ui/components/Button.astro'
5
3
  import Element from 'fulldev-ui/components/Element.astro'
6
4
  import Heading from 'fulldev-ui/components/Heading.astro'
@@ -10,13 +8,10 @@ import type { BlockSchema } from 'fulldev-ui/schemas/block'
10
8
  import Card from 'fulldev-ui/structures/Card.astro'
11
9
  import Container from 'fulldev-ui/structures/Container.astro'
12
10
  import Section from 'fulldev-ui/structures/Section.astro'
13
- import { getHref } from 'fulldev-ui/utils/getHref'
14
11
 
15
- interface Props extends ComponentProps<typeof Section>, BlockSchema {}
12
+ interface Props extends BlockSchema {}
16
13
 
17
- const { heading, button, products, ...rest } = Astro.props
18
-
19
- const entries = products && (await getEntries(products))
14
+ const { depth = 2, heading, button, cards, ...rest } = Astro.props
20
15
  ---
21
16
 
22
17
  <Section
@@ -28,6 +23,7 @@ const entries = products && (await getEntries(products))
28
23
  <Heading
29
24
  size="2xl"
30
25
  text={heading}
26
+ {depth}
31
27
  />
32
28
  <Button
33
29
  variant="ghost"
@@ -37,14 +33,15 @@ const entries = products && (await getEntries(products))
37
33
  </Element>
38
34
  <Element class:list="products-1-cards">
39
35
  {
40
- entries?.map(({ slug, data: { images, title, price } }) => (
41
- <Card href={getHref(slug)}>
36
+ cards?.map(({ href, images, heading, price }) => (
37
+ <Card {href}>
42
38
  <Image {...images?.[0]} />
43
39
  <Element class:list="products-1-card-content">
44
40
  <Heading
41
+ depth={(depth + 1) as 3}
45
42
  as="h3"
46
43
  size="md"
47
- text={title}
44
+ text={heading}
48
45
  />
49
46
  <Price amount={price} />
50
47
  </Element>
@@ -1,6 +1,4 @@
1
1
  ---
2
- // Heading etc left, image and content right, sticky
3
- import type { ComponentProps } from 'astro/types'
4
2
  import Badges from 'fulldev-ui/components/Badges.astro'
5
3
  import Buttons from 'fulldev-ui/components/Buttons.astro'
6
4
  import Element from 'fulldev-ui/components/Element.astro'
@@ -8,96 +6,74 @@ import Heading from 'fulldev-ui/components/Heading.astro'
8
6
  import Image from 'fulldev-ui/components/Image.astro'
9
7
  import Paragraph from 'fulldev-ui/components/Paragraph.astro'
10
8
  import Tagline from 'fulldev-ui/components/Tagline.astro'
9
+ import type { BlockSchema } from 'fulldev-ui/schemas/block'
11
10
  import Container from 'fulldev-ui/structures/Container.astro'
12
11
  import Group from 'fulldev-ui/structures/Group.astro'
13
12
  import Prose from 'fulldev-ui/structures/Prose.astro'
14
13
  import Section from 'fulldev-ui/structures/Section.astro'
14
+ import Split from 'fulldev-ui/structures/Split.astro'
15
15
 
16
- interface Props extends ComponentProps<typeof Section> {
17
- tagline?: string | undefined
18
- heading?: string | undefined
19
- paragraph?: string | undefined
20
- content?: string | undefined
21
- buttons?: ComponentProps<typeof Buttons>['buttons']
22
- cards?: {
23
- image?: ComponentProps<typeof Image> | undefined
24
- badges?: ComponentProps<typeof Badges>['badges']
25
- heading?: string | undefined
26
- paragraph?: string | undefined
27
- }[]
28
- }
16
+ interface Props extends BlockSchema {}
29
17
 
30
- const { tagline, heading, paragraph, buttons, content, cards, ...rest } =
31
- Astro.props
18
+ const {
19
+ depth = 2,
20
+ tagline,
21
+ heading,
22
+ paragraph,
23
+ buttons,
24
+ content,
25
+ cards,
26
+ } = Astro.props
32
27
  ---
33
28
 
34
- <Section
35
- class:list="projects-1"
36
- {...rest}
37
- >
29
+ <Section class="projects-1">
38
30
  <Container>
39
- <Prose>
40
- <Tagline text={tagline} />
41
- <Heading
42
- as="h2"
43
- size="4xl"
44
- text={heading}
45
- />
46
- <Paragraph
47
- muted
48
- size="lg"
49
- text={paragraph}
50
- />
51
- <Group>
52
- <Buttons {buttons} />
53
- </Group>
54
- </Prose>
55
- <Element class:list="projects-1-cards">
56
- {
57
- cards?.map(({ image, badges, heading, paragraph }) => (
58
- <Element class:list="projects-1-card">
59
- <Image {...image} />
60
- <Group>
61
- <Badges
62
- size="sm"
63
- {badges}
31
+ <Split class="items-start">
32
+ <Prose class="lg:sticky lg:top-sticky-16 lg:max-w-xl">
33
+ <Tagline text={tagline} />
34
+ <Heading
35
+ size="4xl"
36
+ text={heading}
37
+ {depth}
38
+ />
39
+ <Paragraph
40
+ muted
41
+ size="lg"
42
+ text={paragraph}
43
+ />
44
+ <Fragment set:html={content} />
45
+ <Group>
46
+ <Buttons
47
+ variant="secondary"
48
+ {buttons}
49
+ />
50
+ </Group>
51
+ </Prose>
52
+ <Element class="flex flex-col gap-8">
53
+ {
54
+ cards?.map(({ image, badges, heading, paragraph }) => (
55
+ <Element class="flex flex-col gap-2">
56
+ <Image
57
+ class="mb-4"
58
+ {...image}
64
59
  />
65
- </Group>
66
- <Heading
67
- as="h3"
68
- size="xl"
69
- text={heading}
70
- />
71
- <Paragraph text={paragraph} />
72
- </Element>
73
- ))
74
- }
75
- </Element>
60
+ <Group>
61
+ <Badges
62
+ size="sm"
63
+ {badges}
64
+ />
65
+ </Group>
66
+ <Heading
67
+ depth={(depth + 1) as 3}
68
+ as="h3"
69
+ size="xl"
70
+ text={heading}
71
+ />
72
+ <Paragraph text={paragraph} />
73
+ </Element>
74
+ ))
75
+ }
76
+ </Element>
77
+ </Split>
76
78
  </Container>
77
79
  </Section>
78
-
79
- <style is:global>
80
- @layer fulldev {
81
- .projects-1 {
82
- .container {
83
- @apply flex flex-col items-start gap-x-gutter lg:grid lg:grid-cols-2;
84
- }
85
-
86
- .prose {
87
- @apply lg:sticky lg:top-sticky-16 lg:max-w-xl;
88
- }
89
-
90
- .projects-1-cards {
91
- @apply flex flex-col gap-8;
92
- }
93
-
94
- .projects-1-card {
95
- @apply flex flex-col gap-2;
96
-
97
- .image {
98
- @apply mb-4 rounded-md;
99
- }
100
- }
101
- }
102
- }
103
- </style>
@@ -1,9 +1,7 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
2
  import Heading from 'fulldev-ui/components/Heading.astro'
4
- import Image from 'fulldev-ui/components/Image.astro'
5
3
  import Paragraph from 'fulldev-ui/components/Paragraph.astro'
6
- import Rating from 'fulldev-ui/components/Rating.astro'
4
+ import Proof from 'fulldev-ui/components/Proof.astro'
7
5
  import Tagline from 'fulldev-ui/components/Tagline.astro'
8
6
  import type { BlockSchema } from 'fulldev-ui/schemas/block'
9
7
  import Card from 'fulldev-ui/structures/Card.astro'
@@ -12,9 +10,9 @@ import Masonry from 'fulldev-ui/structures/Masonry.astro'
12
10
  import Section from 'fulldev-ui/structures/Section.astro'
13
11
  import Writeup from 'fulldev-ui/structures/Writeup.astro'
14
12
 
15
- interface Props extends ComponentProps<typeof Section>, BlockSchema {}
13
+ interface Props extends BlockSchema {}
16
14
 
17
- const { tagline, heading, paragraph, cards, ...rest } = Astro.props
15
+ const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props
18
16
  ---
19
17
 
20
18
  <Section
@@ -30,19 +28,21 @@ const { tagline, heading, paragraph, cards, ...rest } = Astro.props
30
28
  <Heading
31
29
  size="3xl"
32
30
  text={heading}
31
+ {depth}
33
32
  />
34
33
  <Paragraph text={paragraph} />
35
34
  </Writeup>
36
35
  <Masonry>
37
36
  {
38
- cards?.map(({ rating, heading, paragraph, image }) => (
37
+ cards?.map(({ tagline, avatar, rating, heading, paragraph }) => (
39
38
  <Card class="reviews-1-card">
40
- <Image {...image} />
41
- <Rating
42
- size="sm"
43
- score={rating}
39
+ <Proof
40
+ text={tagline}
41
+ {rating}
42
+ {avatar}
44
43
  />
45
44
  <Heading
45
+ depth={(depth + 1) as 3}
46
46
  as="h3"
47
47
  size="md"
48
48
  text={heading}