fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.3

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 (183) hide show
  1. package/package.json +1 -1
  2. package/src/blocks/Banner1.astro +35 -0
  3. package/src/blocks/Contact1.astro +92 -0
  4. package/src/blocks/Cta1.astro +72 -0
  5. package/src/blocks/Feature1.astro +67 -0
  6. package/src/blocks/Footer.astro +47 -54
  7. package/src/blocks/Header1.astro +192 -0
  8. package/src/blocks/Hero1.astro +74 -0
  9. package/src/blocks/Intro1.astro +56 -0
  10. package/src/blocks/Products1.astro +90 -0
  11. package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
  12. package/src/components/Badge.astro +10 -18
  13. package/src/components/Banner.astro +26 -0
  14. package/src/components/Block.astro +49 -0
  15. package/src/components/Blocks.astro +26 -0
  16. package/src/components/Button.astro +10 -23
  17. package/src/components/Card.astro +8 -150
  18. package/src/components/Cart.astro +1 -0
  19. package/src/components/CartSummary.astro +3 -3
  20. package/src/components/Channel.astro +5 -14
  21. package/src/components/Container.astro +25 -0
  22. package/src/components/Drawer.astro +57 -118
  23. package/src/components/DrawerOld.astro +143 -0
  24. package/src/components/Element.astro +2 -0
  25. package/src/components/Form.astro +5 -3
  26. package/src/components/Head.astro +18 -32
  27. package/src/components/Header.astro +8 -105
  28. package/src/components/Heading.astro +29 -70
  29. package/src/components/Icon.astro +6 -4
  30. package/src/components/Link.astro +12 -18
  31. package/src/components/Logo.astro +31 -18
  32. package/src/components/Navigation.astro +39 -0
  33. package/src/components/Panel.astro +25 -0
  34. package/src/components/Paragraph.astro +24 -7
  35. package/src/components/Price.astro +4 -4
  36. package/src/components/Prose.astro +41 -132
  37. package/src/components/Rating.astro +24 -75
  38. package/src/components/Search.astro +4 -3
  39. package/src/components/Section.astro +20 -29
  40. package/src/components/Sidebar.astro +44 -64
  41. package/src/components/Social.astro +9 -2
  42. package/src/components/Tagline.astro +21 -31
  43. package/src/components/Toc.astro +12 -3
  44. package/src/components/_Author.astro +90 -0
  45. package/src/components/_Header.astro +129 -0
  46. package/src/components/_Prose copy.astro +172 -0
  47. package/src/components/_Sidebar copy.astro +87 -0
  48. package/src/content/categories/category.md +7 -0
  49. package/src/content/config.ts +7 -8
  50. package/src/content/docs/components/text.mdx +47 -0
  51. package/src/content/docs/components.mdx +1 -4
  52. package/src/content/docs/index.mdx +1 -4
  53. package/src/content/layouts/base.yml +41 -80
  54. package/src/content/layouts/docs.yml +2 -70
  55. package/src/content/pages/index.mdx +17 -25
  56. package/src/content/{categories/mugs.md → posts/post.md} +1 -1
  57. package/src/content/products/product.md +3 -3
  58. package/src/css/theme.css +2 -0
  59. package/src/images/favicon/android-chrome-192x192.png +0 -0
  60. package/src/images/favicon/android-chrome-512x512.png +0 -0
  61. package/src/images/favicon/apple-touch-icon.png +0 -0
  62. package/src/images/favicon/browserconfig.xml +9 -0
  63. package/src/images/favicon/favicon-16x16.png +0 -0
  64. package/src/images/favicon/favicon-32x32.png +0 -0
  65. package/src/images/favicon/favicon-48x48.png +0 -0
  66. package/src/images/favicon/favicon.ico +0 -0
  67. package/src/images/favicon/favicon.svg +16 -0
  68. package/src/images/favicon/manifest.webmanifest +30 -0
  69. package/src/images/favicon/mstile-150x150.png +0 -0
  70. package/src/images/favicon/safari-pinned-tab.svg +16 -0
  71. package/src/images/favicon/yandex-browser-50x50.png +0 -0
  72. package/src/images/favicon/yandex-browser-manifest.json +9 -0
  73. package/src/integration/index.ts +10 -1
  74. package/src/layouts/CategoryLayout.astro +16 -9
  75. package/src/layouts/DocLayout.astro +49 -7
  76. package/src/layouts/Layout.astro +55 -27
  77. package/src/layouts/PageLayout.astro +12 -5
  78. package/src/layouts/PostLayout.astro +7 -5
  79. package/src/layouts/ProductLayout.astro +12 -7
  80. package/src/pages/test.astro +7 -1
  81. package/src/schemas/blocks/banner.ts +10 -0
  82. package/src/schemas/blocks/categories.ts +14 -0
  83. package/src/schemas/blocks/contact.ts +18 -0
  84. package/src/schemas/blocks/cta.ts +18 -0
  85. package/src/schemas/blocks/feature.ts +18 -0
  86. package/src/schemas/blocks/hero.ts +20 -0
  87. package/src/schemas/blocks/intro.ts +16 -0
  88. package/src/schemas/blocks/products.ts +14 -0
  89. package/src/schemas/categorySchema.ts +8 -8
  90. package/src/schemas/components/avatar.ts +4 -1
  91. package/src/schemas/components/badge.ts +16 -11
  92. package/src/schemas/components/block.ts +18 -0
  93. package/src/schemas/components/button.ts +13 -19
  94. package/src/schemas/components/channel.ts +15 -9
  95. package/src/schemas/components/footer.ts +15 -14
  96. package/src/schemas/components/head.ts +17 -0
  97. package/src/schemas/components/header.ts +19 -16
  98. package/src/schemas/components/heading.ts +7 -1
  99. package/src/schemas/components/icon.ts +7 -1
  100. package/src/schemas/components/image.ts +17 -14
  101. package/src/schemas/components/link.ts +10 -16
  102. package/src/schemas/components/logo.ts +12 -2
  103. package/src/schemas/components/menu.ts +11 -13
  104. package/src/schemas/components/navigation.ts +10 -0
  105. package/src/schemas/components/paragraph.ts +9 -0
  106. package/src/schemas/components/price.ts +9 -0
  107. package/src/schemas/components/rating.ts +8 -13
  108. package/src/schemas/components/sidebar.ts +14 -12
  109. package/src/schemas/components/social.ts +16 -1
  110. package/src/schemas/components/tagline.ts +7 -1
  111. package/src/schemas/docSchema.ts +6 -2
  112. package/src/schemas/imageSchema.ts +30 -1
  113. package/src/schemas/layoutSchema.ts +14 -20
  114. package/src/schemas/pageSchema.ts +9 -12
  115. package/src/schemas/postSchema.ts +6 -8
  116. package/src/schemas/productSchema.ts +18 -18
  117. package/src/types/global-props.ts +0 -9
  118. package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
  119. package/src/utils/getHref.ts +3 -2
  120. package/tsconfig.json +1 -3
  121. package/example.svelte +0 -0
  122. package/parent.svelte +0 -0
  123. package/src/App.svelte +0 -0
  124. package/src/blocks/Banner.astro +0 -35
  125. package/src/blocks/Categories.astro +0 -12
  126. package/src/blocks/Colleagues.astro +0 -12
  127. package/src/blocks/Contact.astro +0 -117
  128. package/src/blocks/Content.astro +0 -130
  129. package/src/blocks/Cta.astro +0 -13
  130. package/src/blocks/Excerpt.astro +0 -12
  131. package/src/blocks/Features.astro +0 -11
  132. package/src/blocks/Header.astro +0 -7
  133. package/src/blocks/Intro.astro +0 -101
  134. package/src/blocks/Jobs.astro +0 -12
  135. package/src/blocks/Posts.astro +0 -11
  136. package/src/blocks/Prices.astro +0 -24
  137. package/src/blocks/Product.astro +0 -89
  138. package/src/blocks/Products.astro +0 -101
  139. package/src/blocks/Reviews.astro +0 -12
  140. package/src/blocks/_Contact.astro +0 -112
  141. package/src/components/CartForm.astro +0 -120
  142. package/src/components/CartList.astro +0 -122
  143. package/src/components/Lead.astro +0 -46
  144. package/src/components/ProductCard.astro +0 -52
  145. package/src/components/Text.astro +0 -43
  146. package/src/components/Writeup.astro +0 -108
  147. package/src/components/_CartList backup.astro +0 -125
  148. package/src/components/_CartList copy.astro +0 -213
  149. package/src/components/_CartListSimple.astro +0 -148
  150. package/src/components/sections.astro +0 -28
  151. package/src/content/docs/components/lead.mdx +0 -49
  152. package/src/content/docs/components/paragraph.mdx +0 -49
  153. package/src/loaders/imageLoader.ts +0 -26
  154. package/src/schemas/archive/_pageSchema.ts +0 -94
  155. package/src/schemas/components/avatars.ts +0 -4
  156. package/src/schemas/components/banner.ts +0 -3
  157. package/src/schemas/components/buttons.ts +0 -4
  158. package/src/schemas/components/card.ts +0 -43
  159. package/src/schemas/components/cards.ts +0 -4
  160. package/src/schemas/components/channels.ts +0 -4
  161. package/src/schemas/components/global.ts +0 -16
  162. package/src/schemas/components/links.ts +0 -4
  163. package/src/schemas/components/list.ts +0 -3
  164. package/src/schemas/components/section.ts +0 -17
  165. package/src/schemas/components/sections.ts +0 -3
  166. package/src/schemas/components/socials.ts +0 -4
  167. package/src/schemas/components/subheader.ts +0 -10
  168. package/src/schemas/components/text.ts +0 -3
  169. package/src/schemas/components/themer.ts +0 -3
  170. package/src/schemas/components/toc.ts +0 -3
  171. package/src/schemas/components/writeup.ts +0 -20
  172. package/src/schemas/fields/categories.ts +0 -3
  173. package/src/schemas/fields/description.ts +0 -3
  174. package/src/schemas/fields/href.ts +0 -3
  175. package/src/schemas/fields/image.ts +0 -24
  176. package/src/schemas/fields/images.ts +0 -4
  177. package/src/schemas/fields/order.ts +0 -3
  178. package/src/schemas/fields/price.ts +0 -3
  179. package/src/schemas/fields/products.ts +0 -5
  180. package/src/schemas/fields/seo.ts +0 -12
  181. package/src/schemas/fields/soldout.ts +0 -3
  182. package/src/schemas/fields/title.ts +0 -3
  183. package/src/schemas/fields/variants.ts +0 -3
