fulldev-ui 0.5.0-beta.1 → 0.5.0-beta.10

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 (77) hide show
  1. package/CONTRIBUTING.md +10 -4
  2. package/astro.config.ts +2 -4
  3. package/package.json +6 -4
  4. package/pnpm-lock.yaml +54 -127
  5. package/src/blocks/Article.astro +31 -12
  6. package/src/blocks/Banner.astro +2 -1
  7. package/src/blocks/Contact.astro +7 -30
  8. package/src/blocks/Excerpt.astro +14 -0
  9. package/src/blocks/Intro.astro +3 -1
  10. package/src/blocks/Product.astro +55 -22
  11. package/src/components/Card.astro +11 -5
  12. package/src/components/Cart.astro +38 -0
  13. package/src/components/CartForm.astro +121 -0
  14. package/src/components/CartList.astro +134 -0
  15. package/src/components/CartSummary.astro +147 -0
  16. package/src/components/Drawer.astro +128 -52
  17. package/src/components/Footer.astro +6 -3
  18. package/src/components/Form.astro +49 -0
  19. package/src/components/Header.astro +19 -14
  20. package/src/components/Image.astro +0 -1
  21. package/src/components/Input.astro +6 -0
  22. package/src/components/Menu.astro +56 -0
  23. package/src/components/Price.astro +7 -11
  24. package/src/components/Search.astro +1 -4
  25. package/src/components/Section.astro +2 -1
  26. package/src/components/Sidebar.astro +61 -111
  27. package/src/components/Social.astro +7 -0
  28. package/src/components/ThemeSelect.astro +3 -0
  29. package/src/components/Toc.astro +33 -94
  30. package/src/components/docs/PropsTable.astro +1 -1
  31. package/src/components/experimental/Form.astro +31 -5
  32. package/src/components/experimental/Gallery.astro +50 -126
  33. package/src/components/experimental/Prose.astro +32 -0
  34. package/src/content/pages/base/select.mdx +0 -8
  35. package/src/content/pages/base/textarea.mdx +0 -5
  36. package/src/content/pages/blocks/_product.mdx +73 -2
  37. package/src/content/pages/index.mdx +0 -3
  38. package/src/content/pages/layouts/_layout.mdx +14 -0
  39. package/src/content/pages/layouts/docslayout.mdx +10 -1
  40. package/src/content/pages/overview/components.mdx +5 -0
  41. package/src/content/pages/overview/content-collections.mdx +139 -0
  42. package/src/content/pages/overview/installation.mdx +25 -26
  43. package/src/content/pages/overview/introduction.mdx +16 -10
  44. package/src/content/pages/overview/theming.mdx +69 -0
  45. package/src/content/pages/schemas/page.mdx +6 -0
  46. package/src/content/presets/base.yml +56 -43
  47. package/src/content/presets/blocks.yml +0 -3
  48. package/src/content/presets/docs.yml +3 -62
  49. package/src/env.d.ts +1 -1
  50. package/src/integration/index.ts +31 -33
  51. package/src/layouts/DocsLayout.astro +23 -35
  52. package/src/layouts/Layout.astro +37 -21
  53. package/src/layouts/OverviewLayout.astro +17 -10
  54. package/src/layouts/PostLayout.astro +7 -7
  55. package/src/layouts/ProductLayout.astro +5 -2
  56. package/src/schemas/components/footer.ts +1 -0
  57. package/src/schemas/components/header.ts +1 -0
  58. package/src/schemas/components/menu.ts +13 -0
  59. package/src/schemas/components/sidebar.ts +15 -0
  60. package/src/schemas/components/toc.ts +3 -0
  61. package/src/schemas/pageSchema.ts +72 -34
  62. package/src/schemas/presetSchema.ts +2 -28
  63. package/src/schemas/utils/navigation.ts +6 -51
  64. package/src/stores/cart.ts +23 -0
  65. package/src/utils/cart.ts +36 -0
  66. package/src/utils/{getChildPages.ts → getFolderChildren.ts} +3 -1
  67. package/src/utils/{getCategoryPages.ts → getReferenceChildren.ts} +6 -3
  68. package/tsconfig.json +1 -3
  69. package/src/components/experimental/GalleryVertical.astro +0 -161
  70. package/src/content/pages/layouts/layout.mdx +0 -21
  71. package/src/content/pages/layouts/pagelayout.mdx +0 -21
  72. package/src/content/pages/overview/content-layer.mdx +0 -128
  73. package/src/content/pages/overview/customization.mdx +0 -83
  74. package/src/layouts/ContentLayout.astro +0 -16
  75. package/src/layouts/PageLayout.astro +0 -15
  76. /package/src/schemas/utils/{categories.ts → parents.ts} +0 -0
  77. /package/src/types/{global-props.d.ts → global-props.ts} +0 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ presets: [docs]
