fulldev-ui 0.4.15 → 0.4.16
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/.github/ISSUE_TEMPLATE/bug_report.yml +7 -52
- package/.github/ISSUE_TEMPLATE/config.yml +3 -0
- package/.github/ISSUE_TEMPLATE/documentation.yml +12 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +7 -34
- package/.github/ISSUE_TEMPLATE/support.yml +12 -0
- package/.github/pull_request_template.md +1 -13
- package/CODE_OF_CONDUCT.md +6 -0
- package/CONTRIBUTING.md +20 -4
- package/README.md +1 -0
- package/package.json +2 -1
- package/public/showcase/anti-slip-profiles.webp +0 -0
- package/public/showcase/fulldev-ui.webp +0 -0
- package/public/showcase/lavis-detailing.webp +0 -0
- package/public/showcase/leren-trainingsacteren.webp +0 -0
- package/public/showcase/miele-witgoedcenter-amsterdam.webp +0 -0
- package/public/showcase/sloepverhuur-bolsward.webp +0 -0
- package/public/showcase/stark-vulcanising-products.webp +0 -0
- package/public/showcase/the-gym-haren.webp +0 -0
- package/public/showcase/van-dillen-antieke-bouwmaterialen.webp +0 -0
- package/src/blocks/Features.astro +1 -1
- package/src/blocks/Prices.astro +1 -1
- package/src/components/Badge.astro +1 -1
- package/src/components/Box.astro +3 -0
- package/src/components/Button.astro +7 -5
- package/src/components/Card.astro +23 -2
- package/src/components/Drawer.astro +1 -0
- package/src/components/Footer.astro +1 -1
- package/src/components/Grid.astro +1 -1
- package/src/components/Header.astro +52 -48
- package/src/components/Rating.astro +6 -2
- package/src/components/Root.astro +1 -1
- package/src/components/Section.astro +20 -2
- package/src/components/Stack.astro +36 -0
- package/src/components/docs/NavigationButtons.astro +59 -0
- package/src/components/experimental/Channel.astro +1 -4
- package/src/content/pages/_segment/footer.mdx +11 -11
- package/src/content/pages/base/badge.mdx +1 -1
- package/src/content/pages/base/button.mdx +9 -9
- package/src/content/pages/overview/showcase.mdx +62 -0
- package/src/content/pages/structure/stack.mdx +22 -0
- package/src/content/settings/base.yml +4 -0
- package/src/content/settings/components.yml +2 -0
- package/src/css/custom.css +16 -1
- package/src/layouts/Layout.astro +63 -62
- package/src/schemas/base.ts +10 -1
|
@@ -41,7 +41,14 @@ type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> & {
|
|
|
41
41
|
frame?: 'none' | 'fill' | 'panel'
|
|
42
42
|
align?: 'start' | 'center' | 'end'
|
|
43
43
|
justify?: 'start' | 'center' | 'end'
|
|
44
|
-
structure?:
|
|
44
|
+
structure?:
|
|
45
|
+
| 'column'
|
|
46
|
+
| 'split'
|
|
47
|
+
| 'spread'
|
|
48
|
+
| 'carousel'
|
|
49
|
+
| 'grid'
|
|
50
|
+
| 'masonry'
|
|
51
|
+
| 'stack'
|
|
45
52
|
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
46
53
|
space?: 'auto' | 'none'
|
|
47
54
|
reverse?: 'odd' | 'even'
|
|
@@ -75,12 +82,16 @@ const {
|
|
|
75
82
|
pages,
|
|
76
83
|
records,
|
|
77
84
|
mask,
|
|
85
|
+
justify,
|
|
86
|
+
theme,
|
|
78
87
|
ratio,
|
|
79
88
|
...rest
|
|
80
89
|
} = Astro.props
|
|
81
90
|
|
|
82
91
|
const mergedCards = (pages || records || cards)?.filter(Boolean)
|
|
83
92
|
const hasCards = mergedCards && mergedCards?.length > 0
|
|
93
|
+
const hasText = text || html || description || list
|
|
94
|
+
const hasButton = button || (buttons && buttons?.length > 0)
|
|
84
95
|
|
|
85
96
|
const buttonVariant = (i: number) => {
|
|
86
97
|
if (variant === 'primary' && i === 0) return 'primary'
|
|
@@ -95,6 +106,8 @@ const buttonVariant = (i: number) => {
|
|
|
95
106
|
<Root
|
|
96
107
|
class:list="section"
|
|
97
108
|
variant={hasCards ? undefined : variant}
|
|
109
|
+
justify={hasCards ? undefined : justify}
|
|
110
|
+
theme={hasCards ? undefined : theme}
|
|
98
111
|
structure={structure === 'split' ? 'split' : 'column'}
|
|
99
112
|
frame={frame === 'panel' && hasCards ? 'none' : frame}
|
|
100
113
|
{as}
|
|
@@ -104,7 +117,9 @@ const buttonVariant = (i: number) => {
|
|
|
104
117
|
{...rest}
|
|
105
118
|
>
|
|
106
119
|
<Box
|
|
107
|
-
structure={structure === 'spread' ||
|
|
120
|
+
structure={structure === 'spread' ||
|
|
121
|
+
structure === 'carousel' ||
|
|
122
|
+
(!hasText && hasButton)
|
|
108
123
|
? 'spread'
|
|
109
124
|
: 'column'}
|
|
110
125
|
align={structure === 'split' ? 'start' : align}
|
|
@@ -119,6 +134,7 @@ const buttonVariant = (i: number) => {
|
|
|
119
134
|
<slot name="writeup">
|
|
120
135
|
<Rating
|
|
121
136
|
color="brand"
|
|
137
|
+
{align}
|
|
122
138
|
{...typeof rating === 'number' ? { value: rating } : rating}
|
|
123
139
|
/>
|
|
124
140
|
<Badge
|
|
@@ -174,6 +190,8 @@ const buttonVariant = (i: number) => {
|
|
|
174
190
|
level={Number(level) + 2}
|
|
175
191
|
{position}
|
|
176
192
|
{frame}
|
|
193
|
+
{justify}
|
|
194
|
+
{theme}
|
|
177
195
|
{variant}
|
|
178
196
|
{ratio}
|
|
179
197
|
{mask}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types'
|
|
3
|
+
import Root from 'fulldev-ui/components/Root.astro'
|
|
4
|
+
|
|
5
|
+
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
|
|
6
|
+
color?: 'base' | 'brand'
|
|
7
|
+
size?: 'sm' | 'md' | 'lg'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Root
|
|
14
|
+
class:list="stack"
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</Root>
|
|
19
|
+
|
|
20
|
+
<style is:global lang="scss">
|
|
21
|
+
@layer fulldev {
|
|
22
|
+
.stack {
|
|
23
|
+
display: grid;
|
|
24
|
+
position: relative;
|
|
25
|
+
grid-template-columns: 1fr;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
gap: var(--space-6);
|
|
28
|
+
width: 100%;
|
|
29
|
+
|
|
30
|
+
@media (min-width: 1024px) {
|
|
31
|
+
grid-auto-columns: 1fr;
|
|
32
|
+
grid-auto-flow: column;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getCollection } from 'astro:content'
|
|
3
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
|
+
import Section from '../Section.astro'
|
|
5
|
+
import Spread from '../Spread.astro'
|
|
6
|
+
|
|
7
|
+
const { sidebar = [] } = Astro.props
|
|
8
|
+
|
|
9
|
+
const allPages = await getCollection('pages')
|
|
10
|
+
const pages = []
|
|
11
|
+
|
|
12
|
+
for (const item of sidebar as any) {
|
|
13
|
+
if (item.links) pages.push(...item.links)
|
|
14
|
+
if (item.folder) {
|
|
15
|
+
const folderPages = allPages.filter(
|
|
16
|
+
(page: any) =>
|
|
17
|
+
page.slug.startsWith(item.folder) && !page.slug.endsWith(item.folder)
|
|
18
|
+
)
|
|
19
|
+
pages.push(
|
|
20
|
+
...folderPages.map((page: any) => ({
|
|
21
|
+
href: `/${page.slug}`,
|
|
22
|
+
text: page.data.title,
|
|
23
|
+
}))
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const withoutLeadingOrTrailingSlashes = (path: string) =>
|
|
29
|
+
path.replace(/^\/+|\/+$/g, '')
|
|
30
|
+
|
|
31
|
+
const currentIndex = pages.findIndex(
|
|
32
|
+
(page: any) =>
|
|
33
|
+
withoutLeadingOrTrailingSlashes(page?.href) ===
|
|
34
|
+
withoutLeadingOrTrailingSlashes(Astro.url.pathname)
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
const prevPage = pages[currentIndex - 1]
|
|
38
|
+
const nextPage = pages[currentIndex + 1]
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
{
|
|
42
|
+
sidebar && sidebar.length > 0 && (
|
|
43
|
+
<Section>
|
|
44
|
+
<Spread>
|
|
45
|
+
<Button
|
|
46
|
+
href={prevPage?.href}
|
|
47
|
+
variant="secondary"
|
|
48
|
+
text={prevPage ? `← ${prevPage.text}` : undefined}
|
|
49
|
+
/>
|
|
50
|
+
<Button
|
|
51
|
+
href={nextPage?.href}
|
|
52
|
+
variant="secondary"
|
|
53
|
+
text={nextPage ? `${nextPage.text} →` : undefined}
|
|
54
|
+
style={{ marginLeft: 'auto' }}
|
|
55
|
+
/>
|
|
56
|
+
</Spread>
|
|
57
|
+
</Section>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
@@ -16,7 +16,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
16
16
|
|
|
17
17
|
<Footer
|
|
18
18
|
heading="Fulldev UI"
|
|
19
|
-
|
|
19
|
+
text="Rapidly build content-driven websites."
|
|
20
20
|
align="start"
|
|
21
21
|
size="sm"
|
|
22
22
|
columns={[
|
|
@@ -45,7 +45,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
45
45
|
|
|
46
46
|
<Footer
|
|
47
47
|
heading="Fulldev UI"
|
|
48
|
-
|
|
48
|
+
text="Rapidly build content-driven websites."
|
|
49
49
|
align="start"
|
|
50
50
|
size="sm"
|
|
51
51
|
columns={[
|
|
@@ -70,7 +70,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
70
70
|
|
|
71
71
|
<Footer
|
|
72
72
|
heading="Fulldev UI"
|
|
73
|
-
|
|
73
|
+
text="Rapidly build content-driven websites."
|
|
74
74
|
align="start"
|
|
75
75
|
size="sm"
|
|
76
76
|
structure="spread"
|
|
@@ -88,7 +88,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
88
88
|
|
|
89
89
|
<Footer
|
|
90
90
|
heading="Fulldev UI"
|
|
91
|
-
|
|
91
|
+
text="Rapidly build content-driven websites."
|
|
92
92
|
align="start"
|
|
93
93
|
size="md"
|
|
94
94
|
structure="spread"
|
|
@@ -106,7 +106,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
106
106
|
|
|
107
107
|
<Footer
|
|
108
108
|
heading="Fulldev UI"
|
|
109
|
-
|
|
109
|
+
text="Rapidly build content-driven websites."
|
|
110
110
|
align="start"
|
|
111
111
|
size="lg"
|
|
112
112
|
structure="spread"
|
|
@@ -133,7 +133,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
133
133
|
structure="spread"
|
|
134
134
|
align="start"
|
|
135
135
|
heading="Fulldev UI"
|
|
136
|
-
|
|
136
|
+
text="Rapidly build content-driven websites."
|
|
137
137
|
columns={[
|
|
138
138
|
{
|
|
139
139
|
heading: 'Links',
|
|
@@ -151,7 +151,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
151
151
|
structure="spread"
|
|
152
152
|
align="start"
|
|
153
153
|
heading="Fulldev UI"
|
|
154
|
-
|
|
154
|
+
text="Rapidly build content-driven websites."
|
|
155
155
|
columns={[
|
|
156
156
|
{
|
|
157
157
|
heading: 'Links',
|
|
@@ -169,7 +169,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
169
169
|
structure="spread"
|
|
170
170
|
align="start"
|
|
171
171
|
heading="Fulldev UI"
|
|
172
|
-
|
|
172
|
+
text="Rapidly build content-driven websites."
|
|
173
173
|
columns={[
|
|
174
174
|
{
|
|
175
175
|
heading: 'Links',
|
|
@@ -187,7 +187,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
187
187
|
structure="spread"
|
|
188
188
|
align="start"
|
|
189
189
|
heading="Fulldev UI"
|
|
190
|
-
|
|
190
|
+
text="Rapidly build content-driven websites."
|
|
191
191
|
columns={[
|
|
192
192
|
{
|
|
193
193
|
heading: 'Links',
|
|
@@ -211,7 +211,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
211
211
|
structure="spread"
|
|
212
212
|
align="start"
|
|
213
213
|
heading="Fulldev UI"
|
|
214
|
-
|
|
214
|
+
text="Rapidly build content-driven websites."
|
|
215
215
|
columns={[
|
|
216
216
|
{
|
|
217
217
|
heading: 'Links',
|
|
@@ -229,7 +229,7 @@ import Footer from 'fulldev-ui/components/Footer.astro'
|
|
|
229
229
|
structure="spread"
|
|
230
230
|
align="start"
|
|
231
231
|
heading="Fulldev UI"
|
|
232
|
-
|
|
232
|
+
text="Rapidly build content-driven websites."
|
|
233
233
|
columns={[
|
|
234
234
|
{
|
|
235
235
|
heading: 'Links',
|
|
@@ -38,7 +38,7 @@ import Button from 'fulldev-ui/components/Button.astro'
|
|
|
38
38
|
import Button from 'fulldev-ui/components/Button.astro'
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
-
<Button icon="circle"
|
|
41
|
+
<Button icon="circle" text="Button" text="Buttontje" />
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
```astro live
|
|
@@ -46,9 +46,9 @@ import Button from 'fulldev-ui/components/Button.astro'
|
|
|
46
46
|
import Button from 'fulldev-ui/components/Button.astro'
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
-
<Button size="sm"
|
|
50
|
-
<Button size="md"
|
|
51
|
-
<Button size="lg"
|
|
49
|
+
<Button size="sm" text="Button" />
|
|
50
|
+
<Button size="md" text="Button" />
|
|
51
|
+
<Button size="lg" text="Button" />
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
```astro live
|
|
@@ -56,8 +56,8 @@ import Button from 'fulldev-ui/components/Button.astro'
|
|
|
56
56
|
import Button from 'fulldev-ui/components/Button.astro'
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
-
<Button color="base"
|
|
60
|
-
<Button color="brand"
|
|
59
|
+
<Button color="base" text="Button" />
|
|
60
|
+
<Button color="brand" text="Button" />
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
```astro live
|
|
@@ -65,7 +65,7 @@ import Button from 'fulldev-ui/components/Button.astro'
|
|
|
65
65
|
import Button from 'fulldev-ui/components/Button.astro'
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
-
<Button radius="none"
|
|
69
|
-
<Button radius="auto"
|
|
70
|
-
<Button radius="full"
|
|
68
|
+
<Button radius="none" text="Button" />
|
|
69
|
+
<Button radius="auto" text="Button" />
|
|
70
|
+
<Button radius="full" text="Button" />
|
|
71
71
|
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
showcase:
|
|
3
|
+
# Add your project here below 👇
|
|
4
|
+
|
|
5
|
+
- heading: Van Dillen Antieke Bouwmaterialen
|
|
6
|
+
image: /showcase/van-dillen-antieke-bouwmaterialen.webp
|
|
7
|
+
href: 'https://vdabouwmaterialen.nl'
|
|
8
|
+
- heading: Anti Slip Profiles
|
|
9
|
+
image: /showcase/anti-slip-profiles.webp
|
|
10
|
+
href: 'https://antislipprofiles.com'
|
|
11
|
+
- heading: Fulldev UI
|
|
12
|
+
image: /showcase/fulldev-ui.webp
|
|
13
|
+
href: 'https://ui.ull.dev'
|
|
14
|
+
- heading: The Gym Haren
|
|
15
|
+
image: /showcase/the-gym-haren.webp
|
|
16
|
+
href: 'https://thegymharen.nl'
|
|
17
|
+
- heading: Lavis Detailing
|
|
18
|
+
image: /showcase/lavis-detailing.webp
|
|
19
|
+
href: 'https://lavisdetailing.nl'
|
|
20
|
+
- heading: Leren Trainingsacteren
|
|
21
|
+
image: /showcase/leren-trainingsacteren.webp
|
|
22
|
+
href: 'https://lerentrainingsacteren.nl'
|
|
23
|
+
- heading: Miele Witgoedcenter Amsterdam
|
|
24
|
+
image: /showcase/miele-witgoedcenter-amsterdam.webp
|
|
25
|
+
href: 'https://witgoedcenteramsterdam.nl'
|
|
26
|
+
- heading: Sloepverhuur Bolsward
|
|
27
|
+
image: /showcase/sloepverhuur-bolsward.webp
|
|
28
|
+
href: 'https://sloepverhuurbolsward.nl'
|
|
29
|
+
- heading: Stark Vulcanising Products
|
|
30
|
+
image: /showcase/stark-vulcanising-products.webp
|
|
31
|
+
|
|
32
|
+
_layout: PostLayout
|
|
33
|
+
settings: components
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
import Masonry from 'fulldev-ui/components/Masonry.astro'
|
|
37
|
+
import Card from 'fulldev-ui/components/Card.astro'
|
|
38
|
+
|
|
39
|
+
# Showcase
|
|
40
|
+
|
|
41
|
+
Projects that are built with Fulldev UI.
|
|
42
|
+
|
|
43
|
+
<Card
|
|
44
|
+
color="brand"
|
|
45
|
+
size="sm"
|
|
46
|
+
frame="panel"
|
|
47
|
+
style={{ marginTop: 'var(--space-6)', marginBottom: 'var(--space-7)' }}
|
|
48
|
+
heading="Your project in this showcase?"
|
|
49
|
+
description="Add your project to the showcase in 1 minute."
|
|
50
|
+
button={{
|
|
51
|
+
text: 'Add your project',
|
|
52
|
+
variant: 'secondary',
|
|
53
|
+
href: 'https://github.com/fulldotdev/ui/blob/main/CONTRIBUTING.md#showcase',
|
|
54
|
+
target: '_blank',
|
|
55
|
+
}}
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<Masonry>
|
|
59
|
+
{frontmatter.showcase.map((showcase) => (
|
|
60
|
+
<Card frame="panel" position="inset" {...showcase} target="_blank" />
|
|
61
|
+
))}
|
|
62
|
+
</Masonry>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
_layout: BlockLayout
|
|
3
|
+
settings: components
|
|
4
|
+
|
|
5
|
+
title: Stack
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```astro live
|
|
9
|
+
---
|
|
10
|
+
import DecorativeBox from 'fulldev-ui/components/docs/DecorativeBox.astro'
|
|
11
|
+
import Section from 'fulldev-ui/components/Section.astro'
|
|
12
|
+
import Stack from 'fulldev-ui/components/Stack.astro'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Section>
|
|
16
|
+
<Stack>
|
|
17
|
+
<DecorativeBox />
|
|
18
|
+
<DecorativeBox />
|
|
19
|
+
<DecorativeBox />
|
|
20
|
+
</Stack>
|
|
21
|
+
</Section>
|
|
22
|
+
```
|
|
@@ -11,6 +11,8 @@ header:
|
|
|
11
11
|
href: /typography/heading
|
|
12
12
|
- text: Blocks
|
|
13
13
|
href: /blocks
|
|
14
|
+
- text: Showcase
|
|
15
|
+
href: /overview/showcase
|
|
14
16
|
search:
|
|
15
17
|
icon: search
|
|
16
18
|
variant: soft
|
|
@@ -43,6 +45,8 @@ header:
|
|
|
43
45
|
href: /overview/theming
|
|
44
46
|
- text: Frameworks
|
|
45
47
|
href: /overview/frameworks
|
|
48
|
+
- text: Showcase
|
|
49
|
+
href: /overview/showcase
|
|
46
50
|
- heading: Typography
|
|
47
51
|
folder: typography
|
|
48
52
|
- heading: Base
|
package/src/css/custom.css
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
/* TODO: temporary decreased due to z-index issue over header */
|
|
1
2
|
.hero:not(.window .hero)::before {
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: -1;
|
|
7
|
+
background: radial-gradient(
|
|
8
|
+
ellipse closest-side,
|
|
9
|
+
rgba(255, 85, 0, 0.1),
|
|
10
|
+
#f500 70%
|
|
11
|
+
);
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
content: '';
|
|
15
|
+
}
|
|
16
|
+
/* .hero:not(.window .hero)::before {
|
|
2
17
|
position: absolute;
|
|
3
18
|
top: -80%;
|
|
4
19
|
left: 0;
|
|
@@ -11,7 +26,7 @@
|
|
|
11
26
|
width: 100%;
|
|
12
27
|
height: 170%;
|
|
13
28
|
content: '';
|
|
14
|
-
}
|
|
29
|
+
} */
|
|
15
30
|
|
|
16
31
|
.header:not(.window .header) {
|
|
17
32
|
backdrop-filter: blur(10px);
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -7,6 +7,7 @@ import Head from 'fulldev-ui/components/Head.astro'
|
|
|
7
7
|
import Header from 'fulldev-ui/components/Header.astro'
|
|
8
8
|
import Sidebar from 'fulldev-ui/components/Sidebar.astro'
|
|
9
9
|
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
10
|
+
import NavigationButtons from '../components/docs/NavigationButtons.astro'
|
|
10
11
|
|
|
11
12
|
type Props = Partial<CollectionEntry<'pages'>> & {
|
|
12
13
|
class?: string
|
|
@@ -44,10 +45,7 @@ const h2Headings = headings.filter((heading: any) => heading.depth === 2)
|
|
|
44
45
|
},
|
|
45
46
|
]}
|
|
46
47
|
>
|
|
47
|
-
<Header
|
|
48
|
-
{logo}
|
|
49
|
-
{...header}
|
|
50
|
-
/>
|
|
48
|
+
<Header {...header} />
|
|
51
49
|
<div class="core">
|
|
52
50
|
<Sidebar {sidebar} />
|
|
53
51
|
<main data-pagefind-body>
|
|
@@ -57,6 +55,7 @@ const h2Headings = headings.filter((heading: any) => heading.depth === 2)
|
|
|
57
55
|
/>
|
|
58
56
|
<div class="blocks">
|
|
59
57
|
<slot />
|
|
58
|
+
<NavigationButtons {sidebar} />
|
|
60
59
|
</div>
|
|
61
60
|
</main>
|
|
62
61
|
</div>
|
|
@@ -87,78 +86,80 @@ const h2Headings = headings.filter((heading: any) => heading.depth === 2)
|
|
|
87
86
|
|
|
88
87
|
<Fragment set:html={data?.code?.body} />
|
|
89
88
|
<style lang="scss" is:global>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
@layer fulldev {
|
|
90
|
+
:root {
|
|
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
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
html,
|
|
103
|
+
body {
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
margin: 0;
|
|
106
|
+
background-color: var(--color-background);
|
|
107
|
+
padding: 0;
|
|
108
|
+
width: 100%;
|
|
109
|
+
min-height: 100vh;
|
|
110
|
+
color: var(--base-11);
|
|
111
|
+
color-scheme: var(--color-scheme);
|
|
112
|
+
font-size: var(--text-2);
|
|
113
|
+
font-family: var(--font-family);
|
|
114
|
+
}
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
body {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
@media (min-width: 1024px) {
|
|
121
|
+
&.has-sidebar .core {
|
|
122
|
+
--gutter-left: var(--space-6);
|
|
123
|
+
--sidebar-width: calc(var(--gutter) + 200px);
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
display: grid;
|
|
126
|
+
grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
|
|
127
|
+
}
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
&.has-toc main {
|
|
130
|
+
--gutter-right: var(--space-6);
|
|
131
|
+
--toc-width: calc(var(--gutter) + 200px);
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-columns: minmax(0, 1fr) var(--toc-width);
|
|
135
|
+
}
|
|
135
136
|
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.header {
|
|
139
|
-
width: 100%;
|
|
140
|
-
height: var(--header-height);
|
|
141
|
-
}
|
|
142
137
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
top: 0;
|
|
147
|
-
padding-left: var(--gutter);
|
|
138
|
+
.header {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: var(--header-height);
|
|
148
141
|
}
|
|
149
142
|
|
|
150
|
-
|
|
151
|
-
.
|
|
143
|
+
.core {
|
|
144
|
+
.sidebar {
|
|
152
145
|
position: sticky;
|
|
153
146
|
top: 0;
|
|
154
|
-
|
|
155
|
-
padding-right: var(--gutter);
|
|
147
|
+
padding-left: var(--gutter);
|
|
156
148
|
}
|
|
157
149
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
150
|
+
main {
|
|
151
|
+
.toc {
|
|
152
|
+
position: sticky;
|
|
153
|
+
top: 0;
|
|
154
|
+
order: 1;
|
|
155
|
+
padding-right: var(--gutter);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.blocks {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
width: 100%;
|
|
162
|
+
}
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
}
|
package/src/schemas/base.ts
CHANGED
|
@@ -32,7 +32,16 @@ export const base = z
|
|
|
32
32
|
html: z.string(),
|
|
33
33
|
image: z.string(),
|
|
34
34
|
images: z.string().array(),
|
|
35
|
-
rating: z.number()
|
|
35
|
+
rating: z.number().or(
|
|
36
|
+
z
|
|
37
|
+
.object({
|
|
38
|
+
value: z.number(),
|
|
39
|
+
label: z.string(),
|
|
40
|
+
avatars: z.string().array(),
|
|
41
|
+
avatar: z.string(),
|
|
42
|
+
})
|
|
43
|
+
.partial()
|
|
44
|
+
),
|
|
36
45
|
button: button,
|
|
37
46
|
buttons: button.array(),
|
|
38
47
|
link: link,
|