@@ -1,70 +1,2 @@
1
- # sidebar:
2
- # menu:
3
- # - heading: Get Started
4
- # links:
5
- # - docs
6
- # - docs/installation
7
- # - docs/customization
8
- # - docs/frameworks
9
- # - docs/components
10
- # - docs/collections
11
- # - heading: Collections
12
- # links:
13
- # - docs/collections/pages
14
- # - docs/collections/presets
15
- # - docs/collections/images
16
- # - heading: Components
17
- # links:
18
- # - docs/components/avatar
19
- # - docs/components/badge
20
- # - docs/components/badges
21
- # - docs/components/button
22
- # - docs/components/buttons
23
- # # - docs/components/card
24
- # # - docs/components/cards
25
- # # - docs/components/cart
26
- # # - docs/components/cart-form
27
- # # - docs/components/cart-list
28
- # # - docs/components/cart-summary
29
- # - docs/components/channel
30
- # - docs/components/channels
31
- # - docs/components/checkbox
32
- # - docs/components/code
33
- # # - docs/components/dialog
34
- # # - docs/components/drawer
35
- # # - docs/components/element
36
- # # - docs/components/footer
37
- # # - docs/components/form
38
- # # - docs/components/head
39
- # # - docs/components/header
40
- # - docs/components/heading
41
- # - docs/components/icon
42
- # - docs/components/image
43
- # - docs/components/input
44
- # - docs/components/label
45
- # - docs/components/lead
46
- # - docs/components/link
47
- # - docs/components/links
48
- # - docs/components/list
49
- # # - docs/components/locale-switcher
50
- # - docs/components/logo
51
- # - docs/components/menu
52
- # - docs/components/paragraph
53
- # # - docs/components/price
54
- # - docs/components/prose
55
- # - docs/components/rating
56
- # # - docs/components/search
57
- # # - docs/components/section
58
- # # - docs/components/sections
59
- # - docs/components/select
60
- # # - docs/components/sidebar
61
- # - docs/components/social
62
- # - docs/components/socials
63
- # - docs/components/switch
64
- # # - docs/components/table
65
- # - docs/components/tagline
66
- # # - docs/components/text
67
- # - docs/components/textarea
68
- # - docs/components/themer
69
- # # - docs/components/toc
70
- # # - docs/components/writeup
1
+ navigation:
2
+ sidebar: true
@@ -1,62 +1,54 @@
1
1
  ---