3
+ title: Theming
4
+ ---
5
+
6
+ import Link from 'fulldev-ui/components/Link.astro'
7
+
8
+ # Theming
9
+
10
+ With the fulldev-ui integration you can easily set a theme and generate a palette based on <Link href="https://www.radix-ui.com/colors">Radix Colors.</Link>
11
+
12
+ ## Configuration
13
+
14
+ ### Generating a color palette
15
+
16
+ - **css** is the path to your custom css file that applies to all pages on your site.
17
+ - **colors** is an object that defines the colors for your site.
18
+ - **theme** is the default theme for your site.
19
+ - **dark** and **light** are objects that define the colors for the dark and light themes, these three properties are used to generate a color pallete using radix colors.
20
+
21
+ ```ts
22
+ import { defineConfig } from 'astro/config'
23
+ import fulldev from 'fulldev-ui/integration'
24
+
25
+ // https://astro.build/config
26
+ export default defineConfig({
27
+ integrations: [
28
+ fulldev({
29
+ css: '/src/css/custom.css',
30
+ colors: {
31
+ theme: 'dark',
32
+ dark: {
33
+ background: '#111110',
34
+ base: '#6F6D66',
35
+ brand: '#F50',
36
+ },
37
+ light: {
38
+ background: '#EEEEEC',
39
+ base: '#6F6D66',
40
+ brand: '#F50',
41
+ },
42
+ },
43
+ }),
44
+ ],
45
+ })
46
+ ```
47
+
48
+ ### Generating favicons
49
+
50
+ We've integrated <Link href="https://github.com/ACP-CODE/astro-favicons">astro-favicons</Link> into fulldev-ui to generate favicons from a svg file.
51
+
52
+ ```ts
53
+ import { defineConfig } from 'astro/config'
54
+ import fulldev from 'fulldev-ui/integration'
55
+
56
+ // https://astro.build/config
57
+ export default defineConfig({
58
+ integrations: [
59
+ fulldev({
60
+ favicon: 'src/images/favicon.svg', // can also be png, webp, jpg, etc.
61
+ // other options here
62
+ }),
63
+ ],
64
+ })
65
+ ```
66
+
67
+ ## Overwriting styles
68
+
69
+ Since Fulldev UI uses just regular CSS with low specificity, you can customize anything else using custom CSS.
@@ -9,3 +9,9 @@ title: page
9
9
  Objects in the page schema are used to define the structure of a page. They are used to define the information, content and components that are used to render the page.
10
10
 
11
11
  import { Code } from 'astro:components'
12
+ import { zodToTs, createTypeAlias, printNode } from 'zod-to-ts'
13
+ import pageSchema from 'fulldev-ui/schemas/pageSchema'
14
+
15
+ export const identifier = 'Page'
16
+ export const node = zodToTs(pageSchema, identifier)
17
+ export const typeAlias = createTypeAlias(node, identifier)
@@ -1,3 +1,5 @@
1
+ theme: dark
2
+
1
3
  seo:
2
4
  image: /images/og-image.png
