fulldev-ui 0.5.0-beta.8 → 0.6.0-beta.0
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/.env.example +3 -0
- package/.prettierrc.yaml +1 -0
- package/astro.config.ts +6 -32
- package/package.json +21 -30
- package/pnpm-lock.yaml +696 -2176
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/manifest.webmanifest +7 -3
- package/public/favicon/mstile-150x150.png +0 -0
- package/src/blocks/Banner.astro +6 -19
- package/src/blocks/Colleagues.astro +0 -1
- package/src/blocks/Contact.astro +75 -74
- package/src/blocks/Content.astro +124 -6
- package/src/blocks/Cta.astro +0 -2
- package/src/blocks/Excerpt.astro +0 -2
- package/src/blocks/Footer.astro +107 -3
- package/src/blocks/Hero.astro +238 -9
- package/src/blocks/Intro.astro +89 -11
- package/src/blocks/Prices.astro +1 -1
- package/src/blocks/Product.astro +51 -68
- package/src/blocks/Products.astro +114 -5
- package/src/blocks/Reviews.astro +0 -1
- package/src/blocks/_Contact.astro +112 -0
- package/src/components/Avatar.astro +28 -9
- package/src/components/Avatars.astro +36 -0
- package/src/components/Badge.astro +73 -26
- package/src/components/Badges.astro +16 -23
- package/src/components/Breadcrumb.astro +58 -0
- package/src/components/Button.astro +56 -112
- package/src/components/Buttons.astro +23 -13
- package/src/components/Card.astro +129 -115
- package/src/components/Cards.astro +33 -35
- package/src/components/Carousel.astro +106 -0
- package/src/components/Cart.astro +1 -1
- package/src/components/CartForm.astro +9 -9
- package/src/components/CartList.astro +11 -28
- package/src/components/CartSummary.astro +11 -13
- package/src/components/Channel.astro +40 -22
- package/src/components/Channels.astro +20 -6
- package/src/components/Checkbox.astro +52 -27
- package/src/components/Code.astro +52 -0
- package/src/components/Dialog.astro +2 -2
- package/src/components/Drawer.astro +34 -64
- package/src/components/Element.astro +16 -8
- package/src/components/Form.astro +14 -13
- package/src/components/Gallery.astro +172 -0
- package/src/components/Head.astro +52 -1
- package/src/components/Header.astro +73 -83
- package/src/components/Heading.astro +74 -30
- package/src/components/Icon.astro +25 -30
- package/src/components/Image.astro +23 -38
- package/src/components/Input.astro +59 -53
- package/src/components/Label.astro +20 -15
- package/src/components/Lead.astro +46 -0
- package/src/components/Link.astro +51 -26
- package/src/components/Links.astro +42 -0
- package/src/components/List.astro +41 -16
- package/src/components/LocaleSwitcher.astro +2 -2
- package/src/components/Logo.astro +45 -0
- package/src/components/Menu.astro +21 -17
- package/src/components/Paragraph.astro +38 -0
- package/src/components/Price.astro +1 -1
- package/src/components/Prose.astro +169 -0
- package/src/components/Rating.astro +50 -38
- package/src/components/Search.astro +1 -1
- package/src/components/Section.astro +196 -158
- package/src/components/Select.astro +44 -55
- package/src/components/Sidebar.astro +31 -38
- package/src/components/Social.astro +3 -8
- package/src/components/Socials.astro +9 -5
- package/src/components/Subheader.astro +59 -0
- package/src/components/Switch.astro +72 -29
- package/src/components/Table.astro +1 -1
- package/src/components/Tagline.astro +40 -12
- package/src/components/Text.astro +4 -4
- package/src/components/Textarea.astro +40 -50
- package/src/components/Themer.astro +76 -0
- package/src/components/Toc.astro +24 -32
- package/src/components/Writeup.astro +26 -8
- package/src/components/docs/PropsTable.astro +38 -264
- package/src/components/experimental/Window.astro +5 -57
- package/src/components/sections.astro +1 -1
- package/src/content/pages/blocks/_categories.mdx +1 -1
- package/src/content/pages/blocks/_footer.mdx +1 -1
- package/src/content/pages/blocks/_header.mdx +1 -3
- package/src/content/pages/blocks/_jobs.mdx +1 -1
- package/src/content/pages/blocks/_prices.mdx +1 -1
- package/src/content/pages/blocks/_product.mdx +1 -1
- package/src/content/pages/blocks/_products.mdx +1 -1
- package/src/content/pages/blocks/_stats.mdx +1 -1
- package/src/content/pages/blocks/banner.mdx +1 -1
- package/src/content/pages/blocks/colleagues.mdx +1 -2
- package/src/content/pages/blocks/contact.mdx +1 -1
- package/src/content/pages/blocks/content.mdx +1 -5
- package/src/content/pages/blocks/cta.mdx +1 -9
- package/src/content/pages/blocks/features.mdx +1 -4
- package/src/content/pages/blocks/hero.mdx +1 -4
- package/src/content/pages/blocks/intro.mdx +1 -4
- package/src/content/pages/blocks/posts.mdx +1 -1
- package/src/content/pages/blocks/reviews.mdx +1 -2
- package/src/content/pages/docs/_internationalization.mdx +55 -0
- package/src/content/pages/docs/_using-blocks.mdx +33 -0
- package/src/content/pages/docs/_using-presets.mdx +49 -0
- package/src/content/pages/docs/blocks.mdx +33 -0
- package/src/content/pages/docs/collections/images.mdx +100 -0
- package/src/content/pages/docs/collections/pages.mdx +119 -0
- package/src/content/pages/docs/collections/presets.mdx +60 -0
- package/src/content/pages/docs/collections.mdx +42 -0
- package/src/content/pages/{base/card.mdx → docs/components/_card.mdx} +1 -3
- package/src/content/pages/{base → docs/components}/_switch.mdx +2 -2
- package/src/content/pages/{typography → docs/components}/_tagline.mdx +2 -2
- package/src/content/pages/docs/components/_toggle.mdx +31 -0
- package/src/content/pages/docs/components/avatar.mdx +35 -0
- package/src/content/pages/{base → docs/components}/badge.mdx +27 -8
- package/src/content/pages/docs/components/badges.mdx +47 -0
- package/src/content/pages/{base → docs/components}/button.mdx +29 -10
- package/src/content/pages/docs/components/buttons.mdx +52 -0
- package/src/content/pages/docs/components/channel.mdx +92 -0
- package/src/content/pages/docs/components/channels.mdx +90 -0
- package/src/content/pages/{base → docs/components}/checkbox.mdx +10 -17
- package/src/content/pages/docs/components/code.mdx +46 -0
- package/src/content/pages/docs/components/heading.mdx +60 -0
- package/src/content/pages/docs/components/icon.mdx +49 -0
- package/src/content/pages/docs/components/image.mdx +26 -0
- package/src/content/pages/docs/components/input.mdx +41 -0
- package/src/content/pages/{typography → docs/components}/label.mdx +8 -4
- package/src/content/pages/docs/components/lead.mdx +51 -0
- package/src/content/pages/{typography → docs/components}/link.mdx +23 -8
- package/src/content/pages/docs/components/links.mdx +100 -0
- package/src/content/pages/docs/components/list.mdx +45 -0
- package/src/content/pages/docs/components/logo.mdx +37 -0
- package/src/content/pages/docs/components/menu.mdx +90 -0
- package/src/content/pages/docs/components/paragraph.mdx +51 -0
- package/src/content/pages/docs/components/prose.mdx +37 -0
- package/src/content/pages/docs/components/rating.mdx +77 -0
- package/src/content/pages/{base → docs/components}/section.mdx +1 -1
- package/src/content/pages/{base → docs/components}/select.mdx +0 -9
- package/src/content/pages/docs/components/social.mdx +95 -0
- package/src/content/pages/docs/components/socials.mdx +103 -0
- package/src/content/pages/docs/components/switch.mdx +35 -0
- package/src/content/pages/{base → docs/components}/table.mdx +0 -2
- package/src/content/pages/docs/components/tagline.mdx +47 -0
- package/src/content/pages/docs/components/textarea.mdx +35 -0
- package/src/content/pages/docs/components/themer.mdx +50 -0
- package/src/content/pages/docs/components.mdx +40 -0
- package/src/content/pages/docs/customization.mdx +151 -0
- package/src/content/pages/docs/frameworks.mdx +29 -0
- package/src/content/pages/docs/generating-pages.mdx +129 -0
- package/src/content/pages/docs/index.mdx +23 -0
- package/src/content/pages/docs/installation.mdx +50 -0
- package/src/content/pages/docs/layouts.mdx +33 -0
- package/src/content/pages/index.mdx +11 -9
- package/src/content/pages/showcase.mdx +4 -2
- package/src/content/presets/base.yml +80 -63
- package/src/content/presets/docs.yml +2 -2
- package/src/css/color.css +0 -10
- package/src/css/custom.css +10 -12
- package/src/css/size.css +2 -11
- package/src/css/theme.css +93 -0
- package/src/images/logo-1.svg +11 -0
- package/src/images/logo-2.svg +13 -0
- package/src/images/logo-basic.svg +10 -0
- package/src/images/logo-simple.svg +13 -0
- package/src/images/logo-thin.svg +15 -0
- package/src/images/logo.svg +14 -0
- package/src/images/logofat.svg +11 -0
- package/src/integration/index.ts +71 -144
- package/src/layouts/CategoryLayout.astro +135 -0
- package/src/layouts/Layout.astro +62 -117
- package/src/layouts/PageLayout.astro +26 -0
- package/src/layouts/PostLayout.astro +13 -8
- package/src/layouts/ProductLayout.astro +94 -10
- package/src/pages/[...page].astro +14 -22
- package/src/pages/test.astro +20 -0
- package/src/schemas/components/button.ts +21 -13
- package/src/schemas/components/card.ts +36 -18
- package/src/schemas/components/footer.ts +2 -10
- package/src/schemas/components/global.ts +16 -0
- package/src/schemas/components/header.ts +8 -0
- package/src/schemas/components/image.ts +8 -3
- package/src/schemas/components/link.ts +16 -0
- package/src/schemas/components/links.ts +4 -0
- package/src/schemas/components/menu.ts +2 -0
- package/src/schemas/components/sidebar.ts +2 -2
- package/src/schemas/components/subheader.ts +9 -0
- package/src/schemas/components/themer.ts +3 -0
- package/src/schemas/pageSchema.ts +14 -21
- package/src/utils/cart.ts +1 -10
- package/src/utils/getDeepReferenceChildren.ts +14 -0
- package/src/utils/getReferenceChildren.ts +1 -1
- package/src/utils/setTheme.ts +18 -0
- package/src/utils/slugify.ts +6 -0
- package/tailwind.config.ts +67 -0
- package/src/blocks/Article.astro +0 -40
- package/src/components/Footer.astro +0 -193
- package/src/components/ThemeSelect.astro +0 -41
- package/src/components/experimental/Form.astro +0 -53
- package/src/components/experimental/Gallery.astro +0 -104
- package/src/components/experimental/Logo.astro +0 -38
- package/src/components/experimental/Prose.astro +0 -192
- package/src/content/pages/base/icon.mdx +0 -55
- package/src/content/pages/base/image.mdx +0 -42
- package/src/content/pages/base/input.mdx +0 -56
- package/src/content/pages/base/rating.mdx +0 -55
- package/src/content/pages/base/textarea.mdx +0 -58
- package/src/content/pages/base/theme-select.mdx +0 -15
- package/src/content/pages/layouts/_layout.mdx +0 -14
- package/src/content/pages/layouts/docslayout.mdx +0 -14
- package/src/content/pages/overview/components.mdx +0 -75
- package/src/content/pages/overview/content-collections.mdx +0 -139
- package/src/content/pages/overview/frameworks.mdx +0 -198
- package/src/content/pages/overview/installation.mdx +0 -53
- package/src/content/pages/overview/introduction.mdx +0 -30
- package/src/content/pages/overview/theming.mdx +0 -69
- package/src/content/pages/schemas/page.mdx +0 -17
- package/src/content/pages/schemas/preset.mdx +0 -9
- package/src/content/pages/showcase/record.md +0 -3
- package/src/content/pages/typography/heading.mdx +0 -73
- package/src/content/pages/typography/list.mdx +0 -51
- package/src/content/pages/typography/text.mdx +0 -61
- package/src/content/presets/blocks.yml +0 -1
- package/src/css/space.css +0 -77
- package/src/css/styles.css +0 -0
- package/src/images/avatar-1.yml +0 -1
- package/src/integration/generate-colors.ts +0 -639
- package/src/integration/tailwind-plugin.ts +0 -80
- package/src/integration/unocss-preset.ts +0 -84
- package/src/layouts/BlockLayout.astro +0 -19
- package/src/layouts/ContactLayout.astro +0 -21
- package/src/layouts/DocsLayout.astro +0 -73
- package/src/layouts/OverviewLayout.astro +0 -42
- /package/src/content/pages/{base → docs/components}/_dialog.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_drawer.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_localeswitcher.mdx +0 -0
- /package/src/schemas/utils/{parents.ts → categories.ts} +0 -0
package/src/blocks/Hero.astro
CHANGED
|
@@ -1,15 +1,244 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Badge from 'fulldev-ui/components/Badge.astro'
|
|
4
|
+
import Buttons from 'fulldev-ui/components/Buttons.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 Lead from 'fulldev-ui/components/Lead.astro'
|
|
9
|
+
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
10
|
+
import Rating from 'fulldev-ui/components/Rating.astro'
|
|
11
|
+
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
3
12
|
|
|
4
|
-
|
|
13
|
+
interface Props extends HTMLAttributes<'section'> {
|
|
14
|
+
rating?: ComponentProps<typeof Rating> | undefined
|
|
15
|
+
badge?: ComponentProps<typeof Badge> | undefined
|
|
16
|
+
tagline?: ComponentProps<typeof Tagline>['text']
|
|
17
|
+
heading?: ComponentProps<typeof Heading>['text']
|
|
18
|
+
lead?: ComponentProps<typeof Lead>['text']
|
|
19
|
+
paragraph?: ComponentProps<typeof Paragraph>['text']
|
|
20
|
+
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
21
|
+
image?: ComponentProps<typeof Image>['id']
|
|
22
|
+
level?: ComponentProps<typeof Heading>['level']
|
|
23
|
+
as?: HTMLTag
|
|
24
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
25
|
+
variant?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
as = 'section',
|
|
30
|
+
size = 'lg',
|
|
31
|
+
variant = 1,
|
|
32
|
+
level = 1,
|
|
33
|
+
rating,
|
|
34
|
+
tagline,
|
|
35
|
+
badge,
|
|
36
|
+
heading,
|
|
37
|
+
lead,
|
|
38
|
+
paragraph,
|
|
39
|
+
buttons,
|
|
40
|
+
image,
|
|
41
|
+
...rest
|
|
42
|
+
} = Astro.props
|
|
5
43
|
---
|
|
6
44
|
|
|
7
|
-
<
|
|
45
|
+
<Element
|
|
8
46
|
class:list="hero"
|
|
9
|
-
|
|
10
|
-
size
|
|
11
|
-
|
|
12
|
-
variant="primary"
|
|
13
|
-
color="brand"
|
|
47
|
+
{as}
|
|
48
|
+
{size}
|
|
49
|
+
{variant}
|
|
14
50
|
{...rest}
|
|
15
|
-
|
|
51
|
+
>
|
|
52
|
+
<Element class:list="hero-container">
|
|
53
|
+
<Element class:list="hero-segment">
|
|
54
|
+
<Element class:list="hero-content">
|
|
55
|
+
<Rating
|
|
56
|
+
{size}
|
|
57
|
+
{...rating}
|
|
58
|
+
/>
|
|
59
|
+
<Tagline
|
|
60
|
+
text={tagline}
|
|
61
|
+
{size}
|
|
62
|
+
/>
|
|
63
|
+
<Badge
|
|
64
|
+
{size}
|
|
65
|
+
{...badge}
|
|
66
|
+
/>
|
|
67
|
+
<Heading
|
|
68
|
+
text={heading}
|
|
69
|
+
{level}
|
|
70
|
+
{size}
|
|
71
|
+
/>
|
|
72
|
+
<Lead
|
|
73
|
+
text={lead}
|
|
74
|
+
{size}
|
|
75
|
+
/>
|
|
76
|
+
<Paragraph
|
|
77
|
+
text={paragraph}
|
|
78
|
+
{size}
|
|
79
|
+
/>
|
|
80
|
+
<slot name="content" />
|
|
81
|
+
</Element>
|
|
82
|
+
<Buttons
|
|
83
|
+
variant="primary"
|
|
84
|
+
{size}
|
|
85
|
+
{buttons}
|
|
86
|
+
/>
|
|
87
|
+
<slot name="segment" />
|
|
88
|
+
</Element>
|
|
89
|
+
<Image
|
|
90
|
+
class:list="hero-image"
|
|
91
|
+
{...image}
|
|
92
|
+
/>
|
|
93
|
+
<slot />
|
|
94
|
+
</Element>
|
|
95
|
+
</Element>
|
|
96
|
+
|
|
97
|
+
<style is:global>
|
|
98
|
+
@layer fulldev {
|
|
99
|
+
.hero {
|
|
100
|
+
@apply relative w-full;
|
|
101
|
+
|
|
102
|
+
.hero-container {
|
|
103
|
+
@apply flex h-full w-full flex-col;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.hero-segment {
|
|
107
|
+
@apply z-10 flex flex-col items-start gap-8;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.hero-content {
|
|
111
|
+
@apply flex max-w-screen-md flex-col gap-6;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.dark {
|
|
115
|
+
@apply bg-background;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Column left aligned */
|
|
119
|
+
&.variant-1 {
|
|
120
|
+
.hero-container {
|
|
121
|
+
@apply container py-8;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.hero-segment {
|
|
125
|
+
@apply gap-8 py-16;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.content-image {
|
|
129
|
+
@apply rounded-lg;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Column centered */
|
|
134
|
+
&.variant-2 {
|
|
135
|
+
.hero-container {
|
|
136
|
+
@apply container items-center py-8;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.hero-segment {
|
|
140
|
+
@apply items-center py-16;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.hero-content {
|
|
144
|
+
@apply items-center text-center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.content-image {
|
|
148
|
+
@apply rounded-lg;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Spread */
|
|
153
|
+
&.variant-3 {
|
|
154
|
+
.hero-container {
|
|
155
|
+
@apply container items-center py-8;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.hero-segment {
|
|
159
|
+
@apply w-full flex-row flex-wrap items-end justify-between py-16;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.content-image {
|
|
163
|
+
@apply rounded-lg;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Split */
|
|
168
|
+
&.variant-4 {
|
|
169
|
+
.hero-container {
|
|
170
|
+
@apply container py-8 lg:grid lg:grid-cols-2 lg:items-center;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.content-image {
|
|
174
|
+
@apply rounded-lg;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Split fill */
|
|
179
|
+
&.variant-5 {
|
|
180
|
+
@apply min-h-hero;
|
|
181
|
+
|
|
182
|
+
.hero-container {
|
|
183
|
+
@apply container px-0 lg:grid lg:grid-cols-2 lg:items-center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.hero-segment {
|
|
187
|
+
@apply w-auto max-w-screen-md px-gutter pb-16 pt-24 lg:pb-24;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.hero-image {
|
|
191
|
+
@apply right-0 top-0 h-full object-cover lg:absolute lg:w-1/2;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Background left */
|
|
196
|
+
&.variant-6 {
|
|
197
|
+
@apply min-h-hero;
|
|
198
|
+
|
|
199
|
+
.hero-container {
|
|
200
|
+
@apply container justify-center py-16;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.hero-image {
|
|
204
|
+
@apply absolute inset-0 h-full w-full object-cover opacity-30;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Background center */
|
|
209
|
+
&.variant-7 {
|
|
210
|
+
@apply min-h-hero;
|
|
211
|
+
|
|
212
|
+
.hero-container {
|
|
213
|
+
@apply container items-center justify-center py-16;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.hero-image {
|
|
217
|
+
@apply absolute inset-0 h-full w-full object-cover opacity-30;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.hero-segment,
|
|
221
|
+
.hero-content {
|
|
222
|
+
@apply items-center text-center;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Background spread */
|
|
227
|
+
&.variant-8 {
|
|
228
|
+
@apply min-h-hero;
|
|
229
|
+
|
|
230
|
+
.hero-container {
|
|
231
|
+
@apply container items-center justify-end py-16;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.hero-image {
|
|
235
|
+
@apply absolute inset-0 h-full w-full object-cover opacity-30;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.hero-segment {
|
|
239
|
+
@apply w-full flex-row flex-wrap items-end justify-between;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
</style>
|
package/src/blocks/Intro.astro
CHANGED
|
@@ -1,23 +1,101 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Badge from 'fulldev-ui/components/Badge.astro'
|
|
4
|
+
import Breadcrumb from 'fulldev-ui/components/Breadcrumb.astro'
|
|
5
|
+
import Buttons from 'fulldev-ui/components/Buttons.astro'
|
|
6
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
7
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
8
|
+
import Image from 'fulldev-ui/components/Image.astro'
|
|
9
|
+
import Lead from 'fulldev-ui/components/Lead.astro'
|
|
10
|
+
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
11
|
+
import Rating from 'fulldev-ui/components/Rating.astro'
|
|
12
|
+
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
3
13
|
|
|
4
|
-
|
|
14
|
+
interface Props extends HTMLAttributes<'section'> {
|
|
15
|
+
rating?: ComponentProps<typeof Rating> | undefined
|
|
16
|
+
badge?: ComponentProps<typeof Badge> | undefined
|
|
17
|
+
tagline?: ComponentProps<typeof Tagline>['text']
|
|
18
|
+
heading?: ComponentProps<typeof Heading>['text']
|
|
19
|
+
lead?: ComponentProps<typeof Lead>['text']
|
|
20
|
+
paragraph?: ComponentProps<typeof Paragraph>['text']
|
|
21
|
+
buttons?: ComponentProps<typeof Buttons>['buttons']
|
|
22
|
+
image?: ComponentProps<typeof Image>['id']
|
|
23
|
+
level?: ComponentProps<typeof Heading>['level']
|
|
24
|
+
as?: HTMLTag
|
|
25
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
26
|
+
variant?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
as = 'section',
|
|
31
|
+
size = 'lg',
|
|
32
|
+
variant = 1,
|
|
33
|
+
level = 1,
|
|
34
|
+
slug,
|
|
35
|
+
rating,
|
|
36
|
+
tagline,
|
|
37
|
+
badge,
|
|
38
|
+
heading,
|
|
39
|
+
lead,
|
|
40
|
+
paragraph,
|
|
41
|
+
buttons,
|
|
42
|
+
image,
|
|
43
|
+
...rest
|
|
44
|
+
} = Astro.props
|
|
5
45
|
---
|
|
6
46
|
|
|
7
|
-
<
|
|
47
|
+
<Element
|
|
8
48
|
class:list="intro"
|
|
9
|
-
|
|
10
|
-
size
|
|
11
|
-
|
|
49
|
+
{as}
|
|
50
|
+
{size}
|
|
51
|
+
{variant}
|
|
12
52
|
{...rest}
|
|
13
|
-
|
|
53
|
+
>
|
|
54
|
+
<Element class:list="intro-container">
|
|
55
|
+
<Element class:list="intro-content">
|
|
56
|
+
<!-- <Breadcrumb {slug} /> -->
|
|
57
|
+
<Heading
|
|
58
|
+
text={heading}
|
|
59
|
+
as="h1"
|
|
60
|
+
level={3}
|
|
61
|
+
{size}
|
|
62
|
+
/>
|
|
63
|
+
<Paragraph
|
|
64
|
+
text={paragraph}
|
|
65
|
+
{size}
|
|
66
|
+
/>
|
|
67
|
+
</Element>
|
|
68
|
+
<slot />
|
|
69
|
+
</Element>
|
|
70
|
+
</Element>
|
|
14
71
|
|
|
15
|
-
<style is:global
|
|
72
|
+
<style is:global>
|
|
16
73
|
@layer fulldev {
|
|
17
74
|
.intro {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
75
|
+
@apply relative w-full;
|
|
76
|
+
|
|
77
|
+
.intro-container {
|
|
78
|
+
@apply flex h-full w-full flex-col;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.intro-content {
|
|
82
|
+
@apply flex max-w-screen-md flex-col gap-6;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.dark {
|
|
86
|
+
@apply bg-background;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Background left */
|
|
90
|
+
&.variant-1 {
|
|
91
|
+
.intro-container {
|
|
92
|
+
@apply container justify-center py-16;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.intro-image {
|
|
96
|
+
@apply absolute inset-0 h-full w-full object-cover opacity-30;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
21
99
|
}
|
|
22
100
|
}
|
|
23
101
|
</style>
|
package/src/blocks/Prices.astro
CHANGED
package/src/blocks/Product.astro
CHANGED
|
@@ -1,106 +1,89 @@
|
|
|
1
|
-
---
|
|
1
|
+
<!-- ---
|
|
2
|
+
import { getImage } from 'astro:assets'
|
|
2
3
|
import CartForm from 'fulldev-ui/components/CartForm.astro'
|
|
3
4
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
-
import Gallery from 'fulldev-ui/components/
|
|
5
|
+
import Gallery from 'fulldev-ui/components/Gallery.astro'
|
|
5
6
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
|
-
import Image from 'fulldev-ui/components/Image.astro'
|
|
7
7
|
import List from 'fulldev-ui/components/List.astro'
|
|
8
|
-
import
|
|
9
|
-
import Text from 'fulldev-ui/components/Text.astro'
|
|
8
|
+
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
10
9
|
|
|
11
10
|
const {
|
|
11
|
+
as = 'section',
|
|
12
|
+
size = 'md',
|
|
13
|
+
variant = 1,
|
|
14
|
+
level = 1,
|
|
12
15
|
heading,
|
|
16
|
+
paragraph,
|
|
13
17
|
title,
|
|
14
18
|
list,
|
|
15
19
|
price,
|
|
16
|
-
image,
|
|
17
20
|
images,
|
|
18
|
-
rating,
|
|
19
|
-
buttons,
|
|
20
21
|
text,
|
|
21
22
|
subheading,
|
|
22
23
|
variants,
|
|
23
24
|
button,
|
|
24
25
|
description,
|
|
25
26
|
form,
|
|
26
|
-
|
|
27
|
+
uitverkocht,
|
|
27
28
|
...rest
|
|
28
29
|
} = Astro.props
|
|
29
30
|
|
|
30
|
-
const slug = Astro.
|
|
31
|
-
const
|
|
31
|
+
const slug = Astro.url.pathname.replace(/^\/|\/$/g, '') || 'index'
|
|
32
|
+
const imageId = images?.[0]?.id
|
|
33
|
+
const src = `/src/images/${imageId}`
|
|
34
|
+
const allImages = import.meta.glob<{ default: ImageMetadata }>('/src/images/*')
|
|
35
|
+
const foundImage = allImages[src]
|
|
36
|
+
const gotImage =
|
|
37
|
+
imageId && (await getImage({ src: foundImage ? foundImage() : src }))
|
|
32
38
|
---
|
|
33
39
|
|
|
34
|
-
<
|
|
40
|
+
<Element
|
|
35
41
|
class:list="product"
|
|
36
|
-
|
|
42
|
+
{as}
|
|
43
|
+
{size}
|
|
37
44
|
{...rest}
|
|
38
45
|
>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
<Element class:list="product-container">
|
|
47
|
+
<Gallery {images} />
|
|
48
|
+
<Element class:list="product-segment">
|
|
49
|
+
<Element class:list="product-content">
|
|
50
|
+
<Heading
|
|
51
|
+
{level}
|
|
52
|
+
text={heading || title}
|
|
53
|
+
/>
|
|
54
|
+
<Paragraph text={paragraph || description} />
|
|
55
|
+
<List items={list} />
|
|
56
|
+
</Element>
|
|
57
|
+
<CartForm
|
|
58
|
+
soldout={uitverkocht}
|
|
59
|
+
image={gotImage?.src}
|
|
60
|
+
{title}
|
|
61
|
+
{price}
|
|
62
|
+
{slug}
|
|
63
|
+
{variants}
|
|
44
64
|
/>
|
|
45
|
-
|
|
46
|
-
<Image {...(image || images?.[0])} />
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
<Element class:list="column">
|
|
50
|
-
<Heading
|
|
51
|
-
level={2}
|
|
52
|
-
text={heading || title}
|
|
53
|
-
/>
|
|
54
|
-
<Text
|
|
55
|
-
style={{ maxWidth: '420px' }}
|
|
56
|
-
text={text || description}
|
|
57
|
-
/>
|
|
58
|
-
<List
|
|
59
|
-
items={list}
|
|
60
|
-
style={{ marginTop: 'var(--space-5)' }}
|
|
61
|
-
/>
|
|
62
|
-
<CartForm
|
|
63
|
-
image={src}
|
|
64
|
-
{title}
|
|
65
|
-
{price}
|
|
66
|
-
{slug}
|
|
67
|
-
{variants}
|
|
68
|
-
/>
|
|
65
|
+
</Element>
|
|
69
66
|
</Element>
|
|
70
|
-
</
|
|
67
|
+
</Element>
|
|
71
68
|
|
|
72
|
-
<style is:global
|
|
69
|
+
<style is:global>
|
|
73
70
|
.product {
|
|
74
|
-
|
|
71
|
+
@apply relative w-full;
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
.product-container {
|
|
74
|
+
@apply container flex h-full w-full flex-col gap-16 py-8 lg:grid lg:grid-cols-[3fr_2fr];
|
|
78
75
|
}
|
|
79
76
|
|
|
80
|
-
.
|
|
81
|
-
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
align-items: flex-start;
|
|
84
|
-
gap: var(--space-5);
|
|
77
|
+
.product-segment {
|
|
78
|
+
@apply z-10 flex flex-col items-start gap-8;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
align-items: center;
|
|
90
|
-
gap: var(--space-5);
|
|
81
|
+
.product-content {
|
|
82
|
+
@apply flex max-w-screen-md flex-col gap-6;
|
|
91
83
|
}
|
|
92
84
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
margin-right: calc(-1 * var(--gutter));
|
|
96
|
-
margin-left: calc(-1 * var(--gutter));
|
|
97
|
-
width: calc(100% + (var(--gutter) * 2));
|
|
98
|
-
|
|
99
|
-
.small-carousel {
|
|
100
|
-
padding-right: var(--gutter);
|
|
101
|
-
padding-left: var(--gutter);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
85
|
+
&.dark {
|
|
86
|
+
@apply bg-background;
|
|
104
87
|
}
|
|
105
88
|
}
|
|
106
|
-
</style>
|
|
89
|
+
</style> -->
|
|
@@ -1,11 +1,120 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Button from 'fulldev-ui/components/Button.astro'
|
|
4
|
+
import Buttons from 'fulldev-ui/components/Buttons.astro'
|
|
5
|
+
import Cards from 'fulldev-ui/components/Cards.astro'
|
|
6
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
7
|
+
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
8
|
+
import Paragraph from 'fulldev-ui/components/Paragraph.astro'
|
|
9
|
+
import Tagline from 'fulldev-ui/components/Tagline.astro'
|
|
3
10
|
|
|
4
|
-
|
|
11
|
+
interface Props extends HTMLAttributes<'section'> {
|
|
12
|
+
tagline?: ComponentProps<typeof Tagline>['text']
|
|
13
|
+
heading?: ComponentProps<typeof Heading>['text']
|
|
14
|
+
paragraph?: ComponentProps<typeof Paragraph>['text']
|
|
15
|
+
button?: ComponentProps<typeof Buttons> | undefined
|
|
16
|
+
cards?: ComponentProps<typeof Cards>['cards']
|
|
17
|
+
level?: ComponentProps<typeof Heading>['level']
|
|
18
|
+
as?: HTMLTag
|
|
19
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
20
|
+
variant?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
as = 'section',
|
|
25
|
+
size = 'sm',
|
|
26
|
+
variant = 1,
|
|
27
|
+
level = 2,
|
|
28
|
+
tagline,
|
|
29
|
+
heading,
|
|
30
|
+
paragraph,
|
|
31
|
+
button,
|
|
32
|
+
cards,
|
|
33
|
+
...rest
|
|
34
|
+
} = Astro.props
|
|
5
35
|
---
|
|
6
36
|
|
|
7
|
-
<
|
|
37
|
+
<Element
|
|
8
38
|
class:list="products"
|
|
9
|
-
|
|
39
|
+
{as}
|
|
40
|
+
{size}
|
|
41
|
+
{variant}
|
|
10
42
|
{...rest}
|
|
11
|
-
|
|
43
|
+
>
|
|
44
|
+
<Element class:list="products-container">
|
|
45
|
+
<Element class:list="products-segment">
|
|
46
|
+
<Element class:list="products-content">
|
|
47
|
+
<Tagline
|
|
48
|
+
text={tagline}
|
|
49
|
+
{size}
|
|
50
|
+
/>
|
|
51
|
+
<Heading
|
|
52
|
+
text={heading}
|
|
53
|
+
{level}
|
|
54
|
+
{size}
|
|
55
|
+
/>
|
|
56
|
+
<Paragraph
|
|
57
|
+
text={paragraph}
|
|
58
|
+
{size}
|
|
59
|
+
/>
|
|
60
|
+
<slot name="content" />
|
|
61
|
+
</Element>
|
|
62
|
+
<Button
|
|
63
|
+
variant="ghost"
|
|
64
|
+
{size}
|
|
65
|
+
{...button}
|
|
66
|
+
/>
|
|
67
|
+
<slot name="segment" />
|
|
68
|
+
</Element>
|
|
69
|
+
<Cards
|
|
70
|
+
{cards}
|
|
71
|
+
{size}
|
|
72
|
+
/>
|
|
73
|
+
<slot />
|
|
74
|
+
</Element>
|
|
75
|
+
</Element>
|
|
76
|
+
|
|
77
|
+
<style is:global>
|
|
78
|
+
@layer fulldev {
|
|
79
|
+
.products {
|
|
80
|
+
@apply relative w-full;
|
|
81
|
+
|
|
82
|
+
.products-container {
|
|
83
|
+
@apply flex h-full w-full flex-col;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.products-segment {
|
|
87
|
+
@apply z-10 flex flex-col items-start gap-8;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.products-content {
|
|
91
|
+
@apply flex max-w-screen-md flex-col gap-6;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.dark {
|
|
95
|
+
@apply bg-background;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Column left aligned */
|
|
99
|
+
&.variant-1 {
|
|
100
|
+
.products-container {
|
|
101
|
+
@apply container py-8;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.products-segment {
|
|
105
|
+
@apply w-full flex-row flex-wrap justify-between gap-8 py-8;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.cards {
|
|
109
|
+
--column-width: 200px;
|
|
110
|
+
|
|
111
|
+
@apply gap-2;
|
|
112
|
+
|
|
113
|
+
.image {
|
|
114
|
+
@apply p-4;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</style>
|