2
- seo:
2
+ head:
3
3
  title: Fulldev UI - Astro component and block library, open-source
4
4
  description: Make websites rapidly with pre-built components and blocks.
5
5
  image: og-image.png
6
6
 
7
7
  title: Home
8
8
 
9
- sections:
10
- - component: Hero
9
+ blocks:
10
+ - _block: Hero1
11
11
  badge:
12
- text: 'Introducing v0.5: page building & generation'
12
+ text: 'Introducing v0.6: layouts & pagebuilding'
13
13
  href: /overview/installation/
14
14
  heading: Build complete websites with this Astro UI library
15
- # heading: The Astro UI library to build complete websites
16
- lead: 'Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation.'
15
+ paragraph: 'Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation.'
17
16
  buttons:
18
17
  - text: Get Started
19
18
  href: /docs/
20
19
  - text: GitHub
21
20
  href: https://github.com/fulldotdev/ui
22
21
  icon: brand-github
23
- image: block-code.png
22
+ target: _blank
24
23
 
25
- - component: Content
26
- color: brand
27
- label: Blocks
24
+ - _block: Feature1
25
+ tagline: Blocks
28
26
  heading: Use pre-built blocks with just props
29
27
  paragraph: We created a great gallery of blocks to build content sites with a modern look and feel, all of our blocks are build with components from the library to achieve a consistent look.