3
5
 
@@ -8,11 +10,8 @@ code:
8
10
  posthog.init('phc_mVacbe8Xydu0UZlh4bNw5EGisvzyRcpqXEEuEEp5lOY',{api_host:'https://eu.i.posthog.com', person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
9
11
  })
10
12
  </script>
11
- sidebar: true
12
- toc: false
13
- themeselect: true
14
-
15
- header:
13
+ navigation:
14
+ header: true
16
15
  company: Fulldev UI
17
16
  buttons:
18
17
  - text: Docs
@@ -30,41 +29,55 @@ header:
30
29
  target: _blank
31
30
  icon: brand-discord
32
31
  variant: secondary
33
- # footer:
34
- # logo: Fulldev UI
35
- # text: The Astro UI library to build content sites. Make websites with prebuilt components, blocks and layouts.
36
- # columns:
37
- # - heading: Pages
38
- # buttons:
39
- # - text: Docs
40
- # href: /overview/introduction
41
- # - text: Components
42
- # href: /typography/heading
43
- # - blocks
44
- # - showcase
45
- # socials:
46
- # - https://www.linkedin.com/in/silveltman/
47
- # - https://x.com/silveltm
48
- # - https://github.com/fulldotdev/ui
49
- # channels:
50
- # - heading: Phone
51
- # text: 123-456-7890
52
- # icon: phone
53
- # href: tel:123-456-7890
54
- # - heading: Email
55
- # text: contact@example.com
56
- # icon: mail
57
- # href: mailto:contact@example.com
58
- # - heading: Address
59
- # text: 1234 Main St, Springfield, IL 62701
60
- # icon: map-pin
61
- # hours:
62
- # heading: Openingstijden
63
- # days:
64
- # ma.: 09:00 - 17:00
65
- # di.: 09:00 - 17:00
66
- # wo.: 09:00 - 17:00
67
- # do.: 09:00 - 17:00
68
- # vr.: 09:00 - 17:00
69
- # za.: 09:00 - 17:00
70
- # zo.: 09:00 - 17:00
32
+ menu:
33
+ - heading: Get Started
34
+ buttons:
35
+ - overview/introduction
36
+ - overview/installation
37
+ - overview/theming
38
+ - overview/frameworks
39
+ - overview/components
40
+ - overview/content-collections
41
+ - heading: Typography
42
+ buttons:
43
+ - typography/heading
44
+ - typography/label
45
+ - typography/link
46
+ - typography/list
47
+ - typography/text
48
+ - heading: Base
49
+ buttons:
50
+ - base/badge
51
+ - base/button
52
+ - base/card
53
+ - base/checkbox
54
+ - base/icon
55
+ - base/input
56
+ - base/rating
57
+ - base/section
58
+ - base/select
59
+ - base/table
60
+ - base/textarea
61
+ - base/theme-select
62
+ - base/image
63
+ - heading: Blocks
64
+ buttons:
65
+ - blocks/banner
66
+ - blocks/colleagues
67
+ - blocks/contact
68
+ - blocks/content
69
+ - blocks/cta
70
+ - blocks/features
71
+ - blocks/hero
72
+ - blocks/intro
73
+ - blocks/posts
74
+ - blocks/reviews
75
+ - heading: Schemas
76
+ buttons:
77
+ - schemas/page
78
+ - schemas/preset
79
+ - heading: More
80
+ buttons:
81
+ - showcase
82
+ - text: Changelog
83
+ href: https://github.com/fulldotdev/ui/releases
@@ -1,4 +1 @@
1
1
  component: BlockLayout
2
-
3
- navigation:
4
- toc: false
@@ -1,65 +1,6 @@
1
1
  component: DocsLayout
2
2
 
3
- sidebar: true
4
- header: false
5
- banner: false
6
-
7
3
  navigation:
8
- company: Fulldev UI
9
- buttons:
10
- - heading: Get Started
11
- buttons:
12
- - overview/introduction
13
- - overview/installation
14
- - overview/customization
15
- - overview/frameworks
16
- - overview/components
17
- - overview/content-layer
18
- - heading: Typography
19
- buttons:
20
- - typography/heading
21
- - typography/label
22
- - typography/link
23
- - typography/list
24
- - typography/text
25
- - heading: Base
26
- buttons:
27
- - base/badge
28
- - base/button
29
- - base/card
30
- - base/checkbox
31
- - base/icon
32
- - base/input
33
- - base/rating
34
- - base/section
35
- - base/select
36
- - base/table
37
- - base/textarea
38
- - base/theme-select
39
- - base/image
40
- - heading: Blocks
41
- buttons:
42
- - blocks/banner
43
- - blocks/colleagues
44
- - blocks/contact
45
- - blocks/content
46
- - blocks/cta
47
- - blocks/features
48
- - blocks/hero
49
- - blocks/intro
50
- - blocks/posts
51
- - blocks/reviews
52
- - heading: Layouts
53
- buttons:
54
- - layouts/layout
55
- - layouts/pagelayout
56
- - layouts/docslayout
57
- - heading: Schemas
58
- buttons:
59
- - schemas/page
60
- - schemas/preset
61
- - heading: More
62
- buttons:
63
- - showcase
64
- - text: Changelog
65
- href: https://github.com/fulldotdev/ui/releases
4
+ sidebar: true
5
+ header: false
6
+ toc: 'On this page'
package/src/env.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /// <reference types="astro/client" />
2
- /// <reference path="../.astro/types.d.ts" />
2
+ /// <reference path="../.astro/types.d.ts" />
@@ -1,10 +1,8 @@
1
1
  import viteYaml from '@rollup/plugin-yaml'
2
2
  import type { AstroIntegration } from 'astro'
3
3
  import favicons from 'astro-favicons'
4
+ import type { CollectionEntry } from 'astro:content'
4
5
  import merge from 'deepmerge'
5
- import fs from 'fs/promises'
6
- import yaml from 'js-yaml'
7
- import path from 'path'
8
6
  import virtual from 'vite-plugin-virtual'
9
7
  import { generateRadixColors } from './generate-colors'
10
8
 
@@ -18,9 +16,9 @@ interface Config {
18
16
  favicon?: string
19
17
  company?: string
20
18
  css?: string
19
+ basePreset?: CollectionEntry<'presets'>['id']
21
20
  injectRoutes?: boolean
22
- overrideComponents?: boolean
23
- generateImageEntries?: boolean
21
+ // generateImageEntries?: boolean
24
22
  colors: {
25
23
  theme: 'light' | 'dark'
26
24
  light?: Color | undefined
@@ -37,7 +35,7 @@ const defaultConfig: Config = {
37
35
  brand: '#000',
38
36
  },
39
37
  },
40
- generateImageEntries: false,
38
+ // generateImageEntries: false,
41
39
  }
42
40
 
