fulldev-ui 0.4.29 → 0.5.0-beta.1
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/CONTRIBUTING.md +2 -2
- package/astro.config.ts +15 -4
- package/package.json +26 -16
- package/pnpm-lock.yaml +6473 -0
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/browserconfig.xml +7 -7
- package/public/favicon/favicon-16x16-dark.png +0 -0
- package/public/favicon/favicon-16x16.png +0 -0
- package/public/favicon/favicon-32x32-dark.png +0 -0
- package/public/favicon/favicon-32x32.png +0 -0
- package/public/favicon/favicon-48x48-dark.png +0 -0
- package/public/favicon/favicon-48x48.png +0 -0
- package/public/favicon/favicon-dark.ico +0 -0
- package/public/favicon/favicon.ico +0 -0
- package/public/favicon/favicon.svg +16 -0
- package/public/favicon/manifest.webmanifest +26 -0
- package/public/favicon/mstile-150x150.png +0 -0
- package/public/favicon/safari-pinned-tab.svg +14 -15
- package/public/favicon/yandex-browser-50x50.png +0 -0
- package/public/favicon/yandex-browser-manifest.json +9 -0
- package/src/blocks/Article.astro +21 -0
- package/src/blocks/Banner.astro +47 -0
- package/src/blocks/Colleagues.astro +2 -1
- package/src/blocks/Contact.astro +84 -99
- package/src/blocks/Cta.astro +2 -1
- package/src/blocks/Hero.astro +1 -2
- package/src/blocks/Intro.astro +1 -1
- package/src/blocks/Jobs.astro +1 -1
- package/src/blocks/Prices.astro +1 -1
- package/src/blocks/Product.astro +23 -10
- package/src/blocks/Reviews.astro +1 -1
- package/src/components/Avatar.astro +3 -20
- package/src/components/Badge.astro +17 -54
- package/src/components/Badges.astro +50 -0
- package/src/components/Button.astro +65 -45
- package/src/components/Buttons.astro +49 -0
- package/src/components/Card.astro +94 -177
- package/src/components/Cards.astro +135 -0
- package/src/components/Channel.astro +70 -0
- package/src/components/Channels.astro +37 -0
- package/src/components/Checkbox.astro +12 -16
- package/src/components/Dialog.astro +10 -12
- package/src/components/Drawer.astro +16 -22
- package/src/components/Element.astro +58 -0
- package/src/components/Footer.astro +139 -93
- package/src/components/Head.astro +7 -45
- package/src/components/Header.astro +78 -160
- package/src/components/Heading.astro +18 -26
- package/src/components/Icon.astro +9 -9
- package/src/components/Image.astro +43 -152
- package/src/components/Input.astro +10 -28
- package/src/components/Label.astro +14 -17
- package/src/components/Link.astro +22 -44
- package/src/components/List.astro +12 -10
- package/src/components/LocaleSwitcher.astro +25 -0
- package/src/components/Price.astro +38 -0
- package/src/components/Rating.astro +29 -25
- package/src/components/Search.astro +3 -3
- package/src/components/Section.astro +196 -236
- package/src/components/Select.astro +16 -34
- package/src/components/Sidebar.astro +123 -46
- package/src/components/Social.astro +28 -0
- package/src/components/Socials.astro +37 -0
- package/src/components/Switch.astro +14 -22
- package/src/components/Table.astro +23 -36
- package/src/components/Tagline.astro +11 -16
- package/src/components/Text.astro +17 -19
- package/src/components/Textarea.astro +8 -22
- package/src/components/ThemeSelect.astro +38 -0
- package/src/components/Toc.astro +98 -41
- package/src/components/Writeup.astro +90 -0
- package/src/components/docs/PropsTable.astro +229 -56
- package/src/components/experimental/Form.astro +10 -17
- package/src/components/experimental/Logo.astro +26 -9
- package/src/components/experimental/Prose.astro +9 -5
- package/src/components/experimental/Video.astro +1 -1
- package/src/components/experimental/Window.astro +3 -4
- package/src/components/sections.astro +28 -0
- package/src/content/config.ts +10 -7
- package/src/content/pages/base/_dialog.mdx +1 -2
- package/src/content/pages/base/_drawer.mdx +1 -2
- package/src/content/pages/base/_localeswitcher.mdx +17 -0
- package/src/content/pages/base/_switch.mdx +1 -2
- package/src/content/pages/base/badge.mdx +1 -12
- package/src/content/pages/base/button.mdx +1 -12
- package/src/content/pages/base/card.mdx +2 -29
- package/src/content/pages/base/checkbox.mdx +1 -2
- package/src/content/pages/base/icon.mdx +1 -2
- package/src/content/pages/base/image.mdx +42 -0
- package/src/content/pages/base/input.mdx +1 -12
- package/src/content/pages/base/rating.mdx +3 -14
- package/src/content/pages/base/section.mdx +2 -3
- package/src/content/pages/base/select.mdx +1 -12
- package/src/content/pages/base/table.mdx +1 -28
- package/src/content/pages/base/textarea.mdx +1 -11
- package/src/content/pages/base/theme-select.mdx +15 -0
- package/src/content/pages/blocks/_categories.mdx +3 -5
- package/src/content/pages/blocks/{footer.mdx → _footer.mdx} +2 -4
- package/src/content/pages/blocks/{header.mdx → _header.mdx} +2 -7
- package/src/content/pages/blocks/_jobs.mdx +1 -2
- package/src/content/pages/blocks/{prices.mdx → _prices.mdx} +5 -7
- package/src/content/pages/blocks/_product.mdx +1 -2
- package/src/content/pages/blocks/_products.mdx +1 -2
- package/src/content/pages/blocks/_stats.mdx +1 -1
- package/src/content/pages/blocks/{_banner.mdx → banner.mdx} +2 -2
- package/src/content/pages/blocks/colleagues.mdx +6 -8
- package/src/content/pages/blocks/contact.mdx +69 -0
- package/src/content/pages/blocks/content.mdx +1 -19
- package/src/content/pages/blocks/cta.mdx +2 -25
- package/src/content/pages/blocks/features.mdx +2 -3
- package/src/content/pages/blocks/hero.mdx +5 -3
- package/src/content/pages/blocks/intro.mdx +2 -5
- package/src/content/pages/blocks/posts.mdx +9 -2
- package/src/content/pages/blocks/reviews.mdx +23 -18
- package/src/content/pages/index.mdx +19 -20
- package/src/content/pages/layouts/docslayout.mdx +5 -0
- package/src/content/pages/layouts/layout.mdx +21 -0
- package/src/content/pages/layouts/pagelayout.mdx +21 -0
- package/src/content/pages/overview/components.mdx +70 -0
- package/src/content/pages/overview/content-layer.mdx +128 -0
- package/src/content/pages/overview/{theming.mdx → customization.mdx} +6 -6
- package/src/content/pages/overview/frameworks.mdx +4 -4
- package/src/content/pages/overview/installation.mdx +37 -3
- package/src/content/pages/overview/introduction.mdx +6 -2
- package/src/content/pages/schemas/page.mdx +11 -0
- package/src/content/pages/schemas/preset.mdx +9 -0
- package/src/content/pages/showcase/anti-slip-profiles.md +5 -0
- package/src/content/pages/showcase/fulldev-ui.md +5 -0
- package/src/content/pages/showcase/lavis-detailing.md +5 -0
- package/src/content/pages/showcase/leren-trainingsacteren.md +5 -0
- package/src/content/pages/showcase/miele-witgoedcenter-amsterdam.md +5 -0
- package/src/content/{records/record.yml → pages/showcase/record.md} +2 -0
- package/src/content/pages/showcase/sloepverhuur-bolsward.md +5 -0
- package/src/content/pages/showcase/stark-vulcanising-products.md +5 -0
- package/src/content/pages/showcase/the-gym-haren.md +5 -0
- package/src/content/pages/showcase/van-dillen-antieke-bouwmaterialen.md +5 -0
- package/src/content/pages/showcase.mdx +11 -41
- package/src/content/pages/typography/_tagline.mdx +1 -2
- package/src/content/pages/typography/heading.mdx +1 -2
- package/src/content/pages/typography/label.mdx +1 -2
- package/src/content/pages/typography/link.mdx +1 -13
- package/src/content/pages/typography/list.mdx +1 -2
- package/src/content/pages/typography/text.mdx +1 -2
- package/src/content/presets/base.yml +70 -0
- package/src/content/presets/blocks.yml +4 -0
- package/src/content/presets/docs.yml +65 -0
- package/src/css/color.css +0 -82
- package/src/css/custom.css +9 -56
- package/src/css/size.css +10 -0
- package/src/css/space.css +0 -8
- package/src/css/styles.css +0 -15
- package/src/images/avatar-1.yml +1 -0
- package/src/images/favicon.svg +16 -0
- package/src/integration/generate-colors.ts +2 -0
- package/src/integration/index.ts +67 -7
- package/src/layouts/BlockLayout.astro +10 -15
- package/src/layouts/ContactLayout.astro +21 -0
- package/src/layouts/ContentLayout.astro +16 -0
- package/src/layouts/DocsLayout.astro +85 -0
- package/src/layouts/Layout.astro +111 -133
- package/src/layouts/OverviewLayout.astro +22 -32
- package/src/layouts/PageLayout.astro +7 -24
- package/src/layouts/PostLayout.astro +8 -19
- package/src/layouts/ProductLayout.astro +9 -22
- package/src/loaders/imageLoader.ts +26 -0
- package/src/pages/[...page].astro +25 -21
- package/src/schemas/components/avatar.ts +3 -0
- package/src/schemas/components/avatars.ts +4 -0
- package/src/schemas/components/badge.ts +13 -0
- package/src/schemas/components/button.ts +16 -0
- package/src/schemas/components/buttons.ts +4 -0
- package/src/schemas/components/card.ts +25 -0
- package/src/schemas/components/cards.ts +4 -0
- package/src/schemas/components/channel.ts +13 -0
- package/src/schemas/components/channels.ts +4 -0
- package/src/schemas/components/footer.ts +24 -0
- package/src/schemas/components/header.ts +10 -0
- package/src/schemas/components/heading.ts +3 -0
- package/src/schemas/components/icon.ts +3 -0
- package/src/schemas/components/image.ts +18 -0
- package/src/schemas/components/images.ts +4 -0
- package/src/schemas/components/list.ts +3 -0
- package/src/schemas/components/logo.ts +3 -0
- package/src/schemas/components/price.ts +3 -0
- package/src/schemas/components/rating.ts +15 -0
- package/src/schemas/components/section.ts +15 -0
- package/src/schemas/components/sections.ts +3 -0
- package/src/schemas/components/social.ts +3 -0
- package/src/schemas/components/socials.ts +4 -0
- package/src/schemas/components/tagline.ts +3 -0
- package/src/schemas/components/text.ts +3 -0
- package/src/schemas/components/writeup.ts +20 -0
- package/src/schemas/imageSchema.ts +12 -0
- package/src/schemas/pageSchema.ts +63 -0
- package/src/schemas/presetSchema.ts +29 -0
- package/src/schemas/utils/categories.ts +3 -0
- package/src/schemas/utils/component.ts +17 -0
- package/src/schemas/utils/navigation.ts +53 -0
- package/src/schemas/{utils.ts → utils/pathSchema.ts} +2 -11
- package/src/types/global-props.d.ts +16 -0
- package/src/types/virtual-modules.d.ts +5 -0
- package/src/utils/_archive/Childmorphic.ts +1 -1
- package/src/utils/_archive/mergeEntries.ts +28 -0
- package/src/utils/getCategoryPages.ts +11 -0
- package/src/utils/getChildPages.ts +16 -0
- package/src/utils/getSiblingPages.ts +14 -0
- package/tsconfig.json +1 -2
- package/public/favicon/site.webmanifest +0 -19
- package/public/images/avatars/1.jpeg +0 -0
- package/public/images/avatars/2.jpeg +0 -0
- package/public/images/avatars/3.jpeg +0 -0
- package/public/images/avatars/300/1.jpeg +0 -0
- package/public/images/avatars/300/2.jpeg +0 -0
- package/public/images/avatars/300/3.jpeg +0 -0
- package/public/images/avatars/300/4.jpeg +0 -0
- package/public/images/avatars/4.jpeg +0 -0
- package/public/images/avatars/5.jpeg +0 -0
- package/public/images/avatars/6.jpeg +0 -0
- package/public/images/avatars/7.jpeg +0 -0
- package/public/images/avatars/8.jpeg +0 -0
- package/public/images/blocks/colleagues.png +0 -0
- package/public/images/blocks/content.png +0 -0
- package/public/images/blocks/cta.png +0 -0
- package/public/images/blocks/features.png +0 -0
- package/public/images/blocks/footer.png +0 -0
- package/public/images/blocks/header.png +0 -0
- package/public/images/blocks/hero.png +0 -0
- package/public/images/blocks/intro.png +0 -0
- package/public/images/blocks/posts.png +0 -0
- package/public/images/blocks/prices.png +0 -0
- package/public/images/blocks/reviews.png +0 -0
- package/public/images/logo-placeholder.svg +0 -1
- package/src/components/Bento.astro +0 -43
- package/src/components/Block.astro +0 -157
- package/src/components/Blocks.astro +0 -5
- package/src/components/Box.astro +0 -63
- package/src/components/Carousel.astro +0 -54
- package/src/components/Column.astro +0 -73
- package/src/components/Grid.astro +0 -32
- package/src/components/Masonry.astro +0 -42
- package/src/components/Root.astro +0 -94
- package/src/components/Row.astro +0 -49
- package/src/components/Split.astro +0 -59
- package/src/components/Spread.astro +0 -46
- package/src/components/Stack.astro +0 -36
- package/src/components/Toggle.astro +0 -46
- package/src/components/Wrap.astro +0 -42
- package/src/components/docs/NavigationButtons.astro +0 -59
- package/src/components/experimental/Channel.astro +0 -74
- package/src/components/experimental/Price.astro +0 -40
- package/src/content/pages/_changelog.mdx +0 -10
- package/src/content/pages/_segment/footer.mdx +0 -244
- package/src/content/pages/_segment/header.mdx +0 -210
- package/src/content/pages/base/_image.mdx +0 -14
- package/src/content/pages/base/toggle.mdx +0 -32
- package/src/content/pages/blocks.mdx +0 -10
- package/src/content/pages/overview/integration.mdx +0 -37
- package/src/content/pages/structure/_row.mdx +0 -23
- package/src/content/pages/structure/_wrap.mdx +0 -25
- package/src/content/pages/structure/carousel.mdx +0 -31
- package/src/content/pages/structure/column.mdx +0 -21
- package/src/content/pages/structure/grid.mdx +0 -26
- package/src/content/pages/structure/masonry.mdx +0 -32
- package/src/content/pages/structure/split.mdx +0 -21
- package/src/content/pages/structure/spread.mdx +0 -21
- package/src/content/pages/structure/stack.mdx +0 -22
- package/src/content/settings/base.yml +0 -55
- package/src/content/settings/components.yml +0 -29
- package/src/layouts/BlockOverviewLayout.astro +0 -39
- package/src/layouts/ComponentLayout.astro +0 -23
- package/src/layouts/JobsLayout.astro +0 -40
- package/src/schemas/base.ts +0 -90
- package/src/schemas/block.ts +0 -15
- package/src/schemas/card.ts +0 -3
- package/src/schemas/page.ts +0 -43
- package/src/utils/mergeEntries.ts +0 -28
- /package/{public/showcase → src/images}/anti-slip-profiles.webp +0 -0
- /package/{public/images/avatars/500/1.jpeg → src/images/avatar-1.jpeg} +0 -0
- /package/{public/images/avatars/500/2.jpeg → src/images/avatar-2.jpeg} +0 -0
- /package/{public/images/avatars/500/3.jpeg → src/images/avatar-3.jpeg} +0 -0
- /package/{public/images/avatars/500/4.jpeg → src/images/avatar-4.jpeg} +0 -0
- /package/{public → src}/images/avatar-placeholder.jpg +0 -0
- /package/{public → src}/images/block-code.png +0 -0
- /package/{public → src}/images/component-code.png +0 -0
- /package/{public/showcase → src/images}/fulldev-ui.webp +0 -0
- /package/{public/showcase → src/images}/lavis-detailing.webp +0 -0
- /package/{public/showcase → src/images}/leren-trainingsacteren.webp +0 -0
- /package/{public/showcase → src/images}/miele-witgoedcenter-amsterdam.webp +0 -0
- /package/{public → src}/images/og-image.png +0 -0
- /package/{public → src}/images/placeholder-center.webp +0 -0
- /package/{public → src}/images/placeholder-landscape-dark.png +0 -0
- /package/{public → src}/images/placeholder-landscape.webp +0 -0
- /package/{public → src}/images/placeholder-portrait.webp +0 -0
- /package/{public → src}/images/placeholder-right.webp +0 -0
- /package/{public → src}/images/placeholder.webp +0 -0
- /package/{public/showcase → src/images}/sloepverhuur-bolsward.webp +0 -0
- /package/{public/showcase → src/images}/stark-vulcanising-products.webp +0 -0
- /package/{public/showcase → src/images}/the-gym-haren.webp +0 -0
- /package/{public/showcase → src/images}/van-dillen-antieke-bouwmaterialen.webp +0 -0
|
@@ -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>
|
package/src/integration/index.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import viteYaml from '@rollup/plugin-yaml'
|
|
1
2
|
import type { AstroIntegration } from 'astro'
|
|
3
|
+
import favicons from 'astro-favicons'
|
|
2
4
|
import merge from 'deepmerge'
|
|
5
|
+
import fs from 'fs/promises'
|
|
6
|
+
import yaml from 'js-yaml'
|
|
7
|
+
import path from 'path'
|
|
3
8
|
import virtual from 'vite-plugin-virtual'
|
|
4
9
|
import { generateRadixColors } from './generate-colors'
|
|
5
10
|
|
|
@@ -10,12 +15,16 @@ type Color = {
|
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
interface Config {
|
|
18
|
+
favicon?: string
|
|
19
|
+
company?: string
|
|
13
20
|
css?: string
|
|
14
21
|
injectRoutes?: boolean
|
|
22
|
+
overrideComponents?: boolean
|
|
23
|
+
generateImageEntries?: boolean
|
|
15
24
|
colors: {
|
|
16
25
|
theme: 'light' | 'dark'
|
|
17
|
-
light?: Color
|
|
18
|
-
dark?: Color
|
|
26
|
+
light?: Color | undefined
|
|
27
|
+
dark?: Color | undefined
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
|
|
@@ -28,11 +37,13 @@ const defaultConfig: Config = {
|
|
|
28
37
|
brand: '#000',
|
|
29
38
|
},
|
|
30
39
|
},
|
|
40
|
+
generateImageEntries: false,
|
|
31
41
|
}
|
|
42
|
+
|
|
32
43
|
export default function fulldevIntegration(
|
|
33
|
-
userConfig?: Partial<Config>
|
|
44
|
+
userConfig?: Partial<Config> | undefined
|
|
34
45
|
): AstroIntegration {
|
|
35
|
-
const config = merge(defaultConfig
|
|
46
|
+
const config = merge(defaultConfig, userConfig ?? {})
|
|
36
47
|
|
|
37
48
|
return {
|
|
38
49
|
name: '/integration',
|
|
@@ -44,6 +55,21 @@ export default function fulldevIntegration(
|
|
|
44
55
|
injectRoute,
|
|
45
56
|
}) => {
|
|
46
57
|
// ----------------------
|
|
58
|
+
// Inject favicon integration
|
|
59
|
+
// ----------------------
|
|
60
|
+
config.favicon &&
|
|
61
|
+
config.company &&
|
|
62
|
+
updateConfig({
|
|
63
|
+
integrations: [
|
|
64
|
+
favicons({
|
|
65
|
+
path: 'favicon',
|
|
66
|
+
masterPicture: config.favicon,
|
|
67
|
+
appName: config.company,
|
|
68
|
+
appShortName: config.company,
|
|
69
|
+
}),
|
|
70
|
+
],
|
|
71
|
+
})
|
|
72
|
+
// ----------------------
|
|
47
73
|
// Inject css
|
|
48
74
|
// ----------------------
|
|
49
75
|
config?.css && injectScript('page-ssr', `import "${config?.css}";`)
|
|
@@ -64,7 +90,7 @@ export default function fulldevIntegration(
|
|
|
64
90
|
const scaleToString = (
|
|
65
91
|
scale: any,
|
|
66
92
|
palette: 'base' | 'brand',
|
|
67
|
-
alpha?: boolean
|
|
93
|
+
alpha?: boolean | undefined
|
|
68
94
|
) =>
|
|
69
95
|
scale
|
|
70
96
|
.map(
|
|
@@ -123,11 +149,14 @@ export default function fulldevIntegration(
|
|
|
123
149
|
updateConfig({
|
|
124
150
|
vite: {
|
|
125
151
|
plugins: [
|
|
152
|
+
viteYaml(),
|
|
126
153
|
virtual({
|
|
127
154
|
'virtual:astro/config': `export default ${JSON.stringify(astroConfig)}`,
|
|
128
|
-
'virtual:fulldev-ui/config': `export default ${JSON.stringify(
|
|
155
|
+
'virtual:fulldev-ui/config': `export default ${JSON.stringify({
|
|
156
|
+
...config,
|
|
157
|
+
})}`,
|
|
129
158
|
'virtual:colors.css': css,
|
|
130
|
-
}),
|
|
159
|
+
}) as any,
|
|
131
160
|
],
|
|
132
161
|
css: {
|
|
133
162
|
preprocessorOptions: {
|
|
@@ -141,6 +170,37 @@ export default function fulldevIntegration(
|
|
|
141
170
|
|
|
142
171
|
injectScript('page-ssr', `import "virtual:colors.css";`)
|
|
143
172
|
|
|
173
|
+
// ----------------------
|
|
174
|
+
// Generate image YAML files
|
|
175
|
+
// ----------------------
|
|
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
|
+
}
|
|
203
|
+
|
|
144
204
|
// ----------------------
|
|
145
205
|
// Inject routes
|
|
146
206
|
// ----------------------
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
3
|
import Intro from 'fulldev-ui/blocks/Intro.astro'
|
|
4
4
|
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
5
5
|
|
|
6
|
-
type Props =
|
|
6
|
+
type Props = ComponentProps<typeof Layout>
|
|
7
7
|
|
|
8
|
-
const {
|
|
8
|
+
const { render, title, sections, ...rest } = Astro.props
|
|
9
9
|
const { Content } = await render()
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<Layout
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}}
|
|
20
|
-
{...data}
|
|
21
|
-
/>
|
|
22
|
-
<Content />
|
|
23
|
-
<slot />
|
|
12
|
+
<Layout
|
|
13
|
+
class:list="block-layout"
|
|
14
|
+
{render}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<Intro heading={title} />
|
|
18
|
+
{Content && <Content />}
|
|
24
19
|
</Layout>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Sections from 'fulldev-ui/components/sections.astro'
|
|
4
|
+
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
5
|
+
import Contact from '../blocks/Contact.astro'
|
|
6
|
+
|
|
7
|
+
type Props = ComponentProps<typeof Layout> & {
|
|
8
|
+
contactProps: ComponentProps<typeof Contact>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { render, sections, contactProps, ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Layout {...Astro.props}>
|
|
15
|
+
<Contact
|
|
16
|
+
level={1}
|
|
17
|
+
{...rest}
|
|
18
|
+
/>
|
|
19
|
+
<Sections {sections} />
|
|
20
|
+
<slot />
|
|
21
|
+
</Layout>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
+
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
5
|
+
|
|
6
|
+
type Props = ComponentProps<typeof Layout>
|
|
7
|
+
|
|
8
|
+
const { sections, ...rest } = Astro.props
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Layout
|
|
12
|
+
class:list="content-layout"
|
|
13
|
+
{...rest}
|
|
14
|
+
>
|
|
15
|
+
<Article />
|
|
16
|
+
</Layout>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
|
+
import Prose from 'fulldev-ui/components/experimental/Prose.astro'
|
|
6
|
+
import Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
7
|
+
import { crush } from 'radash'
|
|
8
|
+
|
|
9
|
+
type Props = ComponentProps<typeof Layout>
|
|
10
|
+
|
|
11
|
+
const { render, slug, navigation, ...rest } = Astro.props
|
|
12
|
+
const { Content } = await render()
|
|
13
|
+
|
|
14
|
+
const flatButtons = crush((navigation as any)?.buttons ?? {})
|
|
15
|
+
const slugs = Object.entries(flatButtons)
|
|
16
|
+
.map(([key, value]) => (key.endsWith('.slug') ? value : null))
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
const slugIndex = slugs.findIndex((val) => val === slug)
|
|
19
|
+
|
|
20
|
+
const prevSlug = slugs[slugIndex - 1]
|
|
21
|
+
const nextSlug = slugs[slugIndex + 1]
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<Layout
|
|
25
|
+
class:list="docs-layout"
|
|
26
|
+
{render}
|
|
27
|
+
{slug}
|
|
28
|
+
{navigation}
|
|
29
|
+
{...rest}
|
|
30
|
+
>
|
|
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>
|
|
50
|
+
|
|
51
|
+
<style lang="scss" is:global>
|
|
52
|
+
@layer fulldev {
|
|
53
|
+
.docs-layout {
|
|
54
|
+
.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
|
+
> a,
|
|
64
|
+
> p > a {
|
|
65
|
+
color: var(--brand-11);
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
color: var(--brand-12);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.prev-next {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: space-between;
|
|
75
|
+
align-items: center;
|
|
76
|
+
margin-top: var(--space-7);
|
|
77
|
+
|
|
78
|
+
&.next-only {
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -1,169 +1,147 @@
|
|
|
1
1
|
---
|
|
2
|
+
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
2
3
|
import type { CollectionEntry } from 'astro:content'
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import Banner from 'fulldev-ui/blocks/Banner.astro'
|
|
5
|
+
import Footer from 'fulldev-ui/blocks/Footer.astro'
|
|
6
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
6
7
|
import Head from 'fulldev-ui/components/Head.astro'
|
|
7
8
|
import Header from 'fulldev-ui/components/Header.astro'
|
|
9
|
+
import Sections from 'fulldev-ui/components/sections.astro'
|
|
8
10
|
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
9
11
|
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
type Props =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
13
|
+
|
|
14
|
+
type Props = GlobalProps &
|
|
15
|
+
HTMLAttributes<'html'> & {
|
|
16
|
+
render: CollectionEntry<'pages'>['render']
|
|
17
|
+
slug: CollectionEntry<'pages'>['slug']
|
|
18
|
+
header?: ComponentProps<typeof Header>
|
|
19
|
+
footer?: ComponentProps<typeof Footer>
|
|
20
|
+
sections?: ComponentProps<typeof Sections>['sections']
|
|
21
|
+
banner?: any
|
|
22
|
+
toc?: any
|
|
23
|
+
sidebar?: any
|
|
24
|
+
navigation?: any
|
|
25
|
+
themeselect?: any
|
|
26
|
+
code?: {
|
|
27
|
+
head?: string
|
|
28
|
+
body?: string
|
|
29
|
+
}
|
|
30
|
+
title?: string
|
|
31
|
+
description?: string
|
|
32
|
+
image?: string
|
|
33
|
+
seo?: {
|
|
34
|
+
title?: string
|
|
35
|
+
description?: string
|
|
36
|
+
image?: string
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
render,
|
|
42
|
+
header,
|
|
43
|
+
navigation,
|
|
44
|
+
footer,
|
|
45
|
+
sidebar,
|
|
46
|
+
toc,
|
|
47
|
+
sections,
|
|
48
|
+
theme,
|
|
49
|
+
banner,
|
|
50
|
+
code,
|
|
51
|
+
themeselect,
|
|
52
|
+
...rest
|
|
53
|
+
} = Astro.props
|
|
23
54
|
---
|
|
24
55
|
|
|
25
56
|
<!doctype html>
|
|
26
|
-
<html
|
|
27
|
-
lang="nl"
|
|
28
|
-
class:list={[
|
|
29
|
-
slug,
|
|
30
|
-
{
|
|
31
|
-
'theme-dark': theme === 'dark',
|
|
32
|
-
'theme-light': theme === 'light',
|
|
33
|
-
},
|
|
34
|
-
]}
|
|
35
|
-
>
|
|
57
|
+
<html {...rest}>
|
|
36
58
|
<Head {...Astro.props} />
|
|
37
|
-
<body
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
<Element as="body">
|
|
60
|
+
<slot name="banner">
|
|
61
|
+
<Banner text={banner} />
|
|
62
|
+
</slot>
|
|
63
|
+
<slot name="header">
|
|
64
|
+
<Header
|
|
65
|
+
open={header}
|
|
66
|
+
{...navigation}
|
|
67
|
+
{themeselect}
|
|
68
|
+
{...header}
|
|
69
|
+
/>
|
|
70
|
+
</slot>
|
|
49
71
|
<div class="core">
|
|
50
|
-
<
|
|
72
|
+
<slot name="sidebar">
|
|
73
|
+
<Sidebar
|
|
74
|
+
open={sidebar}
|
|
75
|
+
{...navigation}
|
|
76
|
+
{...sidebar}
|
|
77
|
+
/>
|
|
78
|
+
</slot>
|
|
51
79
|
<main data-pagefind-body>
|
|
80
|
+
<slot />
|
|
81
|
+
<Sections {sections} />
|
|
82
|
+
</main>
|
|
83
|
+
<slot name="toc">
|
|
52
84
|
<Toc
|
|
53
|
-
|
|
54
|
-
|
|
85
|
+
{render}
|
|
86
|
+
{...toc}
|
|
55
87
|
/>
|
|
56
|
-
|
|
57
|
-
<slot />
|
|
58
|
-
<NavigationButtons {sidebar} />
|
|
59
|
-
</div>
|
|
60
|
-
</main>
|
|
88
|
+
</slot>
|
|
61
89
|
</div>
|
|
90
|
+
<slot name="footer">
|
|
91
|
+
<Footer {...footer} />
|
|
92
|
+
</slot>
|
|
93
|
+
<Fragment set:html={code?.body} />
|
|
62
94
|
|
|
63
|
-
{
|
|
64
|
-
channels?.whatsapp && (
|
|
65
|
-
<Button
|
|
66
|
-
variant="primary"
|
|
67
|
-
color="brand"
|
|
68
|
-
icon="brand-whatsapp"
|
|
69
|
-
size="lg"
|
|
70
|
-
href={`https://wa.me/${channels.whatsapp}`}
|
|
71
|
-
style={{
|
|
72
|
-
position: 'fixed',
|
|
73
|
-
right: 'var(--space-4)',
|
|
74
|
-
bottom: 'var(--space-4)',
|
|
75
|
-
backgroundColor: '#46A758',
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
<Block
|
|
81
|
-
_bookshop_name="Footer"
|
|
82
|
-
{logo}
|
|
83
|
-
{...footer}
|
|
84
|
-
/>
|
|
85
|
-
<Blocks {...footers} />
|
|
86
|
-
|
|
87
|
-
<Fragment set:html={data?.code?.body} />
|
|
88
95
|
<style lang="scss" is:global>
|
|
89
96
|
@layer fulldev {
|
|
90
|
-
|
|
91
|
-
--screen: 1536px;
|
|
92
|
-
--gutter: max(4vw, calc(100vw - var(--screen)) / 2);
|
|
93
|
-
--gutter-left: var(--gutter);
|
|
94
|
-
--gutter-right: var(--gutter);
|
|
95
|
-
--sidebar-width: 0px;
|
|
96
|
-
--toc-width: 0px;
|
|
97
|
-
--header-height: calc(
|
|
98
|
-
var(--text-2) + 2 * var(--space-4) + 2 * var(--space-3)
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
html,
|
|
103
|
-
body {
|
|
104
|
-
box-sizing: border-box;
|
|
105
|
-
margin: 0;
|
|
106
|
-
background-color: var(--color-background);
|
|
107
|
-
padding: 0;
|
|
97
|
+
html {
|
|
108
98
|
width: 100%;
|
|
109
99
|
min-height: 100vh;
|
|
110
|
-
|
|
100
|
+
scroll-behavior: smooth;
|
|
111
101
|
color-scheme: var(--color-scheme);
|
|
112
102
|
font-size: var(--text-2);
|
|
113
|
-
font-family:
|
|
103
|
+
font-family: 'Inter', sans-serif;
|
|
114
104
|
}
|
|
115
105
|
|
|
116
106
|
body {
|
|
117
|
-
|
|
118
|
-
flex-direction: column;
|
|
107
|
+
--screen: 100vw;
|
|
119
108
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
--sidebar-width: calc(var(--gutter) + 200px);
|
|
124
|
-
|
|
125
|
-
display: grid;
|
|
126
|
-
grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&.has-toc main {
|
|
130
|
-
--gutter-right: var(--space-6);
|
|
131
|
-
--toc-width: calc(var(--gutter) + 200px);
|
|
132
|
-
|
|
133
|
-
display: grid;
|
|
134
|
-
grid-template-columns: minmax(0, 1fr) var(--toc-width);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.header {
|
|
139
|
-
width: 100%;
|
|
140
|
-
height: var(--header-height);
|
|
141
|
-
}
|
|
109
|
+
background-color: var(--base-2);
|
|
110
|
+
width: 100%;
|
|
111
|
+
color: var(--base-11);
|
|
142
112
|
|
|
143
113
|
.core {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
top: 0;
|
|
147
|
-
padding-left: var(--gutter);
|
|
148
|
-
}
|
|
114
|
+
display: flex;
|
|
115
|
+
position: relative;
|
|
149
116
|
|
|
150
117
|
main {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
width: 100%;
|
|
162
|
-
}
|
|
118
|
+
--screen: 1280px;
|
|
119
|
+
|
|
120
|
+
display: flex;
|
|
121
|
+
flex: 1;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
background-color: var(--color-background);
|
|
124
|
+
width: 100%;
|
|
125
|
+
max-width: 100vw;
|
|
126
|
+
min-height: 100vh;
|
|
127
|
+
overflow-x: hidden;
|
|
163
128
|
}
|
|
164
129
|
}
|
|
165
130
|
}
|
|
166
131
|
}
|
|
167
132
|
</style>
|
|
168
|
-
</
|
|
133
|
+
</Element>
|
|
169
134
|
</html>
|
|
135
|
+
|
|
136
|
+
<script>
|
|
137
|
+
const setTheme = (document: Document) => {
|
|
138
|
+
const theme = localStorage.getItem('theme') || ''
|
|
139
|
+
document.body.classList.add(`theme-${theme}`)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
setTheme(document)
|
|
143
|
+
|
|
144
|
+
document.addEventListener('astro:before-swap', (event) => {
|
|
145
|
+
setTheme(event.newDocument)
|
|
146
|
+
})
|
|
147
|
+
</script>
|
|
@@ -1,45 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import type { ComponentProps } from 'astro/types'
|
|
3
|
+
import Article from 'fulldev-ui/blocks/Article.astro'
|
|
4
|
+
import Categories from 'fulldev-ui/blocks/Categories.astro'
|
|
5
|
+
import Intro from 'fulldev-ui/blocks/Intro.astro'
|
|
6
|
+
import Products from 'fulldev-ui/blocks/Products.astro'
|
|
7
|
+
import Sections from 'fulldev-ui/components/sections.astro'
|
|
7
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'
|
|
8
11
|
|
|
9
|
-
type Props =
|
|
12
|
+
type Props = ComponentProps<typeof Layout>
|
|
10
13
|
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
+
const { slug, render, sections, children, ...rest } = Astro.props
|
|
15
|
+
|
|
16
|
+
const childPages = await getChildPages(slug)
|
|
17
|
+
const categoryPages = await getCategoryPages(slug)
|
|
18
|
+
// const siblingPages = await getSiblingPages(slug)
|
|
14
19
|
---
|
|
15
20
|
|
|
16
21
|
<Layout {...Astro.props}>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{...data}
|
|
21
|
-
/>
|
|
22
|
-
<Block
|
|
23
|
-
_bookshop_name="Categories"
|
|
24
|
-
source="children"
|
|
22
|
+
<Intro {...rest} />
|
|
23
|
+
<Categories
|
|
24
|
+
pages={childPages}
|
|
25
25
|
structure="grid"
|
|
26
|
-
|
|
26
|
+
panel
|
|
27
27
|
/>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
heading={data.title && references
|
|
31
|
-
? `Alle ${data.title.toLowerCase()}`
|
|
32
|
-
: undefined}
|
|
33
|
-
source="references"
|
|
28
|
+
<Products
|
|
29
|
+
pages={categoryPages}
|
|
34
30
|
structure="grid"
|
|
35
|
-
{...references ?? {}}
|
|
36
31
|
/>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
<Content />
|
|
40
|
-
</Prose>
|
|
41
|
-
</Section>
|
|
42
|
-
<Blocks {...sections} />
|
|
43
|
-
<Blocks {...blocks} />
|
|
32
|
+
<Article style={{ '--screen': '768px' }} />
|
|
33
|
+
<Sections {sections} />
|
|
44
34
|
<slot />
|
|
45
35
|
</Layout>
|