30
28
  image: block-code.png
31
29
  buttons:
32
- - href: /blocks
30
+ - href: /blocks/
33
31
  icon: layout
34
32
  text: View blocks
35
33
 
36
- - component: Content
37
- color: brand
38
- label: Components
34
+ - _block: Feature1
35
+ tagline: Components
39
36
  heading: Or build your own, with easy to use components
40
37
  paragraph: Our rich set of components make it easy to build your own blocks with great customizability through props and global theming.
41
38
  image: component-code.png
42
- reverse: odd
43
39
  buttons:
44
- - href: /components/badge
40
+ - text: View components
41
+ href: /components/badge/
45
42
  icon: code
46
- text: View components
47
43
 
48
- - component: Cta
49
- size: lg
50
- variant: primary
44
+ - _block: Cta1
51
45
  heading: Build content websites in a fraction of time
52
- lead: A library of components and blocks to build content sites, fast.
46
+ paragraph: A library of components and blocks to build content sites, fast.
53
47
  buttons:
54
48
  - text: Get Started
55
- href: /overview/installation
56
- color: brand
49
+ href: /overview/installation/
57
50
  - text: Github
58
51
  href: https://github.com/fulldotdev/ui
59
- target: _blank
60
52
  icon: brand-github
61
- color: brand
53
+ target: _blank
62
54
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: Mug
2
+ title: Post
3
3
  description: Lorem ipsum dolor sit