43
41
  export default function fulldevIntegration(
@@ -173,33 +171,33 @@ export default function fulldevIntegration(
173
171
  // ----------------------
174
172
  // Generate image YAML files
175
173
  // ----------------------
176
- if (config.generateImageEntries) {
177
- const srcDir = path.join(process.cwd(), 'src')
178
- const filesDir = path.join(srcDir, 'images')
179
- const entriesDir = path.join(srcDir, 'content', 'images')
180
-
181
- try {
182
- await fs.mkdir(filesDir, { recursive: true })
183
- await fs.mkdir(entriesDir, { recursive: true })
184
-
185
- const files = await fs.readdir(filesDir)
186
- files.forEach(async (file) => {
187
- const filename = path.parse(file).name
188
- const yamlPath = path.join(entriesDir, `${filename}.yml`)
189
-
190
- try {
191
- await fs.access(yamlPath)
192
- } catch {
193
- const yamlContent = yaml.dump({
194
- alt: '',
195
- })
196
- await fs.writeFile(yamlPath, yamlContent, 'utf8')
197
- }
198
- })
199
- } catch (error) {
200
- console.error('Error generating image YAML files:', error)
201
- }
202
- }
174
+ // if (config.generateImageEntries) {
175
+ // const srcDir = path.join(process.cwd(), 'src')
176
+ // const filesDir = path.join(srcDir, 'images')
177
+ // const entriesDir = path.join(srcDir, 'content', 'images')
178
+
179
+ // try {
180
+ // await fs.mkdir(filesDir, { recursive: true })
181
+ // await fs.mkdir(entriesDir, { recursive: true })
182
+
183
+ // const files = await fs.readdir(filesDir)
184
+ // files.forEach(async (file) => {
185
+ // const filename = path.parse(file).name
186
+ // const yamlPath = path.join(entriesDir, `${filename}.yml`)
187
+
188
+ // try {
189
+ // await fs.access(yamlPath)
190
+ // } catch {
191
+ // const yamlContent = yaml.dump({
192
+ // alt: '',
193
+ // })
194
+ // await fs.writeFile(yamlPath, yamlContent, 'utf8')
195
+ // }
196
+ // })
197
+ // } catch (error) {
198
+ // console.error('Error generating image YAML files:', error)
199
+ // }
200
+ // }
203
201
 
204
202
  // ----------------------
205
203
  // Inject routes
@@ -2,14 +2,13 @@
2
2
  import type { ComponentProps } from 'astro/types'
3
3
  import Button from 'fulldev-ui/components/Button.astro'
4
4
  import Element from 'fulldev-ui/components/Element.astro'
5
- import Prose from 'fulldev-ui/components/experimental/Prose.astro'
6
5
  import Layout from 'fulldev-ui/layouts/Layout.astro'
7
6
  import { crush } from 'radash'
7
+ import PostLayout from './PostLayout.astro'
8
8
 
9
9
  type Props = ComponentProps<typeof Layout>
10
10
 
11
- const { render, slug, navigation, ...rest } = Astro.props
12
- const { Content } = await render()
11
+ const { slug, navigation } = Astro.props
13
12
 
14
13
  const flatButtons = crush((navigation as any)?.buttons ?? {})
15
14
  const slugs = Object.entries(flatButtons)
@@ -21,45 +20,34 @@ const prevSlug = slugs[slugIndex - 1]
21
20
  const nextSlug = slugs[slugIndex + 1]
22
21
  ---
23
22
 
24
- <Layout
23
+ <PostLayout
25
24
  class:list="docs-layout"
26
- {render}
27
- {slug}
28
- {navigation}
29
- {...rest}
25
+ {...Astro.props}
30
26
  >
31
- <Prose>
32
- {Content && <Content />}
33
- <Element class:list={['prev-next', { 'next-only': !prevSlug }]}>
34
- <Button
35
- if={prevSlug}
36
- slug={prevSlug}
37
- icon="arrow-left"
38
- variant="secondary"
39
- />
40
- <Button
41
- if={nextSlug}
42
- slug={nextSlug}
43
- icon="arrow-right"
44
- variant="secondary"
45
- reverse={true}
46
- />
47
- </Element>
48
- </Prose>
49
- </Layout>
27
+ <Element
28
+ class:list={['prev-next', { 'next-only': !prevSlug }]}
29
+ slot="prose"
30
+ >
31
+ <Button
32
+ if={prevSlug}
33
+ slug={prevSlug}
34
+ icon="arrow-left"
35
+ variant="secondary"
36
+ />
37
+ <Button
38
+ if={nextSlug}
39
+ slug={nextSlug}
40
+ icon="arrow-right"
41
+ variant="secondary"
42
+ reverse={true}
43
+ />
44
+ </Element>
45
+ </PostLayout>
50
46
 
51
47
  <style lang="scss" is:global>
52
48
  @layer fulldev {
53
49
  .docs-layout {
54
50
  .prose {
55
- --screen: 768px;
56
- padding: var(--space-6) var(--gutter);
57
- color: var(--color-12);
58
-
59
- > h1 + p {
60
- color: var(--color-11);
61
- }
62
-
63
51
  > a,
64
52
  > p > a {
65
53
  color: var(--brand-11);
@@ -1,14 +1,15 @@
1
1
  ---
2
2
  import type { ComponentProps, HTMLAttributes } from 'astro/types'
3
3
  import type { CollectionEntry } from 'astro:content'
4
+ import Article from 'fulldev-ui/blocks/Article.astro'
4
5
  import Banner from 'fulldev-ui/blocks/Banner.astro'
5
6
  import Footer from 'fulldev-ui/blocks/Footer.astro'
6
7
  import Element from 'fulldev-ui/components/Element.astro'
7
8
  import Head from 'fulldev-ui/components/Head.astro'
8
9
  import Header from 'fulldev-ui/components/Header.astro'
10
+ import Section from 'fulldev-ui/components/Section.astro'
9
11
  import Sections from 'fulldev-ui/components/sections.astro'
10
12
  import Sidebar from 'fulldev-ui/components/Sidebar.astro'
11
- import Toc from 'fulldev-ui/components/Toc.astro'
12
13
  import type { GlobalProps } from 'fulldev-ui/types/global-props'
13
14
 
14
15
  type Props = GlobalProps &
@@ -18,6 +19,7 @@ type Props = GlobalProps &
18
19
  header?: ComponentProps<typeof Header>
19
20
  footer?: ComponentProps<typeof Footer>
20
21
  sections?: ComponentProps<typeof Sections>['sections']
22
+ section?: ComponentProps<typeof Section> | undefined
21
23
  banner?: any
22
24
  toc?: any
23
25
  sidebar?: any
@@ -46,6 +48,7 @@ const {
46
48
  toc,
47
49
  sections,
48
50
  theme,
51
+ section,
49
52
  banner,
50
53
  code,
51
54
  themeselect,
@@ -56,36 +59,39 @@ const {
56
59
  <!doctype html>
57
60
  <html {...rest}>
58
61
  <Head {...Astro.props} />
59
- <Element as="body">
62
+ <Element
63
+ as="body"
64
+ {theme}
65
+ >
60
66
  <slot name="banner">
61
67
  <Banner text={banner} />
62
68
  </slot>
63
69
  <slot name="header">
64
70
  <Header
65
- open={header}
66
- {...navigation}
67
- {themeselect}
71
+ {...navigation?.header === true ? navigation : {}}
68
72
  {...header}
69
73
  />
70
74
  </slot>
71
75
  <div class="core">
72
76
  <slot name="sidebar">
73
77
  <Sidebar
74
- open={sidebar}
75
- {...navigation}
78
+ {...navigation?.sidebar === true ? navigation : {}}
79
+ logo={navigation?.sidebar?.header
80
+ ? undefined
81
+ : navigation?.sidebar?.logo}
82
+ company={navigation?.sidebar?.header
83
+ ? undefined
84
+ : navigation?.sidebar?.company}
76
85
  {...sidebar}
77
86
  />
78
87
  </slot>
79
88
  <main data-pagefind-body>
80
- <slot />
81
- <Sections {sections} />
89
+ <slot>
90
+ <Section {...section} />
91
+ <Article />
92
+ <Sections {sections} />
93
+ </slot>
82
94
  </main>
83
- <slot name="toc">
84
- <Toc
85
- {render}
86
- {...toc}
87
- />
88
- </slot>
89
95
  </div>
90
96
  <slot name="footer">
91
97
  <Footer {...footer} />
@@ -104,27 +110,37 @@ const {
104
110
  }
105
111
 
106
112
  body {
107
- --screen: 100vw;
108
-
109
- background-color: var(--base-2);
113
+ display: flex;
114
+ flex-direction: column;
115
+ background-color: var(--base-background);
110
116
  width: 100%;
117
+ min-height: 100vh;
111
118
  color: var(--base-11);
112
119
 
120
+ .for-sidebar {
121
+ @media (min-width: 1024px) {
122
+ display: none;
123
+
124
+ ~ * {
125
+ --header-height: 0px;
126
+ }
127
+ }
128
+ }
129
+
113
130
  .core {
114
131
  display: flex;
115
132
  position: relative;
133
+ flex-grow: 1;
134
+ height: 100%;
116
135
 
117
136
  main {
118
137
  --screen: 1280px;
119
-
120
138
  display: flex;
121
139
  flex: 1;
122
140
  flex-direction: column;
123
141
  background-color: var(--color-background);
124
142
  width: 100%;
125
143
  max-width: 100vw;
126
- min-height: 100vh;
127
- overflow-x: hidden;
128
144
  }
129
145
  }
130
146
  }
@@ -6,30 +6,37 @@ import Intro from 'fulldev-ui/blocks/Intro.astro'
6
6
  import Products from 'fulldev-ui/blocks/Products.astro'
7
7
  import Sections from 'fulldev-ui/components/sections.astro'
8
8
  import Layout from 'fulldev-ui/layouts/Layout.astro'
9
- import { getCategoryPages } from 'fulldev-ui/utils/getCategoryPages'
10
- import { getChildPages } from 'fulldev-ui/utils/getChildPages.ts'
9
+ import { getFolderChildren } from 'fulldev-ui/utils/getFolderChildren.ts'
10
+ import { getReferenceChildren } from 'fulldev-ui/utils/getReferenceChildren'
11
11
 
12
12
  type Props = ComponentProps<typeof Layout>
13
13
 
14
- const { slug, render, sections, children, ...rest } = Astro.props
14
+ const { slug, sections, title, description, render } = Astro.props
15
15
 
16
- const childPages = await getChildPages(slug)
17
- const categoryPages = await getCategoryPages(slug)
18
- // const siblingPages = await getSiblingPages(slug)
16
+ const folderChildren = await getFolderChildren(slug)
17
+ const referenceChildren = await getReferenceChildren(slug)
19
18
  ---
20
19
 
21
20
  <Layout {...Astro.props}>
22
- <Intro {...rest} />
21
+ <Intro
22
+ heading={title}
23
+ text={description}
24
+ />
23
25
  <Categories
24
- pages={childPages}
26
+ component="Categories"
27
+ cards={folderChildren}
25
28
  structure="grid"
26
29
  panel
27
30
  />
28
31
  <Products
29
- pages={categoryPages}
32
+ component="Products"
33
+ cards={referenceChildren}
30
34
  structure="grid"
31
35
  />
32
- <Article style={{ '--screen': '768px' }} />
36
+ <Article
37
+ {render}
38
+ toc={false}
39
+ />
33
40
  <Sections {sections} />
34
41
  <slot />
35
42
  </Layout>
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  import type { ComponentProps } from 'astro/types'
3
3
  import Article from 'fulldev-ui/blocks/Article.astro'
4
- import Intro from 'fulldev-ui/blocks/Intro.astro'
5
4
  import Sections from 'fulldev-ui/components/sections.astro'
6
5
  import Layout from 'fulldev-ui/layouts/Layout.astro'
7
6
 
8
7
  type Props = ComponentProps<typeof Layout>
9
8
 
10
- const { render, sections, ...rest } = Astro.props
9
+ const { sections, render, toc } = Astro.props
11
10
  ---
12
11
 
13
12
  <Layout {...Astro.props}>
14
- <Intro
15
- align="start"
16
- {...rest}
17
- />
18
- <Article />
13
+ <Article
14
+ {render}
15
+ {toc}
16
+ >
17
+ <slot name="prose" />
18
+ </Article>
19
19
  <Sections {sections} />
20
20
  <slot />
21
21
  </Layout>