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
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
|
+
import Logo from 'fulldev-ui/components/Logo.astro'
|
|
6
|
+
import Menu from 'fulldev-ui/components/Menu.astro'
|
|
7
|
+
import links from 'fulldev-ui/schemas/components/links'
|
|
8
|
+
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
9
|
+
import Buttons from './Buttons.astro'
|
|
10
|
+
import Heading from './Heading.astro'
|
|
11
|
+
import Links from './Links.astro'
|
|
12
|
+
|
|
13
|
+
interface Props extends GlobalProps, HTMLAttributes<'aside'> {
|
|
14
|
+
variant?: ComponentProps<typeof Button>['variant']
|
|
15
|
+
text?: ComponentProps<typeof Button>['text']
|
|
16
|
+
icon?: ComponentProps<typeof Button>['icon']
|
|
17
|
+
heading?: ComponentProps<typeof Heading>['text']
|
|
18
|
+
logo?: ComponentProps<typeof Logo> | undefined
|
|
19
|
+
company?: ComponentProps<typeof Logo>['company']
|
|
20
|
+
menu?: ComponentProps<typeof Menu>['groups']
|
|
21
|
+
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
22
|
+
links?: ComponentProps<typeof Links>['links']
|
|
23
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
id = 'drawer',
|
|
28
|
+
size = 'sm',
|
|
29
|
+
icon = 'menu-2',
|
|
30
|
+
color,
|
|
31
|
+
variant,
|
|
32
|
+
text,
|
|
33
|
+
buttons,
|
|
34
|
+
links,
|
|
35
|
+
heading,
|
|
36
|
+
logo,
|
|
37
|
+
company,
|
|
38
|
+
menu,
|
|
39
|
+
if: ifProp,
|
|
40
|
+
...rest
|
|
41
|
+
} = Astro.props
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
<Button
|
|
45
|
+
variant="secondary"
|
|
46
|
+
class:list={['drawer-button', `${id}-button`]}
|
|
47
|
+
onclick={`document.getElementById('${id}').showModal()`}
|
|
48
|
+
{variant}
|
|
49
|
+
{text}
|
|
50
|
+
{icon}
|
|
51
|
+
{color}
|
|
52
|
+
{size}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<Element
|
|
56
|
+
onclick={`event.target === this && this.close()`}
|
|
57
|
+
class:list="drawer"
|
|
58
|
+
as="dialog"
|
|
59
|
+
{id}
|
|
60
|
+
{text}
|
|
61
|
+
{size}
|
|
62
|
+
{icon}
|
|
63
|
+
{...rest}
|
|
64
|
+
>
|
|
65
|
+
<Element class:list="drawer-body">
|
|
66
|
+
<button autofocus></button>
|
|
67
|
+
<Element
|
|
68
|
+
class:list="drawer-header"
|
|
69
|
+
as="header"
|
|
70
|
+
>
|
|
71
|
+
<Logo
|
|
72
|
+
{size}
|
|
73
|
+
{company}
|
|
74
|
+
{...logo}
|
|
75
|
+
/>
|
|
76
|
+
<Heading
|
|
77
|
+
level={4}
|
|
78
|
+
text={heading}
|
|
79
|
+
/>
|
|
80
|
+
<Button
|
|
81
|
+
variant="secondary"
|
|
82
|
+
icon="x"
|
|
83
|
+
onclick={`document.getElementById('${id}').close()`}
|
|
84
|
+
/>
|
|
85
|
+
<slot name="header" />
|
|
86
|
+
</Element>
|
|
87
|
+
<Element class:list="drawer-content">
|
|
88
|
+
<Links
|
|
89
|
+
direction="column"
|
|
90
|
+
{links}
|
|
91
|
+
/>
|
|
92
|
+
<Menu groups={menu} />
|
|
93
|
+
<slot />
|
|
94
|
+
</Element>
|
|
95
|
+
<Element
|
|
96
|
+
class:list="drawer-footer"
|
|
97
|
+
as="footer"
|
|
98
|
+
>
|
|
99
|
+
<slot name="footer" />
|
|
100
|
+
</Element>
|
|
101
|
+
</Element>
|
|
102
|
+
</Element>
|
|
103
|
+
|
|
104
|
+
<style is:global>
|
|
105
|
+
@layer fulldev {
|
|
106
|
+
body:has(dialog[open]) {
|
|
107
|
+
@apply max-md:overflow-hidden;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.drawer {
|
|
111
|
+
@apply inset-0 m-0 h-full max-h-full w-full max-w-full p-0 md:max-w-md;
|
|
112
|
+
|
|
113
|
+
&::backdrop {
|
|
114
|
+
@apply cursor-pointer bg-background/50;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.drawer-body {
|
|
118
|
+
@apply flex h-full shrink flex-col overflow-auto bg-background;
|
|
119
|
+
|
|
120
|
+
.drawer-content {
|
|
121
|
+
@apply flex flex-col gap-6 px-gutter py-12;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.drawer-header,
|
|
125
|
+
.drawer-footer {
|
|
126
|
+
@apply sticky z-10 flex shrink-0 bg-background;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.drawer-header {
|
|
130
|
+
@apply top-0 h-14 items-center px-gutter;
|
|
131
|
+
|
|
132
|
+
.button {
|
|
133
|
+
@apply ml-auto;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.drawer-footer {
|
|
138
|
+
@apply bottom-0 mt-auto flex-col px-gutter py-8;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
@@ -20,6 +20,7 @@ const {
|
|
|
20
20
|
center,
|
|
21
21
|
frame,
|
|
22
22
|
dark,
|
|
23
|
+
muted,
|
|
23
24
|
inset,
|
|
24
25
|
...rest
|
|
25
26
|
} = Astro.props
|
|
@@ -41,6 +42,7 @@ const render = 'if' in rest ? rest.if : slot?.trim().length > 0
|
|
|
41
42
|
center,
|
|
42
43
|
inset,
|
|
43
44
|
dark,
|
|
45
|
+
muted,
|
|
44
46
|
[`size-${size}`]: size,
|
|
45
47
|
[`color-${color}`]: color,
|
|
46
48
|
[`level-${level}`]: level,
|
|
@@ -13,7 +13,9 @@ interface Props extends GlobalProps, HTMLAttributes<'form'> {
|
|
|
13
13
|
| (
|
|
14
14
|
| ComponentProps<typeof Input>
|
|
15
15
|
| ComponentProps<typeof Select>
|
|
16
|
-
| (ComponentProps<typeof Textarea> & {
|
|
16
|
+
| (ComponentProps<typeof Textarea> & {
|
|
17
|
+
type?: 'textarea' | undefined
|
|
18
|
+
})
|
|
17
19
|
)[]
|
|
18
20
|
| undefined
|
|
19
21
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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="grid"
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</Element>
|
|
18
|
+
|
|
19
|
+
<style is:global>
|
|
20
|
+
@layer fulldev {
|
|
21
|
+
.grid {
|
|
22
|
+
@apply relative w-full grid-cols-[repeat(auto-fill,minmax(var(--column-width),1fr))] gap-5;
|
|
23
|
+
display: grid;
|
|
24
|
+
--column-width: 20rem;
|
|
25
|
+
|
|
26
|
+
/* &.size-sm {
|
|
27
|
+
--column-width: 16rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.size-md {
|
|
31
|
+
--column-width: 20rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.size-lg {
|
|
35
|
+
--column-width: 26rem;
|
|
36
|
+
} */
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -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="group"
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</Element>
|
|
18
|
+
|
|
19
|
+
<style is:global>
|
|
20
|
+
@layer fulldev {
|
|
21
|
+
.group {
|
|
22
|
+
@apply flex flex-wrap justify-stretch gap-2;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { AstroSeo } from '@astrolib/seo'
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
5
|
-
import type Layout from 'fulldev-ui/layouts/Layout.astro'
|
|
3
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
4
|
+
import type { HeadSchema } from 'fulldev-ui/schemas/components/head'
|
|
6
5
|
|
|
7
|
-
type Props =
|
|
6
|
+
type Props = HTMLAttributes<'head'> & HeadSchema & {}
|
|
8
7
|
|
|
9
|
-
const { theme, title, description, image,
|
|
8
|
+
const { theme, title, description, image, code } = Astro.props
|
|
10
9
|
|
|
11
|
-
const
|
|
12
|
-
const mergedTitle = seo?.title || title || renderTitle
|
|
13
|
-
const mergedDescription = seo?.description || description
|
|
14
|
-
const mergedImage =
|
|
15
|
-
seo?.image || image ? Astro.url.origin + (seo?.image || image) : undefined
|
|
10
|
+
const src = image?.src && Astro.url.origin + image.src
|
|
16
11
|
---
|
|
17
12
|
|
|
18
13
|
<head>
|
|
@@ -29,24 +24,22 @@ const mergedImage =
|
|
|
29
24
|
rel="canonical"
|
|
30
25
|
href={Astro.url.href.endsWith('/') ? Astro.url.href : Astro.url.href + '/'}
|
|
31
26
|
/>
|
|
32
|
-
<ViewTransitions />
|
|
33
27
|
<AstroSeo
|
|
34
|
-
title={
|
|
35
|
-
description={
|
|
28
|
+
title={title ?? ''}
|
|
29
|
+
description={description ?? ''}
|
|
36
30
|
openGraph={{
|
|
37
|
-
title:
|
|
38
|
-
description:
|
|
39
|
-
images:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
: undefined,
|
|
47
|
-
} as any}
|
|
31
|
+
title: title ?? '',
|
|
32
|
+
description: description ?? '',
|
|
33
|
+
images: [
|
|
34
|
+
{
|
|
35
|
+
url: src ?? '',
|
|
36
|
+
alt: title ?? '',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
}}
|
|
48
40
|
/>
|
|
49
|
-
|
|
41
|
+
|
|
42
|
+
<Fragment set:html={code} />
|
|
50
43
|
|
|
51
44
|
<script is:inline define:vars={{ theme }}>
|
|
52
45
|
function setTheme(document) {
|
|
@@ -87,11 +80,4 @@ const mergedImage =
|
|
|
87
80
|
setOption(document)
|
|
88
81
|
})
|
|
89
82
|
</script>
|
|
90
|
-
|
|
91
|
-
<!-- TrustBox script -->
|
|
92
|
-
<script
|
|
93
|
-
type="text/javascript"
|
|
94
|
-
src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js"
|
|
95
|
-
async
|
|
96
|
-
></script>
|
|
97
83
|
</head>
|
|
@@ -1,129 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type {
|
|
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'
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
6
3
|
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
4
|
|
|
15
|
-
interface Props extends
|
|
16
|
-
|
|
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
|
|
5
|
+
interface Props extends HTMLAttributes<'header'> {
|
|
6
|
+
as?: HTMLTag
|
|
28
7
|
}
|
|
29
8
|
|
|
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
|
|
9
|
+
const { as = 'header', ...rest } = Astro.props
|
|
45
10
|
---
|
|
46
11
|
|
|
47
12
|
<Element
|
|
48
13
|
class:list="header"
|
|
49
|
-
as
|
|
50
|
-
{size}
|
|
51
|
-
{open}
|
|
14
|
+
{as}
|
|
52
15
|
{...rest}
|
|
53
16
|
>
|
|
54
|
-
<
|
|
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>
|
|
17
|
+
<slot />
|
|
100
18
|
</Element>
|
|
101
19
|
|
|
102
20
|
<style is:global>
|
|
103
21
|
@layer fulldev {
|
|
104
22
|
.header {
|
|
105
|
-
@apply
|
|
106
|
-
|
|
107
|
-
.header-container {
|
|
108
|
-
@apply container flex w-full items-center justify-between gap-6;
|
|
109
|
-
}
|
|
23
|
+
@apply relative flex w-full items-center bg-background;
|
|
24
|
+
height: var(--header-height);
|
|
110
25
|
|
|
111
26
|
&,
|
|
112
27
|
& ~ * {
|
|
113
28
|
--header-height: 3.5rem;
|
|
114
29
|
}
|
|
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
30
|
}
|
|
128
31
|
}
|
|
129
32
|
</style>
|
|
@@ -4,28 +4,24 @@ import Element from 'fulldev-ui/components/Element.astro'
|
|
|
4
4
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
5
5
|
import { slugify } from 'fulldev-ui/utils/slugify'
|
|
6
6
|
|
|
7
|
-
interface Props extends GlobalProps, HTMLAttributes<'h2'> {
|
|
7
|
+
interface Props extends GlobalProps, HTMLAttributes<'h2'>, HTMLAttributes<'a'> {
|
|
8
8
|
as?: HTMLTag
|
|
9
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined
|
|
10
9
|
text?: string | undefined
|
|
10
|
+
muted?: boolean | undefined
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
|
+
as = 'h2',
|
|
14
15
|
text,
|
|
15
16
|
id = text ? slugify(text) : undefined,
|
|
16
|
-
size = 'md',
|
|
17
|
-
level = 2,
|
|
18
|
-
as = `h${level}`,
|
|
19
17
|
...rest
|
|
20
18
|
} = Astro.props
|
|
21
19
|
---
|
|
22
20
|
|
|
23
21
|
<Element
|
|
24
22
|
class:list="heading"
|
|
25
|
-
{id}
|
|
26
23
|
{as}
|
|
27
|
-
{
|
|
28
|
-
{size}
|
|
24
|
+
{id}
|
|
29
25
|
{...rest}
|
|
30
26
|
>
|
|
31
27
|
<Fragment set:html={text} />
|
|
@@ -36,82 +32,49 @@ const {
|
|
|
36
32
|
.heading {
|
|
37
33
|
@apply scroll-mt-20 font-bold tracking-tight text-foreground;
|
|
38
34
|
|
|
39
|
-
&.
|
|
40
|
-
|
|
41
|
-
@apply text-3xl;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.level-2 {
|
|
45
|
-
@apply text-2xl;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.level-3 {
|
|
49
|
-
@apply text-xl;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&.level-4 {
|
|
53
|
-
@apply text-lg;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.level-5 {
|
|
57
|
-
@apply text-base;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.level-6 {
|
|
61
|
-
@apply text-sm;
|
|
62
|
-
}
|
|
35
|
+
&.muted {
|
|
36
|
+
@apply text-muted-foreground;
|
|
63
37
|
}
|
|
64
38
|
|
|
39
|
+
&,
|
|
65
40
|
&.size-md {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.level-2 {
|
|
71
|
-
@apply text-3xl;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&.level-3 {
|
|
75
|
-
@apply text-2xl;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.level-4 {
|
|
79
|
-
@apply text-xl;
|
|
80
|
-
}
|
|
41
|
+
@apply text-base;
|
|
42
|
+
}
|
|
81
43
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
44
|
+
&.size-xs {
|
|
45
|
+
@apply text-xs;
|
|
46
|
+
}
|
|
85
47
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
48
|
+
&.size-sm {
|
|
49
|
+
@apply text-sm;
|
|
89
50
|
}
|
|
90
51
|
|
|
91
52
|
&.size-lg {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
53
|
+
@apply text-lg;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.size-xl {
|
|
57
|
+
@apply text-xl;
|
|
58
|
+
}
|
|
95
59
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
60
|
+
&.size-2xl {
|
|
61
|
+
@apply text-2xl;
|
|
62
|
+
}
|
|
99
63
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
64
|
+
&.size-3xl {
|
|
65
|
+
@apply text-3xl;
|
|
66
|
+
}
|
|
103
67
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
68
|
+
&.size-4xl {
|
|
69
|
+
@apply text-4xl;
|
|
70
|
+
}
|
|
107
71
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
72
|
+
&.size-5xl {
|
|
73
|
+
@apply text-4xl lg:text-5xl;
|
|
74
|
+
}
|
|
111
75
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
76
|
+
&.size-6xl {
|
|
77
|
+
@apply text-5xl lg:text-6xl;
|
|
115
78
|
}
|
|
116
79
|
}
|
|
117
80
|
</style>
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
import tablerIcons from '@iconify-json/tabler/icons.json'
|
|
3
3
|
import type { HTMLAttributes } from 'astro/types'
|
|
4
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
5
|
-
import type {
|
|
5
|
+
import type { IconSchema } from 'fulldev-ui/schemas/components/icon'
|
|
6
6
|
|
|
7
|
-
interface Props extends
|
|
8
|
-
name?: keyof typeof tablerIcons.icons | undefined
|
|
7
|
+
interface Props extends Omit<HTMLAttributes<'svg'>, 'name'>, IconSchema {
|
|
8
|
+
// name?: keyof typeof tablerIcons.icons | undefined
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
const { size = 'md', name, ...rest } = Astro.props
|
|
12
13
|
|
|
13
|
-
const trimmedName = name?.trim()
|
|
14
|
+
const trimmedName = name?.trim()
|
|
14
15
|
const icon = trimmedName
|
|
15
16
|
? (tablerIcons as any)?.icons[trimmedName]?.body
|
|
16
17
|
: undefined
|