4
4
  ---
5
5
 
@@ -1,8 +1,8 @@
1
1
  ---
2
- title: My Product Title
2
+ title: Product
3
3
  categories:
4
- - mugs
5
- description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec auctor, libero at lacinia ferment
4
+ - category
5
+ description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
6
6
  price: 90
7
7
  images:
8
8
  - placeholder.webp
package/src/css/theme.css CHANGED
@@ -89,5 +89,7 @@
89
89
  --chart-3: 30 80% 55%;
90
90
  --chart-4: 280 65% 60%;
91
91
  --chart-5: 340 75% 55%;
92
+
93
+ color-scheme: dark;
92
94
  }
93
95
  }
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig>
3
+ <msapplication>
4
+ <tile>
5
+ <square150x150logo src="/favicon/mstile-150x150.png"/>
6
+ <TileColor>#fff</TileColor>
7
+ </tile>
8
+ </msapplication>
9
+ </browserconfig>
Binary file
@@ -0,0 +1,16 @@
1
+ <svg width="758" height="758" viewBox="0 0 758 758" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_45_5)">
3
+ <rect width="758" height="758" fill="#FF5500"/>
4
+ <rect x="-133" y="-133" width="1024" height="1024" fill="url(#paint0_radial_45_5)"/>
5
+ <path d="M269.363 565C264.945 565 261.363 561.419 261.363 557V200.637C261.363 196.218 264.945 192.637 269.363 192.637H499.909C504.327 192.637 507.909 196.218 507.909 200.637V249.546C507.909 253.964 504.327 257.546 499.909 257.546H348.091C343.672 257.546 340.091 261.128 340.091 265.546V338.273C340.091 342.691 343.672 346.273 348.091 346.273H483.545C487.963 346.273 491.545 349.855 491.545 354.273V403.182C491.545 407.6 487.963 411.182 483.545 411.182H348.091C343.672 411.182 340.091 414.764 340.091 419.182V557C340.091 561.419 336.509 565 332.091 565H269.363Z" fill="#EEEEEC"/>
6
+ </g>
7
+ <defs>
8
+ <radialGradient id="paint0_radial_45_5" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(379 379) rotate(45) scale(724.077)">
9
+ <stop stop-color="#111110" stop-opacity="0.2"/>
10
+ <stop offset="0.9" stop-color="#111110" stop-opacity="0"/>
11
+ </radialGradient>
12
+ <clipPath id="clip0_45_5">
13
+ <rect width="758" height="758" fill="white"/>
14
+ </clipPath>
15
+ </defs>
16
+ </svg>
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "Fulldev UI",
3
+ "short_name": "Fulldev UI",
4
+ "description": "Fulldev UI",
5
+ "dir": "auto",
6
+ "lang": "en-GB",
7
+ "display": "standalone",
8
+ "display_override": [
9
+ "window-controls-overlay",
10
+ "standalone"
11
+ ],
12
+ "orientation": "any",
13
+ "start_url": "/?homescreen=1",
14
+ "background_color": "#fff",
15
+ "theme_color": "#fff",
16
+ "icons": [
17
+ {
18
+ "src": "/favicon/android-chrome-192x192.png",
19
+ "sizes": "192x192",
20
+ "type": "image/png",
21
+ "purpose": "any"
22
+ },
23
+ {
24
+ "src": "/favicon/android-chrome-512x512.png",
25
+ "sizes": "512x512",
26
+ "type": "image/png",
27
+ "purpose": "maskable"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,16 @@
1
+ <svg width="758" height="758" viewBox="0 0 758 758" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_45_5)">
3
+ <rect width="758" height="758" fill="#FF5500"/>
4
+ <rect x="-133" y="-133" width="1024" height="1024" fill="url(#paint0_radial_45_5)"/>
5
+ <path d="M269.363 565C264.945 565 261.363 561.419 261.363 557V200.637C261.363 196.218 264.945 192.637 269.363 192.637H499.909C504.327 192.637 507.909 196.218 507.909 200.637V249.546C507.909 253.964 504.327 257.546 499.909 257.546H348.091C343.672 257.546 340.091 261.128 340.091 265.546V338.273C340.091 342.691 343.672 346.273 348.091 346.273H483.545C487.963 346.273 491.545 349.855 491.545 354.273V403.182C491.545 407.6 487.963 411.182 483.545 411.182H348.091C343.672 411.182 340.091 414.764 340.091 419.182V557C340.091 561.419 336.509 565 332.091 565H269.363Z" fill="#EEEEEC"/>
6
+ </g>
7
+ <defs>
8
+ <radialGradient id="paint0_radial_45_5" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(379 379) rotate(45) scale(724.077)">
9
+ <stop stop-color="#111110" stop-opacity="0.2"/>
10
+ <stop offset="0.9" stop-color="#111110" stop-opacity="0"/>
11
+ </radialGradient>
12
+ <clipPath id="clip0_45_5">
13
+ <rect width="758" height="758" fill="white"/>
14
+ </clipPath>
15
+ </defs>
16
+ </svg>
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0",
3
+ "api_version": 1,
4
+ "layout": {
5
+ "logo": "/favicon/yandex-browser-50x50.png",
6
+ "color": "#fff",
7
+ "show_title": true
8
+ }
9
+ }
@@ -15,10 +15,13 @@ interface Config {
15
15
  company?: string
16
16
  css?: string
17
17
  injectRoutes?: boolean
18
+ overrides?: {
19
+ [k: string]: string
20
+ }
18
21
  }
