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.
- package/package.json +1 -1
- package/src/blocks/Banner1.astro +35 -0
- package/src/blocks/Contact1.astro +92 -0
- package/src/blocks/Cta1.astro +72 -0
- package/src/blocks/Feature1.astro +67 -0
- package/src/blocks/Footer.astro +47 -54
- package/src/blocks/Header1.astro +192 -0
- package/src/blocks/Hero1.astro +74 -0
- package/src/blocks/Intro1.astro +56 -0
- package/src/blocks/Products1.astro +90 -0
- package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
- package/src/components/Badge.astro +10 -18
- package/src/components/Banner.astro +26 -0
- package/src/components/Block.astro +49 -0
- package/src/components/Blocks.astro +26 -0
- package/src/components/Button.astro +10 -23
- package/src/components/Card.astro +8 -150
- package/src/components/Cart.astro +1 -0
- package/src/components/CartSummary.astro +3 -3
- package/src/components/Channel.astro +5 -14
- package/src/components/Container.astro +25 -0
- package/src/components/Drawer.astro +57 -118
- package/src/components/DrawerOld.astro +143 -0
- package/src/components/Element.astro +2 -0
- package/src/components/Form.astro +5 -3
- package/src/components/Head.astro +18 -32
- package/src/components/Header.astro +8 -105
- package/src/components/Heading.astro +29 -70
- package/src/components/Icon.astro +6 -4
- package/src/components/Link.astro +12 -18
- package/src/components/Logo.astro +31 -18
- package/src/components/Navigation.astro +39 -0
- package/src/components/Panel.astro +25 -0
- package/src/components/Paragraph.astro +24 -7
- package/src/components/Price.astro +4 -4
- package/src/components/Prose.astro +41 -132
- package/src/components/Rating.astro +24 -75
- package/src/components/Search.astro +4 -3
- package/src/components/Section.astro +20 -29
- package/src/components/Sidebar.astro +44 -64
- package/src/components/Social.astro +9 -2
- package/src/components/Tagline.astro +21 -31
- package/src/components/Toc.astro +12 -3
- package/src/components/_Author.astro +90 -0
- package/src/components/_Header.astro +129 -0
- package/src/components/_Prose copy.astro +172 -0
- package/src/components/_Sidebar copy.astro +87 -0
- package/src/content/categories/category.md +7 -0
- package/src/content/config.ts +7 -8
- package/src/content/docs/components/text.mdx +47 -0
- package/src/content/docs/components.mdx +1 -4
- package/src/content/docs/index.mdx +1 -4
- package/src/content/layouts/base.yml +41 -80
- package/src/content/layouts/docs.yml +2 -70
- package/src/content/pages/index.mdx +17 -25
- package/src/content/{categories/mugs.md → posts/post.md} +1 -1
- package/src/content/products/product.md +3 -3
- package/src/css/theme.css +2 -0
- package/src/images/favicon/android-chrome-192x192.png +0 -0
- package/src/images/favicon/android-chrome-512x512.png +0 -0
- package/src/images/favicon/apple-touch-icon.png +0 -0
- package/src/images/favicon/browserconfig.xml +9 -0
- package/src/images/favicon/favicon-16x16.png +0 -0
- package/src/images/favicon/favicon-32x32.png +0 -0
- package/src/images/favicon/favicon-48x48.png +0 -0
- package/src/images/favicon/favicon.ico +0 -0
- package/src/images/favicon/favicon.svg +16 -0
- package/src/images/favicon/manifest.webmanifest +30 -0
- package/src/images/favicon/mstile-150x150.png +0 -0
- package/src/images/favicon/safari-pinned-tab.svg +16 -0
- package/src/images/favicon/yandex-browser-50x50.png +0 -0
- package/src/images/favicon/yandex-browser-manifest.json +9 -0
- package/src/integration/index.ts +10 -1
- package/src/layouts/CategoryLayout.astro +16 -9
- package/src/layouts/DocLayout.astro +49 -7
- package/src/layouts/Layout.astro +55 -27
- package/src/layouts/PageLayout.astro +12 -5
- package/src/layouts/PostLayout.astro +7 -5
- package/src/layouts/ProductLayout.astro +12 -7
- package/src/pages/test.astro +7 -1
- package/src/schemas/blocks/banner.ts +10 -0
- package/src/schemas/blocks/categories.ts +14 -0
- package/src/schemas/blocks/contact.ts +18 -0
- package/src/schemas/blocks/cta.ts +18 -0
- package/src/schemas/blocks/feature.ts +18 -0
- package/src/schemas/blocks/hero.ts +20 -0
- package/src/schemas/blocks/intro.ts +16 -0
- package/src/schemas/blocks/products.ts +14 -0
- package/src/schemas/categorySchema.ts +8 -8
- package/src/schemas/components/avatar.ts +4 -1
- package/src/schemas/components/badge.ts +16 -11
- package/src/schemas/components/block.ts +18 -0
- package/src/schemas/components/button.ts +13 -19
- package/src/schemas/components/channel.ts +15 -9
- package/src/schemas/components/footer.ts +15 -14
- package/src/schemas/components/head.ts +17 -0
- package/src/schemas/components/header.ts +19 -16
- package/src/schemas/components/heading.ts +7 -1
- package/src/schemas/components/icon.ts +7 -1
- package/src/schemas/components/image.ts +17 -14
- package/src/schemas/components/link.ts +10 -16
- package/src/schemas/components/logo.ts +12 -2
- package/src/schemas/components/menu.ts +11 -13
- package/src/schemas/components/navigation.ts +10 -0
- package/src/schemas/components/paragraph.ts +9 -0
- package/src/schemas/components/price.ts +9 -0
- package/src/schemas/components/rating.ts +8 -13
- package/src/schemas/components/sidebar.ts +14 -12
- package/src/schemas/components/social.ts +16 -1
- package/src/schemas/components/tagline.ts +7 -1
- package/src/schemas/docSchema.ts +6 -2
- package/src/schemas/imageSchema.ts +30 -1
- package/src/schemas/layoutSchema.ts +14 -20
- package/src/schemas/pageSchema.ts +9 -12
- package/src/schemas/postSchema.ts +6 -8
- package/src/schemas/productSchema.ts +18 -18
- package/src/types/global-props.ts +0 -9
- package/src/types/{virtual-modules.d.ts → virtual.d.ts} +1 -1
- package/src/utils/getHref.ts +3 -2
- package/tsconfig.json +1 -3
- package/example.svelte +0 -0
- package/parent.svelte +0 -0
- package/src/App.svelte +0 -0
- package/src/blocks/Banner.astro +0 -35
- package/src/blocks/Categories.astro +0 -12
- package/src/blocks/Colleagues.astro +0 -12
- package/src/blocks/Contact.astro +0 -117
- package/src/blocks/Content.astro +0 -130
- package/src/blocks/Cta.astro +0 -13
- package/src/blocks/Excerpt.astro +0 -12
- package/src/blocks/Features.astro +0 -11
- package/src/blocks/Header.astro +0 -7
- package/src/blocks/Intro.astro +0 -101
- package/src/blocks/Jobs.astro +0 -12
- package/src/blocks/Posts.astro +0 -11
- package/src/blocks/Prices.astro +0 -24
- package/src/blocks/Product.astro +0 -89
- package/src/blocks/Products.astro +0 -101
- package/src/blocks/Reviews.astro +0 -12
- package/src/blocks/_Contact.astro +0 -112
- package/src/components/CartForm.astro +0 -120
- package/src/components/CartList.astro +0 -122
- package/src/components/Lead.astro +0 -46
- package/src/components/ProductCard.astro +0 -52
- package/src/components/Text.astro +0 -43
- package/src/components/Writeup.astro +0 -108
- package/src/components/_CartList backup.astro +0 -125
- package/src/components/_CartList copy.astro +0 -213
- package/src/components/_CartListSimple.astro +0 -148
- package/src/components/sections.astro +0 -28
- package/src/content/docs/components/lead.mdx +0 -49
- package/src/content/docs/components/paragraph.mdx +0 -49
- package/src/loaders/imageLoader.ts +0 -26
- package/src/schemas/archive/_pageSchema.ts +0 -94
- package/src/schemas/components/avatars.ts +0 -4
- package/src/schemas/components/banner.ts +0 -3
- package/src/schemas/components/buttons.ts +0 -4
- package/src/schemas/components/card.ts +0 -43
- package/src/schemas/components/cards.ts +0 -4
- package/src/schemas/components/channels.ts +0 -4
- package/src/schemas/components/global.ts +0 -16
- package/src/schemas/components/links.ts +0 -4
- package/src/schemas/components/list.ts +0 -3
- package/src/schemas/components/section.ts +0 -17
- package/src/schemas/components/sections.ts +0 -3
- package/src/schemas/components/socials.ts +0 -4
- package/src/schemas/components/subheader.ts +0 -10
- package/src/schemas/components/text.ts +0 -3
- package/src/schemas/components/themer.ts +0 -3
- package/src/schemas/components/toc.ts +0 -3
- package/src/schemas/components/writeup.ts +0 -20
- package/src/schemas/fields/categories.ts +0 -3
- package/src/schemas/fields/description.ts +0 -3
- package/src/schemas/fields/href.ts +0 -3
- package/src/schemas/fields/image.ts +0 -24
- package/src/schemas/fields/images.ts +0 -4
- package/src/schemas/fields/order.ts +0 -3
- package/src/schemas/fields/price.ts +0 -3
- package/src/schemas/fields/products.ts +0 -5
- package/src/schemas/fields/seo.ts +0 -12
- package/src/schemas/fields/soldout.ts +0 -3
- package/src/schemas/fields/title.ts +0 -3
- package/src/schemas/fields/variants.ts +0 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<!-- ---
|
|
2
|
+
import type { ComponentProps,HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Buttons from 'fulldev-ui/components/Buttons.astro'
|
|
4
|
+
import Cart from 'fulldev-ui/components/Cart.astro'
|
|
5
|
+
import Drawer from 'fulldev-ui/components/Drawer.astro'
|
|
6
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
7
|
+
import Links from 'fulldev-ui/components/Links.astro'
|
|
8
|
+
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
9
|
+
import Menu from 'fulldev-ui/components/Menu.astro'
|
|
10
|
+
import Socials from 'fulldev-ui/components/Socials.astro'
|
|
11
|
+
import Themer from 'fulldev-ui/components/Themer.astro'
|
|
12
|
+
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
13
|
+
import Search from './Search.astro'
|
|
14
|
+
|
|
15
|
+
interface Props extends GlobalProps, HTMLAttributes<'header'> {
|
|
16
|
+
logo?: ComponentProps<typeof Logo>
|
|
17
|
+
company?: ComponentProps<typeof Logo>['company']
|
|
18
|
+
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
19
|
+
links?: ComponentProps<typeof Links>['links']
|
|
20
|
+
menu?: ComponentProps<typeof Menu>['groups']
|
|
21
|
+
panel?: boolean | undefined
|
|
22
|
+
search?: boolean | undefined
|
|
23
|
+
open?: boolean | undefined
|
|
24
|
+
cart?: string | undefined
|
|
25
|
+
socials?: ComponentProps<typeof Socials>['socials']
|
|
26
|
+
themer?: boolean | undefined
|
|
27
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
size = 'sm',
|
|
32
|
+
open,
|
|
33
|
+
logo,
|
|
34
|
+
company,
|
|
35
|
+
buttons,
|
|
36
|
+
links,
|
|
37
|
+
search,
|
|
38
|
+
panel,
|
|
39
|
+
socials,
|
|
40
|
+
menu,
|
|
41
|
+
cart,
|
|
42
|
+
themer,
|
|
43
|
+
...rest
|
|
44
|
+
} = Astro.props
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
<Element
|
|
48
|
+
class:list="header"
|
|
49
|
+
as="header"
|
|
50
|
+
{size}
|
|
51
|
+
{open}
|
|
52
|
+
{...rest}
|
|
53
|
+
>
|
|
54
|
+
<Element class:list="header-container">
|
|
55
|
+
<Logo
|
|
56
|
+
{company}
|
|
57
|
+
{size}
|
|
58
|
+
{...typeof logo === 'string' ? { src: logo } : logo}
|
|
59
|
+
/>
|
|
60
|
+
<Links
|
|
61
|
+
class:list="header-links"
|
|
62
|
+
{size}
|
|
63
|
+
{links}
|
|
64
|
+
/>
|
|
65
|
+
<Socials
|
|
66
|
+
{size}
|
|
67
|
+
variant="ghost"
|
|
68
|
+
{socials}
|
|
69
|
+
/>
|
|
70
|
+
<Buttons
|
|
71
|
+
class:list="header-buttons"
|
|
72
|
+
{size}
|
|
73
|
+
{buttons}
|
|
74
|
+
>
|
|
75
|
+
<Search size="sm" />
|
|
76
|
+
<Themer
|
|
77
|
+
if={themer}
|
|
78
|
+
{size}
|
|
79
|
+
/>
|
|
80
|
+
<Cart
|
|
81
|
+
if={cart}
|
|
82
|
+
variant="secondary"
|
|
83
|
+
heading={cart}
|
|
84
|
+
{size}
|
|
85
|
+
/>
|
|
86
|
+
<Drawer
|
|
87
|
+
class:list={['header-button']}
|
|
88
|
+
icon="menu-2"
|
|
89
|
+
id="menu"
|
|
90
|
+
variant="secondary"
|
|
91
|
+
{logo}
|
|
92
|
+
{company}
|
|
93
|
+
{buttons}
|
|
94
|
+
{links}
|
|
95
|
+
{menu}
|
|
96
|
+
{size}
|
|
97
|
+
/>
|
|
98
|
+
</Buttons>
|
|
99
|
+
</Element>
|
|
100
|
+
</Element>
|
|
101
|
+
|
|
102
|
+
<style is:global>
|
|
103
|
+
@layer fulldev {
|
|
104
|
+
.header {
|
|
105
|
+
@apply sticky left-0 top-0 z-20 flex h-14 items-center overflow-hidden border-b bg-background;
|
|
106
|
+
|
|
107
|
+
.header-container {
|
|
108
|
+
@apply container flex w-full items-center justify-between gap-6;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&,
|
|
112
|
+
& ~ * {
|
|
113
|
+
--header-height: 3.5rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.header-links {
|
|
117
|
+
@apply mr-auto max-lg:hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.header-socials {
|
|
121
|
+
@apply ml-auto max-lg:hidden;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.menu-button {
|
|
125
|
+
@apply lg:hidden;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</style> -->
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import type { CollectionEntry } from 'astro:content'
|
|
4
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
5
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
6
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
7
|
+
import Image from 'fulldev-ui/components/Image.astro'
|
|
8
|
+
import {
|
|
9
|
+
default as Lead,
|
|
10
|
+
default as Paragraph,
|
|
11
|
+
} from 'fulldev-ui/components/Paragraph.astro'
|
|
12
|
+
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
13
|
+
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
14
|
+
import { crush } from 'radash'
|
|
15
|
+
import type Sidebar from './Sidebar.astro'
|
|
16
|
+
|
|
17
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
18
|
+
as?: HTMLTag | undefined
|
|
19
|
+
render?: any
|
|
20
|
+
sidebar?: ComponentProps<typeof Sidebar> | undefined
|
|
21
|
+
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
22
|
+
toc?: boolean | ComponentProps<typeof Toc>['heading'] | undefined
|
|
23
|
+
tagline?: ComponentProps<typeof Tagline>['text'] | undefined
|
|
24
|
+
heading?: ComponentProps<typeof Heading>['text'] | undefined
|
|
25
|
+
image?: ComponentProps<typeof Image> | undefined
|
|
26
|
+
lead?: ComponentProps<typeof Lead>['text'] | undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
toc = false,
|
|
31
|
+
slug,
|
|
32
|
+
sidebar,
|
|
33
|
+
render,
|
|
34
|
+
tagline,
|
|
35
|
+
heading,
|
|
36
|
+
lead,
|
|
37
|
+
image,
|
|
38
|
+
...rest
|
|
39
|
+
} = Astro.props
|
|
40
|
+
|
|
41
|
+
const Content = render && (await render())?.Content
|
|
42
|
+
|
|
43
|
+
const flatMenu = crush(sidebar?.menu ?? {})
|
|
44
|
+
const slugs = Object.entries(flatMenu)
|
|
45
|
+
.map(([key, value]) => (key.endsWith('.slug') ? value : null))
|
|
46
|
+
.filter(Boolean)
|
|
47
|
+
const slugIndex = slugs.findIndex((val) => val === slug)
|
|
48
|
+
|
|
49
|
+
const prevSlug = slugs[slugIndex - 1]
|
|
50
|
+
const nextSlug = slugs[slugIndex + 1]
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
<Element
|
|
54
|
+
class:list="prose"
|
|
55
|
+
{...rest}
|
|
56
|
+
>
|
|
57
|
+
<Element class:list="prose-container">
|
|
58
|
+
<Element class:list="prose-content">
|
|
59
|
+
<Tagline text={tagline} />
|
|
60
|
+
<Heading
|
|
61
|
+
as="h1"
|
|
62
|
+
level={2}
|
|
63
|
+
text={heading}
|
|
64
|
+
/>
|
|
65
|
+
<Paragraph text={lead} />
|
|
66
|
+
<Image {...image} />
|
|
67
|
+
{Content && <Content />}
|
|
68
|
+
<slot />
|
|
69
|
+
<Element class:list="prose-footer">
|
|
70
|
+
<Button
|
|
71
|
+
class:list="prose-prev"
|
|
72
|
+
icon={prevSlug && 'arrow-left'}
|
|
73
|
+
slug={prevSlug}
|
|
74
|
+
variant="secondary"
|
|
75
|
+
/>
|
|
76
|
+
<Button
|
|
77
|
+
class:list="prose-next"
|
|
78
|
+
icon={nextSlug && 'arrow-right'}
|
|
79
|
+
slug={nextSlug}
|
|
80
|
+
variant="secondary"
|
|
81
|
+
reverse
|
|
82
|
+
/>
|
|
83
|
+
</Element>
|
|
84
|
+
</Element>
|
|
85
|
+
<Toc
|
|
86
|
+
if={toc}
|
|
87
|
+
heading={typeof toc === 'string' ? toc : undefined}
|
|
88
|
+
{render}
|
|
89
|
+
/>
|
|
90
|
+
</Element>
|
|
91
|
+
</Element>
|
|
92
|
+
|
|
93
|
+
<style is:global>
|
|
94
|
+
@layer fulldev {
|
|
95
|
+
.prose {
|
|
96
|
+
@apply relative items-start py-28 first:pt-14;
|
|
97
|
+
|
|
98
|
+
.prose-container {
|
|
99
|
+
@apply container flex h-full w-full flex-grow items-start justify-evenly gap-14 gap-x-gutter;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.prose-content {
|
|
103
|
+
@apply w-full max-w-screen-md;
|
|
104
|
+
|
|
105
|
+
> * {
|
|
106
|
+
@apply mt-6 first:mt-0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
p {
|
|
110
|
+
@apply mt-4 first:mt-0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
code:not(.astro-code code) {
|
|
114
|
+
@apply rounded bg-muted px-1.5 py-0.5 font-mono text-sm font-medium;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
h1,
|
|
118
|
+
h2,
|
|
119
|
+
h3,
|
|
120
|
+
h4,
|
|
121
|
+
h5,
|
|
122
|
+
h6 {
|
|
123
|
+
@apply mt-8 scroll-m-20 font-semibold first:mt-0;
|
|
124
|
+
|
|
125
|
+
code {
|
|
126
|
+
font-size: inherit !important;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
> h1 {
|
|
131
|
+
@apply text-4xl font-extrabold;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
> h2 {
|
|
135
|
+
@apply text-2xl;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
> h3 {
|
|
139
|
+
@apply text-xl;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
> h4 {
|
|
143
|
+
@apply text-lg;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
> h5 {
|
|
147
|
+
@apply text-base;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
> h6 {
|
|
151
|
+
@apply text-sm;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
> aside {
|
|
155
|
+
@apply mt-6 rounded-md border border-destructive p-4 text-destructive first:mt-0;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.prose-footer {
|
|
160
|
+
@apply mt-14 flex items-center;
|
|
161
|
+
|
|
162
|
+
.prose-next {
|
|
163
|
+
@apply ml-auto;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.toc {
|
|
168
|
+
@apply order-last;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!-- ---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
import Links from 'fulldev-ui/components/Links.astro'
|
|
5
|
+
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
6
|
+
import Themer from 'fulldev-ui/components/Themer.astro'
|
|
7
|
+
import type { SidebarSchema } from 'fulldev-ui/schemas/components/sidebar'
|
|
8
|
+
import Heading from './Heading.astro'
|
|
9
|
+
|
|
10
|
+
interface Props extends HTMLAttributes<'aside'>, SidebarSchema {}
|
|
11
|
+
|
|
12
|
+
const { company, logo, menus, heading, themer, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<Element
|
|
16
|
+
class:list="sidebar"
|
|
17
|
+
as="aside"
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<Element
|
|
21
|
+
class:list="sidebar-header"
|
|
22
|
+
as="header"
|
|
23
|
+
>
|
|
24
|
+
<Logo
|
|
25
|
+
{company}
|
|
26
|
+
{...logo}
|
|
27
|
+
size="sm"
|
|
28
|
+
/>
|
|
29
|
+
<Heading
|
|
30
|
+
as="h5"
|
|
31
|
+
size="md"
|
|
32
|
+
text={heading}
|
|
33
|
+
/>
|
|
34
|
+
</Element>
|
|
35
|
+
<Element class:list="sidebar-content">
|
|
36
|
+
<Element
|
|
37
|
+
class:list="sidebar-nav"
|
|
38
|
+
as="nav"
|
|
39
|
+
>
|
|
40
|
+
{
|
|
41
|
+
menus?.map(({ heading, links }) => (
|
|
42
|
+
<Element class:list="sidebar-menu">
|
|
43
|
+
<Heading
|
|
44
|
+
text={heading}
|
|
45
|
+
size="sm"
|
|
46
|
+
as="h6"
|
|
47
|
+
/>
|
|
48
|
+
<Links
|
|
49
|
+
direction="column"
|
|
50
|
+
size="sm"
|
|
51
|
+
{links}
|
|
52
|
+
/>
|
|
53
|
+
</Element>
|
|
54
|
+
))
|
|
55
|
+
}
|
|
56
|
+
</Element>
|
|
57
|
+
<Themer if={themer} />
|
|
58
|
+
<slot />
|
|
59
|
+
</Element>
|
|
60
|
+
</Element>
|
|
61
|
+
|
|
62
|
+
<style is:global>
|
|
63
|
+
@layer fulldev {
|
|
64
|
+
.sidebar {
|
|
65
|
+
@apply sticky bottom-0 z-10 hidden h-full flex-col items-start justify-start border-r bg-background lg:flex;
|
|
66
|
+
|
|
67
|
+
--height: calc(var(--header-height, 0px) + var(--subheader-height, 0px));
|
|
68
|
+
top: var(--height);
|
|
69
|
+
width: var(--sidebar-width);
|
|
70
|
+
max-height: calc(100vh - var(--height));
|
|
71
|
+
|
|
72
|
+
&,
|
|
73
|
+
& ~ * {
|
|
74
|
+
--sidebar-width: 13rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.sidebar-header {
|
|
78
|
+
@apply sticky flex h-14 w-full items-center px-gutter py-6;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.sidebar-content {
|
|
82
|
+
@apply flex w-full flex-1 flex-col items-start gap-7 overflow-y-auto px-gutter pb-14 pt-6 first:pt-14;
|
|
83
|
+
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</style> -->
|
package/src/content/config.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineCollection } from 'astro:content'
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { productSchema } from 'fulldev-ui/schemas/productSchema'
|
|
2
|
+
import { categorySchema } from 'fulldev-ui/schemas/categorySchema.ts'
|
|
3
|
+
import { docSchema } from 'fulldev-ui/schemas/docSchema.ts'
|
|
4
|
+
import { imageLoader, imageSchema } from 'fulldev-ui/schemas/imageSchema.ts'
|
|
5
|
+
import { layoutSchema } from 'fulldev-ui/schemas/layoutSchema.ts'
|
|
6
|
+
import { pageSchema } from 'fulldev-ui/schemas/pageSchema.ts'
|
|
7
|
+
import { postSchema } from 'fulldev-ui/schemas/postSchema.ts'
|
|
8
|
+
import { productSchema } from 'fulldev-ui/schemas/productSchema.ts'
|
|
10
9
|
|
|
11
10
|
export const collections = {
|
|
12
11
|
pages: defineCollection({
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Text
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Text
|
|
6
|
+
|
|
7
|
+
import PropsTable from 'fulldev-ui/components/docs/PropsTable.astro'
|
|
8
|
+
|
|
9
|
+
```astro live
|
|
10
|
+
---
|
|
11
|
+
import Text from 'fulldev-ui/components/Text.astro'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Text>The quick brown fox jumps over the lazy dog</Text>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
<PropsTable />
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### `size`
|
|
24
|
+
|
|
25
|
+
```astro live
|
|
26
|
+
---
|
|
27
|
+
import Text from 'fulldev-ui/components/Text.astro'
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<Text size="sm"
|
|
31
|
+
>The quick brown fox jumps over the lazy dog because he is quick
|
|
32
|
+
</Text>
|
|
33
|
+
<Text> The quick brown fox jumps over the lazy dog because he is quick </Text>
|
|
34
|
+
<Text size="lg">
|
|
35
|
+
The quick brown fox jumps over the lazy dog because he is quick
|
|
36
|
+
</Text>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### `text`
|
|
40
|
+
|
|
41
|
+
```astro live
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
<Text text="The quick brown fox jumps over the lazy dog" />
|
|
47
|
+
```
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Components
|
|
3
|
+
description: Features shared across components.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
# Components
|
|
6
|
-
|
|
7
|
-
Features shared across components.
|
|
8
|
-
|
|
9
6
|
## Slots versus props
|
|
10
7
|
|
|
11
8
|
You can use either slots or props. Props are recommended as they are type safe and work better in combination with content collections.
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Introduction
|
|
3
|
+
description: Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation.
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
# Introduction
|
|
6
|
-
|
|
7
|
-
Everything you need to rapidly build content-driven websites. Components, blocks, layouts and complete page generation.
|
|
8
|
-
|
|
9
6
|
## Why we built it
|
|
10
7
|
|
|
11
8
|
After repeatedly encountering the same challenges in [our company's](https://full.dev) client projects, we decided to build this library. After successfully using it in production websites, we decided to open-source it to help others facing similar problems.
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
seo:
|
|
1
|
+
head:
|
|
2
|
+
title: Fulldev UI - Astro component and block library, open-source
|
|
4
3
|
image: /images/og-image.png
|
|
5
|
-
|
|
6
|
-
code:
|
|
7
|
-
head: |
|
|
4
|
+
theme: system
|
|
5
|
+
code: |
|
|
8
6
|
<script is:inline>
|
|
9
7
|
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
|
10
8
|
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
|
|
11
9
|
})
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
banner:
|
|
13
|
+
text: 'Introducing v0.6: layouts & pagebuilding 🎉'
|
|
14
|
+
|
|
15
|
+
navigation:
|
|
16
16
|
header: true
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
themer: true
|
|
18
|
+
search: true
|
|
19
|
+
logo:
|
|
20
|
+
text: Fulldev UI
|
|
19
21
|
links:
|
|
20
22
|
- text: Docs
|
|
21
23
|
href: /docs/
|
|
@@ -25,77 +27,36 @@ header:
|
|
|
25
27
|
href: /docs/blocks/banner/
|
|
26
28
|
- text: Showcase
|
|
27
29
|
href: /showcase/
|
|
28
|
-
|
|
29
30
|
socials:
|
|
30
31
|
- https://github.com/fulldotdev/ui
|
|
31
32
|
- https://discord.gg/vXZqMbadm8
|
|
33
|
+
menus:
|
|
34
|
+
- heading: Get Started
|
|
35
|
+
links:
|
|
36
|
+
- text: Introduction
|
|
37
|
+
href: /docs/
|
|
38
|
+
- text: Installation
|
|
39
|
+
href: /docs/installation/
|
|
40
|
+
- text: Customization
|
|
41
|
+
href: /docs/customization/
|
|
42
|
+
- text: Frameworks
|
|
43
|
+
href: /docs/frameworks/
|
|
44
|
+
- text: Components
|
|
45
|
+
href: /docs/components/
|
|
46
|
+
- text: Collections
|
|
47
|
+
href: /docs/collections/
|
|
32
48
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
# - heading: Components
|
|
48
|
-
# links:
|
|
49
|
-
# - docs/components/avatar
|
|
50
|
-
# - docs/components/badge
|
|
51
|
-
# - docs/components/badges
|
|
52
|
-
# - docs/components/button
|
|
53
|
-
# - docs/components/buttons
|
|
54
|
-
# # - docs/components/card
|
|
55
|
-
# # - docs/components/cards
|
|
56
|
-
# # - docs/components/cart
|
|
57
|
-
# # - docs/components/cart-form
|
|
58
|
-
# # - docs/components/cart-list
|
|
59
|
-
# # - docs/components/cart-summary
|
|
60
|
-
# - docs/components/channel
|
|
61
|
-
# - docs/components/channels
|
|
62
|
-
# - docs/components/checkbox
|
|
63
|
-
# - docs/components/code
|
|
64
|
-
# # - docs/components/dialog
|
|
65
|
-
# # - docs/components/drawer
|
|
66
|
-
# # - docs/components/element
|
|
67
|
-
# # - docs/components/footer
|
|
68
|
-
# # - docs/components/form
|
|
69
|
-
# # - docs/components/head
|
|
70
|
-
# # - docs/components/header
|
|
71
|
-
# - docs/components/heading
|
|
72
|
-
# - docs/components/icon
|
|
73
|
-
# - docs/components/image
|
|
74
|
-
# - docs/components/input
|
|
75
|
-
# - docs/components/label
|
|
76
|
-
# - docs/components/lead
|
|
77
|
-
# - docs/components/link
|
|
78
|
-
# - docs/components/links
|
|
79
|
-
# - docs/components/list
|
|
80
|
-
# # - docs/components/locale-switcher
|
|
81
|
-
# - docs/components/logo
|
|
82
|
-
# - docs/components/menu
|
|
83
|
-
# - docs/components/paragraph
|
|
84
|
-
# # - docs/components/price
|
|
85
|
-
# - docs/components/prose
|
|
86
|
-
# - docs/components/rating
|
|
87
|
-
# # - docs/components/search
|
|
88
|
-
# # - docs/components/section
|
|
89
|
-
# # - docs/components/sections
|
|
90
|
-
# - docs/components/select
|
|
91
|
-
# # - docs/components/sidebar
|
|
92
|
-
# - docs/components/social
|
|
93
|
-
# - docs/components/socials
|
|
94
|
-
# - docs/components/switch
|
|
95
|
-
# # - docs/components/table
|
|
96
|
-
# - docs/components/tagline
|
|
97
|
-
# # - docs/components/text
|
|
98
|
-
# - docs/components/textarea
|
|
99
|
-
# - docs/components/themer
|
|
100
|
-
# # - docs/components/toc
|
|
101
|
-
# # - docs/components/writeup
|
|
49
|
+
footer:
|
|
50
|
+
logo:
|
|
51
|
+
text: Fulldev UI
|
|
52
|
+
menus:
|
|
53
|
+
- heading: Docs
|
|
54
|
+
links:
|
|
55
|
+
- text: Docs
|
|
56
|
+
href: /docs/
|
|
57
|
+
- text: Components
|
|
58
|
+
href: /docs/components/badge/
|
|
59
|
+
- text: Blocks
|
|
60
|
+
href: /docs/blocks/banner/
|
|
61
|
+
- text: Showcase
|
|
62
|
+
href: /showcase/
|