fulldev-ui 0.6.0-beta.2 → 0.6.0-beta.6
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/astro.config.ts +1 -7
- package/cloudcannon.config.yml +269 -0
- package/package.json +1 -1
- package/src/blocks/Banner.astro +13 -15
- package/src/blocks/Colleagues1.astro +73 -0
- package/src/blocks/Contact1.astro +100 -0
- package/src/blocks/Content1.astro +79 -0
- package/src/blocks/Content2.astro +94 -0
- package/src/blocks/Content3.astro +70 -0
- package/src/blocks/Content4.astro +75 -0
- package/src/blocks/Cta1.astro +73 -0
- package/src/blocks/Feature1.astro +61 -0
- package/src/blocks/Features1.astro +66 -0
- package/src/blocks/Footer.astro +36 -68
- package/src/blocks/Header.astro +150 -3
- package/src/blocks/Hero1.astro +74 -0
- package/src/blocks/Intro1.astro +70 -0
- package/src/blocks/Jobs1.astro +73 -0
- package/src/blocks/Logos1.astro +55 -0
- package/src/blocks/Products1.astro +90 -0
- package/src/blocks/Reviews1.astro +79 -0
- package/src/blocks/{Hero.astro → _Hero.astro} +7 -6
- package/src/components/Badge.astro +10 -18
- package/src/components/Badges.astro +12 -35
- package/src/components/Block.astro +30 -0
- package/src/components/Blocks.astro +26 -0
- package/src/components/Button.astro +11 -25
- package/src/components/Buttons.astro +12 -43
- package/src/components/Card.astro +8 -150
- package/src/components/Cart.astro +6 -11
- 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 +55 -117
- package/src/components/DrawerOld.astro +143 -0
- package/src/components/Element.astro +2 -0
- package/src/components/Form.astro +3 -1
- package/src/components/Grid.astro +39 -0
- package/src/components/Group.astro +25 -0
- package/src/components/Head.astro +18 -32
- package/src/components/Header.astro +8 -105
- package/src/components/Heading.astro +34 -71
- package/src/components/Icon.astro +5 -4
- package/src/components/Image.astro +15 -50
- package/src/components/Layout.astro +35 -0
- package/src/components/Link.astro +12 -18
- package/src/components/Links.astro +14 -35
- package/src/components/Logo.astro +26 -15
- package/src/components/Masonry.astro +42 -0
- package/src/components/Menu.astro +17 -38
- package/src/components/Menus.astro +20 -0
- 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 +47 -130
- package/src/components/Rating.astro +24 -75
- package/src/components/Search.astro +5 -4
- package/src/components/Section.astro +20 -29
- package/src/components/Sidebar.astro +18 -69
- package/src/components/Social.astro +9 -2
- package/src/components/Stack.astro +25 -0
- package/src/components/Tagline.astro +21 -31
- package/src/components/Toc.astro +22 -21
- package/src/components/Writeup.astro +33 -82
- package/src/components/_Author.astro +90 -0
- package/src/components/_Header.astro +129 -0
- package/src/components/_Image.astro +79 -0
- package/src/components/_Prose copy.astro +172 -0
- package/src/components/_Sidebar copy.astro +87 -0
- package/src/content/config.ts +2 -29
- package/src/content/layouts/base.yml +42 -80
- package/src/content/pages/categories/category.md +7 -0
- package/src/content/{docs → pages/docs}/_internationalization.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/_using-presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/blocks.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/images.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections/presets.mdx +1 -0
- package/src/content/{docs → pages/docs}/collections.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_card.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_dialog.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_drawer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_localeswitcher.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_tagline.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/_toggle.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/avatar.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badge.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/badges.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/button.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/buttons.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channel.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/channels.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/checkbox.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/code.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/heading.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/icon.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/image.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/input.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/label.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/link.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/links.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/list.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/logo.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/menu.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/prose.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/rating.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/section.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/select.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/social.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/socials.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/switch.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/table.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/tagline.mdx +1 -0
- package/src/content/pages/docs/components/text.mdx +48 -0
- package/src/content/{docs → pages/docs}/components/textarea.mdx +1 -0
- package/src/content/{docs → pages/docs}/components/themer.mdx +1 -0
- package/src/content/{docs → pages/docs}/components.mdx +2 -4
- package/src/content/{docs → pages/docs}/customization.mdx +1 -0
- package/src/content/{docs → pages/docs}/frameworks.mdx +1 -0
- package/src/content/{docs → pages/docs}/generating-pages.mdx +1 -0
- package/src/content/{docs → pages/docs}/index.mdx +2 -4
- package/src/content/{docs → pages/docs}/installation.mdx +1 -0
- package/src/content/{docs → pages/docs}/layouts.mdx +1 -0
- package/src/content/pages/index.mdx +20 -28
- package/src/content/{categories/mugs.md → pages/posts/post.md} +1 -1
- package/src/content/{products → pages/products}/product.md +4 -4
- 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 +48 -17
- package/src/layouts/{CategoryLayout.astro → Category.astro} +21 -15
- package/src/layouts/Doc.astro +70 -0
- package/src/layouts/Job.astro +62 -0
- package/src/layouts/Jobs.astro +72 -0
- package/src/layouts/Page.astro +29 -0
- package/src/layouts/Post.astro +52 -0
- package/src/layouts/{ProductLayout.astro → Product.astro} +25 -11
- package/src/pages/[...page].astro +36 -4
- package/src/pages/test.astro +32 -2
- package/src/schemas/components/avatar.ts +4 -1
- package/src/schemas/components/badge.ts +16 -11
- package/src/schemas/components/block.ts +61 -0
- package/src/schemas/components/button.ts +14 -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 +38 -21
- package/src/schemas/components/link.ts +10 -16
- package/src/schemas/components/logo.ts +12 -2
- package/src/schemas/components/menu.ts +12 -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/imageSchema.ts +33 -4
- package/src/schemas/page.ts +40 -0
- 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 +4 -20
- package/tailwind.config.ts +4 -0
- package/tsconfig.json +1 -3
- package/example.svelte +0 -0
- package/parent.svelte +0 -0
- package/src/App.svelte +0 -0
- 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/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/_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/content/layouts/docs.yml +0 -70
- package/src/layouts/DocLayout.astro +0 -17
- package/src/layouts/Layout.astro +0 -79
- package/src/layouts/PageLayout.astro +0 -20
- package/src/layouts/PostLayout.astro +0 -20
- package/src/loaders/imageLoader.ts +0 -26
- package/src/pages/[...category].astro +0 -17
- package/src/pages/[...doc].astro +0 -17
- package/src/pages/[...post].astro +0 -17
- package/src/pages/[...product].astro +0 -17
- package/src/schemas/archive/_pageSchema.ts +0 -94
- package/src/schemas/categorySchema.ts +0 -16
- 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/docSchema.ts +0 -10
- 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
- package/src/schemas/layoutSchema.ts +0 -28
- package/src/schemas/pageSchema.ts +0 -20
- package/src/schemas/postSchema.ts +0 -16
- package/src/schemas/productSchema.ts +0 -22
|
@@ -1,168 +1,85 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import type { CollectionEntry } from 'astro:content'
|
|
4
|
-
import Button from 'fulldev-ui/components/Button.astro'
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
5
3
|
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 Lead from 'fulldev-ui/components/Lead.astro'
|
|
9
|
-
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
10
|
-
import Toc from 'fulldev-ui/components/Toc.astro'
|
|
11
|
-
import { crush } from 'radash'
|
|
12
|
-
import type Sidebar from './Sidebar.astro'
|
|
13
4
|
|
|
14
5
|
interface Props extends HTMLAttributes<'div'> {
|
|
15
|
-
as?: HTMLTag
|
|
16
|
-
render?: any
|
|
17
|
-
sidebar?: ComponentProps<typeof Sidebar> | undefined
|
|
18
|
-
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
19
|
-
toc?: boolean | ComponentProps<typeof Toc>['heading'] | undefined
|
|
20
|
-
tagline?: ComponentProps<typeof Tagline>['text'] | undefined
|
|
21
|
-
heading?: ComponentProps<typeof Heading>['text'] | undefined
|
|
22
|
-
image?: ComponentProps<typeof Image> | undefined
|
|
23
|
-
lead?: ComponentProps<typeof Lead>['text'] | undefined
|
|
6
|
+
as?: HTMLTag
|
|
24
7
|
}
|
|
25
8
|
|
|
26
|
-
const {
|
|
27
|
-
toc = false,
|
|
28
|
-
slug,
|
|
29
|
-
sidebar,
|
|
30
|
-
render,
|
|
31
|
-
tagline,
|
|
32
|
-
heading,
|
|
33
|
-
lead,
|
|
34
|
-
image,
|
|
35
|
-
...rest
|
|
36
|
-
} = Astro.props
|
|
37
|
-
|
|
38
|
-
const Content = render && (await render())?.Content
|
|
39
|
-
|
|
40
|
-
const flatMenu = crush(sidebar?.menu ?? {})
|
|
41
|
-
const slugs = Object.entries(flatMenu)
|
|
42
|
-
.map(([key, value]) => (key.endsWith('.slug') ? value : null))
|
|
43
|
-
.filter(Boolean)
|
|
44
|
-
const slugIndex = slugs.findIndex((val) => val === slug)
|
|
45
|
-
|
|
46
|
-
const prevSlug = slugs[slugIndex - 1]
|
|
47
|
-
const nextSlug = slugs[slugIndex + 1]
|
|
9
|
+
const { ...rest } = Astro.props
|
|
48
10
|
---
|
|
49
11
|
|
|
50
12
|
<Element
|
|
51
13
|
class:list="prose"
|
|
52
14
|
{...rest}
|
|
53
15
|
>
|
|
54
|
-
<
|
|
55
|
-
<Element class:list="prose-content">
|
|
56
|
-
<Tagline text={tagline} />
|
|
57
|
-
<Heading
|
|
58
|
-
as="h1"
|
|
59
|
-
level={2}
|
|
60
|
-
text={heading}
|
|
61
|
-
/>
|
|
62
|
-
<Lead text={lead} />
|
|
63
|
-
<Image {...image} />
|
|
64
|
-
{Content && <Content />}
|
|
65
|
-
<slot />
|
|
66
|
-
<Element class:list="prose-footer">
|
|
67
|
-
<Button
|
|
68
|
-
class:list="prose-prev"
|
|
69
|
-
icon={prevSlug && 'arrow-left'}
|
|
70
|
-
slug={prevSlug}
|
|
71
|
-
variant="secondary"
|
|
72
|
-
/>
|
|
73
|
-
<Button
|
|
74
|
-
class:list="prose-next"
|
|
75
|
-
icon={nextSlug && 'arrow-right'}
|
|
76
|
-
slug={nextSlug}
|
|
77
|
-
variant="secondary"
|
|
78
|
-
reverse
|
|
79
|
-
/>
|
|
80
|
-
</Element>
|
|
81
|
-
</Element>
|
|
82
|
-
<Toc
|
|
83
|
-
if={toc}
|
|
84
|
-
heading={typeof toc === 'string' ? toc : undefined}
|
|
85
|
-
{render}
|
|
86
|
-
/>
|
|
87
|
-
</Element>
|
|
16
|
+
<slot />
|
|
88
17
|
</Element>
|
|
89
18
|
|
|
90
19
|
<style is:global>
|
|
91
20
|
@layer fulldev {
|
|
92
21
|
.prose {
|
|
93
|
-
@apply relative
|
|
22
|
+
@apply relative w-full max-w-screen-md;
|
|
94
23
|
|
|
95
|
-
|
|
96
|
-
@apply
|
|
24
|
+
> * {
|
|
25
|
+
@apply mt-6;
|
|
97
26
|
}
|
|
98
27
|
|
|
99
|
-
|
|
100
|
-
@apply
|
|
101
|
-
|
|
102
|
-
> * {
|
|
103
|
-
@apply mt-6 first:mt-0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
p {
|
|
107
|
-
@apply mt-4 first:mt-0;
|
|
108
|
-
}
|
|
28
|
+
p {
|
|
29
|
+
@apply mt-4;
|
|
30
|
+
}
|
|
109
31
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
32
|
+
code:not(.astro-code code) {
|
|
33
|
+
@apply rounded bg-muted px-1.5 py-0.5 font-mono text-sm font-medium;
|
|
34
|
+
}
|
|
113
35
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
code {
|
|
123
|
-
font-size: inherit !important;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
36
|
+
h1,
|
|
37
|
+
h2,
|
|
38
|
+
h3,
|
|
39
|
+
h4,
|
|
40
|
+
h5,
|
|
41
|
+
h6 {
|
|
42
|
+
@apply scroll-m-20 font-bold;
|
|
126
43
|
|
|
127
|
-
|
|
128
|
-
|
|
44
|
+
code {
|
|
45
|
+
font-size: inherit !important;
|
|
129
46
|
}
|
|
47
|
+
}
|
|
130
48
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
49
|
+
> h1 {
|
|
50
|
+
@apply text-4xl;
|
|
51
|
+
}
|
|
134
52
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
53
|
+
> h2 {
|
|
54
|
+
@apply mt-10 text-2xl;
|
|
55
|
+
}
|
|
138
56
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
57
|
+
> h3 {
|
|
58
|
+
@apply mt-8 text-xl;
|
|
59
|
+
}
|
|
142
60
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
61
|
+
> h4 {
|
|
62
|
+
@apply text-lg;
|
|
63
|
+
}
|
|
146
64
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
65
|
+
> h5 {
|
|
66
|
+
@apply text-base;
|
|
67
|
+
}
|
|
150
68
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
69
|
+
> h6 {
|
|
70
|
+
@apply text-sm;
|
|
154
71
|
}
|
|
155
72
|
|
|
156
|
-
|
|
157
|
-
@apply
|
|
73
|
+
> aside {
|
|
74
|
+
@apply rounded-md border border-destructive p-4 text-destructive;
|
|
75
|
+
}
|
|
158
76
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
77
|
+
img {
|
|
78
|
+
@apply my-12 rounded-lg;
|
|
162
79
|
}
|
|
163
80
|
|
|
164
|
-
|
|
165
|
-
@apply
|
|
81
|
+
> *:first-child {
|
|
82
|
+
@apply mt-0;
|
|
166
83
|
}
|
|
167
84
|
}
|
|
168
85
|
}
|
|
@@ -2,30 +2,15 @@
|
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
4
|
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
5
|
-
import type {
|
|
6
|
-
import Avatars from './Avatars.astro'
|
|
5
|
+
import type { RatingSchema } from 'fulldev-ui/schemas/components/rating'
|
|
7
6
|
|
|
8
|
-
interface Props extends
|
|
9
|
-
align?: 'start' | 'center' | 'end' | undefined
|
|
10
|
-
value?: number | undefined
|
|
11
|
-
text?: string | undefined
|
|
12
|
-
avatars?: any
|
|
13
|
-
avatar?: any
|
|
14
|
-
}
|
|
7
|
+
interface Props extends HTMLAttributes<'div'>, RatingSchema {}
|
|
15
8
|
|
|
16
|
-
const {
|
|
17
|
-
size = 'md',
|
|
18
|
-
value,
|
|
19
|
-
text,
|
|
20
|
-
avatars,
|
|
21
|
-
avatar,
|
|
22
|
-
align,
|
|
23
|
-
...rest
|
|
24
|
-
} = Astro.props
|
|
9
|
+
const { size = 'md', score, ...rest } = Astro.props
|
|
25
10
|
|
|
26
11
|
const getIcon = (count: number) => {
|
|
27
|
-
if (!
|
|
28
|
-
const difference =
|
|
12
|
+
if (!score) return
|
|
13
|
+
const difference = score - count
|
|
29
14
|
if (difference >= -0.25) return 'star-filled'
|
|
30
15
|
if (difference >= -0.75) return 'star-half-filled'
|
|
31
16
|
return 'star'
|
|
@@ -34,71 +19,35 @@ const getIcon = (count: number) => {
|
|
|
34
19
|
|
|
35
20
|
<Element
|
|
36
21
|
class:list="rating"
|
|
37
|
-
{size}
|
|
38
22
|
{...rest}
|
|
39
23
|
>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
{
|
|
51
|
-
value &&
|
|
52
|
-
[1, 2, 3, 4, 5].map((_, i) => (
|
|
53
|
-
<Icon
|
|
54
|
-
{size}
|
|
55
|
-
name={getIcon(i + 1)}
|
|
56
|
-
class:list={'rating-icon-solid'}
|
|
57
|
-
/>
|
|
58
|
-
))
|
|
59
|
-
}
|
|
60
|
-
</Element>
|
|
61
|
-
<Fragment set:html={text} />
|
|
62
|
-
<slot />
|
|
63
|
-
</Element>
|
|
24
|
+
{
|
|
25
|
+
score &&
|
|
26
|
+
[1, 2, 3, 4, 5].map((count) => (
|
|
27
|
+
<Icon
|
|
28
|
+
name={getIcon(count)}
|
|
29
|
+
{size}
|
|
30
|
+
/>
|
|
31
|
+
))
|
|
32
|
+
}
|
|
64
33
|
</Element>
|
|
65
34
|
|
|
66
35
|
<style is:global>
|
|
67
36
|
@layer fulldev {
|
|
68
37
|
.rating {
|
|
69
|
-
@apply flex
|
|
70
|
-
|
|
71
|
-
.rating-content {
|
|
72
|
-
@apply flex flex-col gap-1 text-muted-foreground;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.rating-stars {
|
|
76
|
-
@apply flex gap-1 text-primary;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&.size-sm {
|
|
80
|
-
@apply gap-2;
|
|
81
|
-
|
|
82
|
-
.rating-content {
|
|
83
|
-
@apply text-xs leading-none;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.size-md {
|
|
88
|
-
@apply gap-2.5;
|
|
38
|
+
@apply flex gap-1 text-primary;
|
|
39
|
+
}
|
|
89
40
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
41
|
+
&.size-sm {
|
|
42
|
+
@apply text-xs;
|
|
43
|
+
}
|
|
94
44
|
|
|
95
|
-
|
|
96
|
-
|
|
45
|
+
&.size-md {
|
|
46
|
+
@apply text-sm;
|
|
47
|
+
}
|
|
97
48
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
}
|
|
49
|
+
&.size-lg {
|
|
50
|
+
@apply text-base;
|
|
102
51
|
}
|
|
103
52
|
}
|
|
104
53
|
</style>
|
|
@@ -40,7 +40,7 @@ const entries = [...pages, ...categories, ...products, ...posts, ...docs]
|
|
|
40
40
|
|
|
41
41
|
<Button
|
|
42
42
|
class:list="search-button"
|
|
43
|
-
variant=
|
|
43
|
+
variant={Astro.props.variant}
|
|
44
44
|
size="sm"
|
|
45
45
|
icon="search"
|
|
46
46
|
onclick={`document.getElementById('search').showModal()`}
|
|
@@ -55,20 +55,21 @@ const entries = [...pages, ...categories, ...products, ...posts, ...docs]
|
|
|
55
55
|
<Element class:list="search-content">
|
|
56
56
|
<Input
|
|
57
57
|
class:list="search-input"
|
|
58
|
-
icon="search"
|
|
59
58
|
placeholder="Search"
|
|
59
|
+
icon="search"
|
|
60
60
|
/>
|
|
61
61
|
<Element class:list="search-list">
|
|
62
62
|
{
|
|
63
63
|
entries.map(({ collection, slug, data }) => (
|
|
64
64
|
<Element
|
|
65
65
|
as="a"
|
|
66
|
-
href={getHref(
|
|
66
|
+
href={getHref(slug)}
|
|
67
67
|
class="search-item hide"
|
|
68
68
|
>
|
|
69
69
|
<Heading
|
|
70
70
|
text={data.title}
|
|
71
|
-
|
|
71
|
+
as="h6"
|
|
72
|
+
size="md"
|
|
72
73
|
/>
|
|
73
74
|
<Paragraph
|
|
74
75
|
set:text={'description' in data ? data.description : undefined}
|
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
3
4
|
|
|
4
|
-
interface Props {
|
|
5
|
-
|
|
6
|
-
[key: string]: any
|
|
5
|
+
interface Props extends HTMLAttributes<'section'> {
|
|
6
|
+
as?: HTMLTag
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
products = products && (await getEntries(products))
|
|
12
|
-
categories = categories && (await getEntries(categories))
|
|
13
|
-
|
|
14
|
-
const allComponents = {
|
|
15
|
-
...import.meta.glob('/src/**/*.astro'),
|
|
16
|
-
...import.meta.glob('../../**/*.astro'),
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const componentPath = Object.keys(allComponents).find(
|
|
20
|
-
(path) => path.split('/').pop()?.split('.')[0] === component
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
const Component =
|
|
24
|
-
componentPath && (await (allComponents[componentPath] as any)()).default
|
|
9
|
+
const { as = 'section', ...rest } = Astro.props
|
|
25
10
|
---
|
|
26
11
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
<Element
|
|
13
|
+
class:list="section"
|
|
14
|
+
{as}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</Element>
|
|
19
|
+
|
|
20
|
+
<style is:global>
|
|
21
|
+
@layer fulldev {
|
|
22
|
+
.section {
|
|
23
|
+
@apply relative w-full bg-background py-20 first:pt-20 lg:py-32;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -1,93 +1,42 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import Themer from 'fulldev-ui/components/Themer.astro'
|
|
7
|
-
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
8
|
-
import Heading from './Heading.astro'
|
|
9
|
-
import Toc from './Toc.astro'
|
|
4
|
+
import type { SidebarSchema } from 'fulldev-ui/schemas/components/sidebar'
|
|
5
|
+
import Menus from './Menus.astro'
|
|
10
6
|
|
|
11
|
-
interface Props extends
|
|
12
|
-
menu?: ComponentProps<typeof Menu>['groups']
|
|
13
|
-
heading?: ComponentProps<typeof Heading>['text']
|
|
14
|
-
render?: ComponentProps<typeof Toc>['render']
|
|
15
|
-
logo?: ComponentProps<typeof Logo>
|
|
16
|
-
toc?: ComponentProps<typeof Toc>['heading']
|
|
17
|
-
company?: ComponentProps<typeof Logo>['company']
|
|
18
|
-
themer?: boolean | undefined
|
|
19
|
-
size?: 'sm' | 'md' | 'lg' | undefined
|
|
20
|
-
}
|
|
7
|
+
interface Props extends HTMLAttributes<'aside'>, SidebarSchema {}
|
|
21
8
|
|
|
22
|
-
const {
|
|
23
|
-
size = 'sm',
|
|
24
|
-
logo,
|
|
25
|
-
company,
|
|
26
|
-
render,
|
|
27
|
-
menu,
|
|
28
|
-
toc,
|
|
29
|
-
heading,
|
|
30
|
-
themer,
|
|
31
|
-
...rest
|
|
32
|
-
} = Astro.props
|
|
9
|
+
const { menus, ...rest } = Astro.props
|
|
33
10
|
---
|
|
34
11
|
|
|
35
12
|
<Element
|
|
36
13
|
class:list="sidebar"
|
|
37
14
|
as="aside"
|
|
38
|
-
{size}
|
|
39
15
|
{...rest}
|
|
40
16
|
>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{company}
|
|
47
|
-
{size}
|
|
48
|
-
{...logo}
|
|
49
|
-
/>
|
|
50
|
-
<Heading
|
|
51
|
-
level={4}
|
|
52
|
-
text={heading}
|
|
53
|
-
/>
|
|
54
|
-
<slot name="header" />
|
|
55
|
-
</Element>
|
|
56
|
-
<Element class:list="sidebar-content">
|
|
57
|
-
<Menu
|
|
58
|
-
groups={menu}
|
|
59
|
-
{size}
|
|
60
|
-
/>
|
|
61
|
-
<Themer
|
|
62
|
-
if={themer}
|
|
63
|
-
{size}
|
|
64
|
-
/>
|
|
65
|
-
<slot />
|
|
66
|
-
</Element>
|
|
17
|
+
<Menus
|
|
18
|
+
size="sm"
|
|
19
|
+
menu={rest}
|
|
20
|
+
{menus}
|
|
21
|
+
/>
|
|
67
22
|
</Element>
|
|
68
23
|
|
|
69
24
|
<style is:global>
|
|
70
25
|
@layer fulldev {
|
|
71
26
|
.sidebar {
|
|
72
|
-
@apply sticky bottom-0
|
|
27
|
+
@apply sticky bottom-0 left-0 hidden h-full max-w-[75vw] flex-col items-start gap-8 overflow-y-auto border-r bg-background py-8 pr-8 lg:flex;
|
|
28
|
+
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
73
29
|
|
|
74
|
-
--
|
|
75
|
-
top: var(--
|
|
30
|
+
--headers: calc(var(--header-height, 0px) + var(--subheader-height, 0px));
|
|
31
|
+
top: var(--headers);
|
|
76
32
|
width: var(--sidebar-width);
|
|
77
|
-
|
|
33
|
+
height: calc(100vh - var(--headers));
|
|
78
34
|
|
|
79
35
|
&,
|
|
80
36
|
& ~ * {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
.sidebar-header {
|
|
85
|
-
@apply sticky flex h-14 w-full items-center px-gutter py-6;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.sidebar-content {
|
|
89
|
-
@apply flex w-full flex-1 flex-col items-start gap-7 overflow-y-auto px-gutter pb-14 pt-6 first:pt-14;
|
|
90
|
-
@apply scrollbar scrollbar-track-transparent scrollbar-thumb-accent scrollbar-thumb-rounded-full scrollbar-w-2 hover:scrollbar-thumb-accent-hover;
|
|
37
|
+
@media (min-width: 1024px) {
|
|
38
|
+
--sidebar-width: 14rem;
|
|
39
|
+
}
|
|
91
40
|
}
|
|
92
41
|
}
|
|
93
42
|
}
|
|
@@ -4,7 +4,13 @@ import Button from 'fulldev-ui/components/Button.astro'
|
|
|
4
4
|
|
|
5
5
|
interface Props extends ComponentProps<typeof Button> {}
|
|
6
6
|
|
|
7
|
-
const {
|
|
7
|
+
const {
|
|
8
|
+
variant = 'secondary',
|
|
9
|
+
target = '_blank',
|
|
10
|
+
icon,
|
|
11
|
+
href,
|
|
12
|
+
...rest
|
|
13
|
+
} = Astro.props
|
|
8
14
|
|
|
9
15
|
const platform = () => {
|
|
10
16
|
if (typeof href !== 'string') return
|
|
@@ -22,9 +28,10 @@ const platform = () => {
|
|
|
22
28
|
---
|
|
23
29
|
|
|
24
30
|
<Button
|
|
25
|
-
class:list=
|
|
31
|
+
class:list="social"
|
|
26
32
|
icon={icon ?? platform()}
|
|
27
33
|
{variant}
|
|
28
34
|
{href}
|
|
35
|
+
{target}
|
|
29
36
|
{...rest}
|
|
30
37
|
/>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
as?: HTMLTag
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { ...rest } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<Element
|
|
13
|
+
class:list="stack"
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</Element>
|
|
18
|
+
|
|
19
|
+
<style is:global>
|
|
20
|
+
@layer fulldev {
|
|
21
|
+
.stack {
|
|
22
|
+
@apply relative grid w-full auto-cols-fr items-start gap-x-16 gap-y-8 lg:grid-flow-col;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -1,60 +1,50 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
3
|
-
import type { CollectionEntry } from 'astro:content'
|
|
4
|
-
import { getEntry } from 'astro:content'
|
|
5
|
-
import Avatar from 'fulldev-ui/components/Avatar.astro'
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
6
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
7
|
-
import
|
|
8
|
-
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
4
|
+
import type { TaglineSchema } from 'fulldev-ui/schemas/components/tagline'
|
|
9
5
|
|
|
10
|
-
interface Props
|
|
11
|
-
extends GlobalProps,
|
|
12
|
-
HTMLAttributes<'span'>,
|
|
13
|
-
HTMLAttributes<'a'> {
|
|
6
|
+
interface Props extends HTMLAttributes<'p'>, TaglineSchema {
|
|
14
7
|
as?: HTMLTag
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
18
|
-
size?: 'sm' | 'md' | 'lg' | undefined
|
|
19
|
-
text?: string | undefined
|
|
20
|
-
variant?: 'secondary' | 'outline' | 'link' | undefined
|
|
8
|
+
muted?: boolean | undefined
|
|
9
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | undefined
|
|
21
10
|
}
|
|
22
11
|
|
|
23
|
-
const {
|
|
24
|
-
slug,
|
|
25
|
-
href = slug === 'index' ? '/' : slug ? `/${slug}/` : undefined,
|
|
26
|
-
text = slug ? (await getEntry('pages', slug)).data.title : undefined,
|
|
27
|
-
as = href ? 'a' : 'a',
|
|
28
|
-
target = href?.toString().startsWith('http') ? '_blank' : undefined,
|
|
29
|
-
icon,
|
|
30
|
-
...rest
|
|
31
|
-
} = Astro.props
|
|
12
|
+
const { as = 'p', text, ...rest } = Astro.props
|
|
32
13
|
---
|
|
33
14
|
|
|
34
15
|
<Element
|
|
35
|
-
class:list=
|
|
36
|
-
{href}
|
|
16
|
+
class:list="tagline"
|
|
37
17
|
{as}
|
|
38
|
-
{target}
|
|
39
18
|
{...rest}
|
|
40
19
|
>
|
|
41
|
-
<slot />
|
|
42
|
-
<Icon name={icon} />
|
|
43
20
|
<Fragment set:html={text} />
|
|
21
|
+
<slot />
|
|
44
22
|
</Element>
|
|
45
23
|
|
|
46
24
|
<style is:global>
|
|
47
25
|
@layer fulldev {
|
|
48
26
|
.tagline {
|
|
49
|
-
@apply text-primary
|
|
27
|
+
@apply font-semibold leading-tight text-primary;
|
|
28
|
+
|
|
29
|
+
&.size-xs {
|
|
30
|
+
@apply text-xs;
|
|
31
|
+
}
|
|
50
32
|
|
|
51
33
|
&.size-sm {
|
|
52
34
|
@apply text-sm;
|
|
53
35
|
}
|
|
54
36
|
|
|
37
|
+
&.size-md {
|
|
38
|
+
@apply text-base;
|
|
39
|
+
}
|
|
40
|
+
|
|
55
41
|
&.size-lg {
|
|
56
42
|
@apply text-lg;
|
|
57
43
|
}
|
|
44
|
+
|
|
45
|
+
&.size-xl {
|
|
46
|
+
@apply text-xl;
|
|
47
|
+
}
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
</style>
|