19
22
 
20
23
  export default function fulldevIntegration(
21
- config?: Partial<Config> | undefined
24
+ config: Partial<Config> | undefined
22
25
  ): AstroIntegration {
23
26
  return {
24
27
  name: '/integration',
@@ -64,6 +67,11 @@ export default function fulldevIntegration(
64
67
  }),
65
68
  ],
66
69
  vite: {
70
+ resolve: {
71
+ alias: {
72
+ ...config?.overrides,
73
+ },
74
+ },
67
75
  css: {
68
76
  postcss: {
69
77
  plugins: [tailwindcss(tailwindConfig), tailwindcssNesting],
@@ -88,6 +96,7 @@ export default function fulldevIntegration(
88
96
  }),
89
97
  ],
90
98
  })
99
+
91
100
  // ----------------------
92
101
  // Inject routes
93
102
  // ----------------------
@@ -1,19 +1,26 @@
1
1
  ---
2
2
  import type { CollectionEntry } from 'astro:content'
3
- import { getCollection } from 'astro:content'
4
- import Intro from 'fulldev-ui/blocks/Intro.astro'
5
- import Products from 'fulldev-ui/blocks/Products.astro'
3
+ import { getCollection, getEntry } from 'astro:content'
4
+ import Intro1 from 'fulldev-ui/blocks/Intro1.astro'
5
+ import Products1 from 'fulldev-ui/blocks/Products1.astro'
6
6
  import Carousel from 'fulldev-ui/components/Carousel.astro'
7
7
  import Element from 'fulldev-ui/components/Element.astro'
8
8
  import Prose from 'fulldev-ui/components/Prose.astro'
9
9
  import Select from 'fulldev-ui/components/Select.astro'
10
10
  import Layout from 'fulldev-ui/layouts/Layout.astro'
11
11
  import { getHref } from 'fulldev-ui/utils/getHref'
12
+ import { mergeDeep } from 'remeda'
12
13
 
13
14
  type Props = CollectionEntry<'categories'>
14
15
 
15
- const { render, slug } = Astro.props
16
- const { title, description } = Astro.props.data
16
+ const layout = await getEntry('layouts', 'categories')
17
+ const merged = mergeDeep(layout || {}, Astro.props)
18
+
19
+ const {
20
+ render,
21
+ slug,
22
+ data: { title, description },
23
+ } = merged
17
24
 
18
25
  const categories = await getCollection('categories', ({ data }) =>
19
26
  data.categories?.some((c) => c.slug.includes(slug))
@@ -70,10 +77,10 @@ const sorts = [
70
77
  })
71
78
  </script>
72
79
 
73
- <Layout {...Astro.props}>
74
- <Intro
80
+ <Layout {...merged}>
81
+ <Intro1
75
82
  heading={title}
76
- paragraph={description}
83
+ text={description}
77
84
  />
78
85
  <Carousel>
79
86
  {
@@ -99,7 +106,7 @@ const sorts = [
99
106
  </Element>
100
107
  {
101
108
  sorts.map((sort: any) => (
102
- <Products
109
+ <Products1
103
110
  class:list={sort.option !== 'Aanbevolen' ? 'hide' : ''}
104
111
  products={sort.products}
105
112
  />
@@ -1,17 +1,59 @@
1
1
  ---
2
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'
3
7
  import Prose from 'fulldev-ui/components/Prose.astro'
8
+ import Toc from 'fulldev-ui/components/Toc.astro'
4
9
  import Layout from 'fulldev-ui/layouts/Layout.astro'
10
+ import { mergeDeep } from 'remeda'
5
11
 
6
12
  type Props = CollectionEntry<'docs'>
7
13
 
8
- const { render } = Astro.props
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()
9
23
  ---
10
24
 
11
- <Layout>
12
- <Prose
13
- {render}
14
- toc={true}
15
- />
16
- <slot />
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>
17
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>
@@ -1,56 +1,88 @@
1
1
  ---
2
+ import type { HTMLAttributes } from 'astro/types'
2
3
  import type { CollectionEntry, ContentCollectionKey } from 'astro:content'
3
4
  import { getEntry } from 'astro:content'
4
- import Banner from 'fulldev-ui/blocks/Banner.astro'
5
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'
6
8
  import Element from 'fulldev-ui/components/Element.astro'
7
9
  import Head from 'fulldev-ui/components/Head.astro'
8
- import Header from 'fulldev-ui/components/Header.astro'
9
10
  import Sidebar from 'fulldev-ui/components/Sidebar.astro'
10
11
  import Subheader from 'fulldev-ui/components/Subheader.astro'
12
+ import { mergeDeep } from 'remeda'
11
13
 
12
- type Props = CollectionEntry<ContentCollectionKey>
14
+ type Props = HTMLAttributes<'body'> & CollectionEntry<ContentCollectionKey>
13
15
 
14
16
  const layout = await getEntry('layouts', 'base')
17
+ const merged = mergeDeep(layout || {}, Astro.props)
15
18
 
16
- const { banner, header, subheader, sidebar, footer, theme, code } = layout.data
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
17
39
  ---
18
40
 
19
41
  <!doctype html>
20
- <html class="layout">
42
+ <Element
43
+ class:list="layout"
44
+ as="html"
45
+ {...rest}
46
+ >
21
47
  <Head
22
- {...layout.data}
23
- {...Astro.props.data}
48
+ {title}
49
+ {description}
50
+ {image}
51
+ {...head}
24
52
  />
25
53
  <Element
26
54
  class:list="layout-body"
27
55
  as="body"
28
- {theme}
29
56
  >
30
- <Banner text={banner} />
31
- <Header {...header} />
57
+ <Block
58
+ _block="Banner1"
59
+ {...banner}
60
+ />
61
+ <Block
62
+ _block="Header1"
63
+ {...navigation?.header && navigation}
64
+ {...header}
65
+ />
32
66
  <Subheader {...subheader} />
33
- <slot name="before" />
34
-
35
- <Element class:list={['layout-container', { 'has-sidebar': sidebar }]}>
36
- <Sidebar {...sidebar} />
67
+ <Container class:list={['layout-container', { 'has-sidebar': sidebar }]}>
68
+ <Sidebar
69
+ {...navigation?.sidebar && navigation}
70
+ {...sidebar}
71
+ />
37
72
  <main class="layout-main">
38
73
  <slot />
39
74
  </main>
40
- </Element>
75
+ </Container>
41
76
  <Footer {...footer} />
42
- <slot name="after" />
43
- <Fragment set:html={code?.body} />
44
-
45
77
  <style is:global>
46
78
  @layer fulldev {
47
79
  .layout {
48
80
  @apply w-full font-sans text-base leading-relaxed text-foreground;
49
81
  color-scheme: light;
82
+ }
50
83
 
51
- &.dark {
52
- color-scheme: dark;
53
- }
84
+ .dark {
85
+ color-scheme: dark;
54
86
  }
55
87
 
56
88
  .layout-body {
@@ -58,11 +90,7 @@ const { banner, header, subheader, sidebar, footer, theme, code } = layout.data
58
90
  }
59
91
 
60
92
  .layout-container {
61
- @apply relative flex h-full w-full flex-grow;
62
-
63
- &.has-sidebar {
64
- @apply container px-0;
65
- }
93
+ @apply flex w-full grow !px-0;
66
94
  }
67
95
 
68
96
  .layout-main {
@@ -76,4 +104,4 @@ const { banner, header, subheader, sidebar, footer, theme, code } = layout.data
76
104
  }
77
105
  </style>
78
106
  </Element>
79
- </html>
107
+ </Element>
@@ -1,20 +1,27 @@
1
1
  ---
2
2
  import type { CollectionEntry } from 'astro:content'
3
+ import { getEntry } from 'astro:content'
4
+ import Blocks from 'fulldev-ui/components/Blocks.astro'
3
5
  import Prose from 'fulldev-ui/components/Prose.astro'
4
- import Sections from 'fulldev-ui/components/sections.astro'
5
6
  import Layout from 'fulldev-ui/layouts/Layout.astro'
7
+ import { mergeDeep } from 'remeda'
6
8
 
7
9
  type Props = CollectionEntry<'pages'>
8
10
 
9
- const { render } = Astro.props
10
- const { sections } = Astro.props.data
11
+ const layout = await getEntry('layouts', 'pages')
12
+ const merged = mergeDeep(layout || {}, Astro.props)
13
+
14
+ const {
15
+ render,
16
+ data: { blocks },
17
+ } = merged
11
18
  ---
12
19
 
13
- <Layout {...Astro.props}>
20
+ <Layout {...merged}>
14
21
  <Prose
15
22
  {render}
16
23
  toc={false}
17
24
  />
18
- <Sections {sections} />
25
+ <Blocks {blocks} />
19
26
  <slot />
20
27
  </Layout>
@@ -1,20 +1,22 @@
1
1
  ---
2
2
  import type { CollectionEntry } from 'astro:content'
3
+ import { getEntry } from 'astro:content'
3
4
  import Prose from 'fulldev-ui/components/Prose.astro'
4
- import Sections from 'fulldev-ui/components/sections.astro'
5
5
  import Layout from 'fulldev-ui/layouts/Layout.astro'
6
+ import { mergeDeep } from 'remeda'
6
7
 
7
8
  type Props = CollectionEntry<'posts'>
8
9
 
9
- const { render } = Astro.props
10
- const { sections } = Astro.props.data
10
+ const layout = await getEntry('layouts', 'posts')
11
+ const merged = mergeDeep(layout || {}, Astro.props)
12
+
13
+ const { render } = merged
11
14
  ---
12
15
 
13
- <Layout {...Astro.props}>
16
+ <Layout {...merged}>
14
17
  <Prose
15
18
  {render}
16
19
  toc={true}
17
20
  />
18
- <Sections {sections} />
19
21
  <slot />
20
22
  </Layout>