astro-component-kit 0.2.2 → 0.3.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/README.md +4 -4
- package/package.json +11 -9
- package/src/components/index.ts +12 -9
- package/src/components/lib/AnimatedGalaxy.astro +4 -2
- package/src/components/lib/Galaxy3D.astro +237 -185
- package/src/components/lib/LogoWithGalaxy.astro +2 -2
- package/src/components/lib/buttons/index.ts +4 -1
- package/src/components/lib/cards/index.ts +3 -0
- package/src/components/lib/charts/DonutChart.astro +1 -1
- package/src/components/lib/charts/index.ts +3 -0
- package/src/components/lib/data/index.ts +3 -0
- package/src/components/lib/feedback/index.ts +3 -0
- package/src/components/lib/forms/index.ts +3 -0
- package/src/components/lib/index.ts +17 -6
- package/src/components/lib/layout/BentoGrid3.astro +79 -9
- package/src/components/lib/layout/CenterFixedBox.astro +52 -2
- package/src/components/lib/layout/CenteredContainer.astro +44 -5
- package/src/components/lib/layout/ClusterHorizontal.astro +36 -2
- package/src/components/lib/layout/FeatureHero.astro +119 -50
- package/src/components/lib/layout/FooterCenteredMinimal.astro +57 -9
- package/src/components/lib/layout/FullBleedSection.astro +44 -2
- package/src/components/lib/layout/GalleryGrid4.astro +35 -3
- package/src/components/lib/layout/GlassCardGrid.astro +24 -2
- package/src/components/lib/layout/GlassSectionHeader.astro +72 -11
- package/src/components/lib/layout/LandingSectionSplit.astro +83 -8
- package/src/components/lib/layout/MasonryGrid.astro +42 -3
- package/src/components/lib/layout/MinimalFooterGrid.astro +83 -11
- package/src/components/lib/layout/ScrollSnapSection.astro +37 -3
- package/src/components/lib/layout/SectionDividerText.astro +44 -4
- package/src/components/lib/layout/SidebarLayoutWrapper.astro +62 -7
- package/src/components/lib/layout/SplitScreenLayout.astro +62 -6
- package/src/components/lib/layout/StepLayoutVertical.astro +83 -10
- package/src/components/lib/layout/StickySidebarWrapper.astro +69 -6
- package/src/components/lib/layout/VerticalStack.astro +35 -5
- package/src/components/lib/layout/index.ts +17 -14
- package/src/components/lib/navigation/index.ts +3 -0
- package/src/components/lib/overlays/index.ts +3 -0
- package/src/components/lib/sections/ContactGlassForm.astro +361 -0
- package/src/components/lib/sections/CtaAppDownload.astro +258 -0
- package/src/components/lib/sections/CtaGlowBanner.astro +267 -0
- package/src/components/lib/sections/FaqAccordionSection.astro +349 -0
- package/src/components/lib/sections/FeatureBentoGrid.astro +449 -0
- package/src/components/lib/sections/FeatureTimelineFlow.astro +254 -0
- package/src/components/lib/sections/PricingComparisonMatrix.astro +468 -0
- package/src/components/lib/sections/PricingTierCards.astro +256 -0
- package/src/components/lib/sections/StatsMetricShowcase.astro +332 -0
- package/src/components/lib/sections/TeamGridSection.astro +333 -0
- package/src/components/lib/sections/TestimonialWallGlass.astro +406 -0
- package/src/components/lib/sections/index.ts +22 -0
- package/src/components/lib/typography/index.ts +3 -0
- package/src/components/lib/AnimatedInput.astro +0 -82
- package/src/components/lib/Badge.astro +0 -52
- package/src/components/lib/GlassButton.astro +0 -87
- package/src/components/lib/GlassCard.astro +0 -72
- package/src/components/lib/GlassNavbar.astro +0 -67
- package/src/components/lib/GlowButton.astro +0 -60
- /package/src/components/lib/buttons/{3dPushButton.astro → ThreeDPushButton.astro} +0 -0
|
@@ -1,15 +1,76 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* GlassSectionHeader — A section header with glassmorphism styling and accent underline.
|
|
4
|
+
*
|
|
5
|
+
* Displays a title with an optional subtitle and a decorative accent line.
|
|
6
|
+
* The accent line uses the primary color from design tokens.
|
|
7
|
+
* Suitable for introducing new sections on landing pages or documentation.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} title - Main heading text. Required.
|
|
10
|
+
* @param {string} subtitle - Supporting description. Optional.
|
|
11
|
+
* @param {'left' | 'center'} align - Text alignment. Default: 'left'.
|
|
12
|
+
* @param {string} className - Additional CSS class to apply.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```astro
|
|
16
|
+
* <GlassSectionHeader
|
|
17
|
+
* title="Why Astro Components Kit"
|
|
18
|
+
* subtitle="Build faster with premium components"
|
|
19
|
+
* align="center"
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
interface Props {
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
align?: 'left' | 'center';
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const { title, subtitle = '', align = 'left', className = '' } = Astro.props;
|
|
4
31
|
---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
32
|
+
|
|
33
|
+
<div class:list={['glass-section-header', { 'is-centered': align === 'center' }, className]}>
|
|
34
|
+
<h2 class="glass-section-header__title">{title}</h2>
|
|
35
|
+
{subtitle && <p class="glass-section-header__subtitle">{subtitle}</p>}
|
|
36
|
+
<div class="glass-section-header__line" aria-hidden="true"></div>
|
|
9
37
|
</div>
|
|
38
|
+
|
|
10
39
|
<style>
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
|
|
40
|
+
.glass-section-header {
|
|
41
|
+
margin-bottom: var(--sp-8);
|
|
42
|
+
}
|
|
43
|
+
.glass-section-header.is-centered {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.glass-section-header__title {
|
|
47
|
+
font-size: clamp(1.5rem, 3vw, 2rem);
|
|
48
|
+
font-weight: 800;
|
|
49
|
+
color: var(--c-text-1);
|
|
50
|
+
margin: 0;
|
|
51
|
+
line-height: 1.2;
|
|
52
|
+
letter-spacing: -0.02em;
|
|
53
|
+
}
|
|
54
|
+
.glass-section-header__subtitle {
|
|
55
|
+
font-size: clamp(0.9rem, 1.5vw, 1rem);
|
|
56
|
+
color: var(--c-text-3);
|
|
57
|
+
margin: var(--sp-2) 0 0;
|
|
58
|
+
max-width: 600px;
|
|
59
|
+
line-height: 1.6;
|
|
60
|
+
}
|
|
61
|
+
.is-centered .glass-section-header__subtitle {
|
|
62
|
+
margin-left: auto;
|
|
63
|
+
margin-right: auto;
|
|
64
|
+
}
|
|
65
|
+
.glass-section-header__line {
|
|
66
|
+
height: 4px;
|
|
67
|
+
width: 60px;
|
|
68
|
+
background: var(--c-primary-light);
|
|
69
|
+
border-radius: 2px;
|
|
70
|
+
margin-top: var(--sp-4);
|
|
71
|
+
}
|
|
72
|
+
.is-centered .glass-section-header__line {
|
|
73
|
+
margin-left: auto;
|
|
74
|
+
margin-right: auto;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -1,13 +1,88 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* LandingSectionSplit — Landing page section with text on one side and a media container on the other.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
title = 'Build Faster with Astro',
|
|
13
|
+
subtitle = 'Scale with pre-built accessible components and modular designs.',
|
|
14
|
+
className = ''
|
|
15
|
+
} = Astro.props;
|
|
2
16
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<div class="
|
|
17
|
+
|
|
18
|
+
<section class={`split-sec ${className}`}>
|
|
19
|
+
<div class="split-sec-text">
|
|
20
|
+
<h2>{title}</h2>
|
|
21
|
+
<p>{subtitle}</p>
|
|
22
|
+
<div class="split-sec-actions">
|
|
23
|
+
<slot name="actions">
|
|
24
|
+
<button class="split-demo-btn">Explore Docs</button>
|
|
25
|
+
</slot>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="split-sec-media">
|
|
29
|
+
<slot name="media">
|
|
30
|
+
<div class="media-mockup">
|
|
31
|
+
<span>⚡ Interactive Preview</span>
|
|
32
|
+
</div>
|
|
33
|
+
</slot>
|
|
34
|
+
</div>
|
|
6
35
|
</section>
|
|
36
|
+
|
|
7
37
|
<style>
|
|
8
|
-
.split-sec {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
38
|
+
.split-sec {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: 1fr 1fr;
|
|
41
|
+
gap: 3rem;
|
|
42
|
+
align-items: center;
|
|
43
|
+
padding: 2.5rem 1rem;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
.split-sec-text h2 {
|
|
47
|
+
font-size: 2.2rem;
|
|
48
|
+
font-weight: 800;
|
|
49
|
+
color: #fff;
|
|
50
|
+
margin: 0 0 1rem;
|
|
51
|
+
line-height: 1.2;
|
|
52
|
+
}
|
|
53
|
+
.split-sec-text p {
|
|
54
|
+
font-size: 1.05rem;
|
|
55
|
+
color: #94a3b8;
|
|
56
|
+
line-height: 1.6;
|
|
57
|
+
margin: 0 0 1.5rem;
|
|
58
|
+
}
|
|
59
|
+
.split-demo-btn {
|
|
60
|
+
padding: 0.75rem 1.5rem;
|
|
61
|
+
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
|
62
|
+
border: none;
|
|
63
|
+
border-radius: 8px;
|
|
64
|
+
color: #fff;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
.split-sec-media {
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
71
|
+
.media-mockup {
|
|
72
|
+
height: 220px;
|
|
73
|
+
background: rgba(15, 23, 42, 0.6);
|
|
74
|
+
border-radius: 16px;
|
|
75
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
color: #94a3b8;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
@media (max-width: 768px) {
|
|
83
|
+
.split-sec {
|
|
84
|
+
grid-template-columns: 1fr;
|
|
85
|
+
gap: 2rem;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
13
88
|
</style>
|
|
@@ -1,7 +1,46 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* MasonryGrid — A CSS-based masonry layout for items of varying heights.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
columns?: number;
|
|
7
|
+
gap?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { columns = 3, gap = '1.5rem', className = '' } = Astro.props;
|
|
2
12
|
---
|
|
3
|
-
|
|
13
|
+
|
|
14
|
+
<div class={`masonry ${className}`} style={`--cols: ${columns}; --gap: ${gap};`}>
|
|
15
|
+
<slot>
|
|
16
|
+
<div class="masonry-demo-item" style="height: 120px;">Item 1 (Small)</div>
|
|
17
|
+
<div class="masonry-demo-item" style="height: 200px;">Item 2 (Tall)</div>
|
|
18
|
+
<div class="masonry-demo-item" style="height: 160px;">Item 3 (Medium)</div>
|
|
19
|
+
<div class="masonry-demo-item" style="height: 140px;">Item 4 (Medium)</div>
|
|
20
|
+
<div class="masonry-demo-item" style="height: 180px;">Item 5 (Tall)</div>
|
|
21
|
+
<div class="masonry-demo-item" style="height: 110px;">Item 6 (Small)</div>
|
|
22
|
+
</slot>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
4
25
|
<style>
|
|
5
|
-
.masonry {
|
|
6
|
-
|
|
26
|
+
.masonry {
|
|
27
|
+
columns: var(--cols, 3) 220px;
|
|
28
|
+
column-gap: var(--gap, 1.5rem);
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
.masonry :global(> *) {
|
|
32
|
+
break-inside: avoid;
|
|
33
|
+
margin-bottom: var(--gap, 1.5rem);
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
.masonry-demo-item {
|
|
37
|
+
background: rgba(255, 255, 255, 0.04);
|
|
38
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
39
|
+
border-radius: var(--r-md, 12px);
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
color: #94a3b8;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
}
|
|
7
46
|
</style>
|
|
@@ -1,20 +1,92 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* MinimalFooterGrid — Multi-column grid footer for project links and brand info.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
brandName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { brandName = 'AstroKit', className = '' } = Astro.props;
|
|
2
11
|
---
|
|
3
|
-
|
|
12
|
+
|
|
13
|
+
<footer class={`m-footer ${className}`}>
|
|
4
14
|
<div class="f-row">
|
|
5
|
-
<div class="f-info">
|
|
15
|
+
<div class="f-info">
|
|
16
|
+
<span class="f-brand">{brandName}</span>
|
|
17
|
+
<span class="f-copy">© {new Date().getFullYear()} All rights reserved.</span>
|
|
18
|
+
</div>
|
|
6
19
|
<div class="f-links">
|
|
7
|
-
<div
|
|
8
|
-
|
|
20
|
+
<div class="f-col">
|
|
21
|
+
<span class="f-col-title">Product</span>
|
|
22
|
+
<a href="#components">Components</a>
|
|
23
|
+
<a href="#docs">Documentation</a>
|
|
24
|
+
<a href="#pricing">Pricing</a>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="f-col">
|
|
27
|
+
<span class="f-col-title">Community</span>
|
|
28
|
+
<a href="https://github.com" target="_blank" rel="noopener">GitHub</a>
|
|
29
|
+
<a href="https://discord.com" target="_blank" rel="noopener">Discord</a>
|
|
30
|
+
<a href="https://x.com" target="_blank" rel="noopener">Twitter</a>
|
|
31
|
+
</div>
|
|
9
32
|
</div>
|
|
10
33
|
</div>
|
|
11
34
|
</footer>
|
|
35
|
+
|
|
12
36
|
<style>
|
|
13
|
-
.m-footer {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
.m-footer {
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding: 3rem 1.5rem;
|
|
40
|
+
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
|
41
|
+
background: rgba(0, 0, 0, 0.2);
|
|
42
|
+
}
|
|
43
|
+
.f-row {
|
|
44
|
+
max-width: 1200px;
|
|
45
|
+
margin: 0 auto;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
flex-wrap: wrap;
|
|
50
|
+
gap: 2rem;
|
|
51
|
+
}
|
|
52
|
+
.f-info {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 0.25rem;
|
|
56
|
+
}
|
|
57
|
+
.f-brand {
|
|
58
|
+
font-weight: 800;
|
|
59
|
+
font-size: 1.2rem;
|
|
60
|
+
color: #fff;
|
|
61
|
+
}
|
|
62
|
+
.f-copy {
|
|
63
|
+
font-size: 0.8rem;
|
|
64
|
+
color: #64748b;
|
|
65
|
+
}
|
|
66
|
+
.f-links {
|
|
67
|
+
display: flex;
|
|
68
|
+
gap: 3rem;
|
|
69
|
+
}
|
|
70
|
+
.f-col {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 0.5rem;
|
|
74
|
+
}
|
|
75
|
+
.f-col-title {
|
|
76
|
+
font-size: 0.8rem;
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
text-transform: uppercase;
|
|
79
|
+
letter-spacing: 0.05em;
|
|
80
|
+
color: #94a3b8;
|
|
81
|
+
margin-bottom: 0.25rem;
|
|
82
|
+
}
|
|
83
|
+
a {
|
|
84
|
+
color: #cbd5e1;
|
|
85
|
+
font-size: 0.85rem;
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
transition: color 0.2s ease;
|
|
88
|
+
}
|
|
89
|
+
a:hover {
|
|
90
|
+
color: #fff;
|
|
91
|
+
}
|
|
20
92
|
</style>
|
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* ScrollSnapSection — Layout wrapper that snaps sections to the full viewport height.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
height?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { height = '300px', className = '' } = Astro.props;
|
|
2
11
|
---
|
|
3
|
-
|
|
12
|
+
|
|
13
|
+
<div class={`snap-wrap ${className}`} style={`--snap-height: ${height};`}>
|
|
14
|
+
<slot>
|
|
15
|
+
<section class="snap-panel panel-1"><h4>Slide 1 (Scroll to snap)</h4></section>
|
|
16
|
+
<section class="snap-panel panel-2"><h4>Slide 2</h4></section>
|
|
17
|
+
<section class="snap-panel panel-3"><h4>Slide 3</h4></section>
|
|
18
|
+
</slot>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
4
21
|
<style>
|
|
5
|
-
.snap-wrap {
|
|
6
|
-
|
|
22
|
+
.snap-wrap {
|
|
23
|
+
height: var(--snap-height, 300px);
|
|
24
|
+
overflow-y: scroll;
|
|
25
|
+
scroll-snap-type: y mandatory;
|
|
26
|
+
width: 100%;
|
|
27
|
+
border-radius: var(--r-lg, 12px);
|
|
28
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
29
|
+
}
|
|
30
|
+
.snap-wrap :global(section), .snap-panel {
|
|
31
|
+
height: var(--snap-height, 300px);
|
|
32
|
+
scroll-snap-align: start;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
color: #fff;
|
|
37
|
+
}
|
|
38
|
+
.panel-1 { background: rgba(99, 102, 241, 0.15); }
|
|
39
|
+
.panel-2 { background: rgba(192, 132, 252, 0.15); }
|
|
40
|
+
.panel-3 { background: rgba(251, 191, 36, 0.15); }
|
|
7
41
|
</style>
|
|
@@ -1,7 +1,47 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* SectionDividerText — A text-based section divider with decorative lines on each side.
|
|
4
|
+
*
|
|
5
|
+
* Displays uppercase text centered between two horizontal lines. Ideal for separating
|
|
6
|
+
* content sections on landing pages or documentation pages.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} color - Text and line color using CSS color value. Default: 'var(--c-text-3)'.
|
|
9
|
+
* @param {string} fontSize - Size of the divider text. Default: '0.75rem'.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```astro
|
|
13
|
+
* <SectionDividerText>Features</SectionDividerText>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
interface Props {
|
|
17
|
+
color?: string;
|
|
18
|
+
fontSize?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { color = 'var(--c-text-3)', fontSize = '0.75rem' } = Astro.props;
|
|
2
22
|
---
|
|
3
|
-
|
|
23
|
+
|
|
24
|
+
<div class="section-divider" style={`--divider-color: ${color}; --divider-font-size: ${fontSize}`}>
|
|
25
|
+
<span><slot /></span>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
4
28
|
<style>
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
29
|
+
.section-divider {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--sp-4);
|
|
33
|
+
color: var(--divider-color, var(--c-text-3));
|
|
34
|
+
font-size: var(--divider-font-size, 0.75rem);
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
text-transform: uppercase;
|
|
37
|
+
letter-spacing: 0.1em;
|
|
38
|
+
margin: var(--sp-6) 0;
|
|
39
|
+
}
|
|
40
|
+
.section-divider::before,
|
|
41
|
+
.section-divider::after {
|
|
42
|
+
content: '';
|
|
43
|
+
flex: 1;
|
|
44
|
+
height: 1px;
|
|
45
|
+
background: var(--c-border);
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -1,11 +1,66 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* SidebarLayoutWrapper — A two-column layout with a sidebar and main content area.
|
|
4
|
+
*
|
|
5
|
+
* Creates a full-height page layout with a fixed-width sidebar column and a flexible main column.
|
|
6
|
+
* Stacks vertically on mobile screens (below 768px). Uses named slots for sidebar and main content.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} sidebarWidth - Width of the sidebar column. Default: '280px'.
|
|
9
|
+
* @param {string} breakpoint - Screen width at which the layout stacks vertically. Default: '768px'.
|
|
10
|
+
* @param {string} className - Additional CSS class to apply.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```astro
|
|
14
|
+
* <SidebarLayoutWrapper sidebarWidth="260px">
|
|
15
|
+
* <div slot="sidebar">
|
|
16
|
+
* <nav>Navigation links</nav>
|
|
17
|
+
* </div>
|
|
18
|
+
* <div slot="main">
|
|
19
|
+
* <h1>Main content</h1>
|
|
20
|
+
* </div>
|
|
21
|
+
* </SidebarLayoutWrapper>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
interface Props {
|
|
25
|
+
sidebarWidth?: string;
|
|
26
|
+
breakpoint?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const { sidebarWidth = '280px', breakpoint = '768px', className = '' } = Astro.props;
|
|
2
31
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<
|
|
32
|
+
|
|
33
|
+
<div class:list={['sidebar-layout', className]} style={`--sidebar-w: ${sidebarWidth}; --breakpoint: ${breakpoint}`}>
|
|
34
|
+
<aside class="sidebar-layout__sidebar">
|
|
35
|
+
<slot name="sidebar" />
|
|
36
|
+
</aside>
|
|
37
|
+
<main class="sidebar-layout__main">
|
|
38
|
+
<slot name="main" />
|
|
39
|
+
</main>
|
|
6
40
|
</div>
|
|
41
|
+
|
|
7
42
|
<style>
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
43
|
+
.sidebar-layout {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: var(--sidebar-w) 1fr;
|
|
46
|
+
min-height: 100vh;
|
|
47
|
+
}
|
|
48
|
+
.sidebar-layout__sidebar {
|
|
49
|
+
border-right: 1px solid var(--c-border);
|
|
50
|
+
background: var(--c-bg-1);
|
|
51
|
+
overflow-y: auto;
|
|
52
|
+
}
|
|
53
|
+
.sidebar-layout__main {
|
|
54
|
+
padding: var(--sp-6);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (max-width: 768px) {
|
|
58
|
+
.sidebar-layout {
|
|
59
|
+
grid-template-columns: 1fr;
|
|
60
|
+
}
|
|
61
|
+
.sidebar-layout__sidebar {
|
|
62
|
+
border-right: none;
|
|
63
|
+
border-bottom: 1px solid var(--c-border);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -1,11 +1,67 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* SplitScreenLayout — A layout divided into two equal halves, perfect for landing pages.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { className = '' } = Astro.props;
|
|
2
10
|
---
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<div class="split-side
|
|
11
|
+
|
|
12
|
+
<div class={`split-layout ${className}`}>
|
|
13
|
+
<div class="split-side left">
|
|
14
|
+
<slot name="left">
|
|
15
|
+
<div class="demo-split-block">
|
|
16
|
+
<h3>Left Content</h3>
|
|
17
|
+
<p>Hero text and main value proposition.</p>
|
|
18
|
+
</div>
|
|
19
|
+
</slot>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="split-side right">
|
|
22
|
+
<slot name="right">
|
|
23
|
+
<div class="demo-split-block">
|
|
24
|
+
<h3>Right Content</h3>
|
|
25
|
+
<p>Visual graphic, product mockups, or form.</p>
|
|
26
|
+
</div>
|
|
27
|
+
</slot>
|
|
28
|
+
</div>
|
|
6
29
|
</div>
|
|
30
|
+
|
|
7
31
|
<style>
|
|
8
|
-
.split-layout {
|
|
9
|
-
|
|
10
|
-
|
|
32
|
+
.split-layout {
|
|
33
|
+
display: flex;
|
|
34
|
+
min-height: 50vh;
|
|
35
|
+
flex-wrap: wrap;
|
|
36
|
+
width: 100%;
|
|
37
|
+
border-radius: var(--r-xl, 16px);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
40
|
+
}
|
|
41
|
+
.split-side {
|
|
42
|
+
flex: 1;
|
|
43
|
+
min-width: 280px;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
padding: 3rem 2rem;
|
|
48
|
+
}
|
|
49
|
+
.left {
|
|
50
|
+
background: rgba(255, 255, 255, 0.02);
|
|
51
|
+
}
|
|
52
|
+
.right {
|
|
53
|
+
background: rgba(0, 0, 0, 0.3);
|
|
54
|
+
border-left: 1px solid rgba(255, 255, 255, 0.06);
|
|
55
|
+
}
|
|
56
|
+
.demo-split-block {
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
59
|
+
.demo-split-block h3 {
|
|
60
|
+
color: #fff;
|
|
61
|
+
font-size: 1.5rem;
|
|
62
|
+
margin-bottom: 0.5rem;
|
|
63
|
+
}
|
|
64
|
+
.demo-split-block p {
|
|
65
|
+
color: #94a3b8;
|
|
66
|
+
}
|
|
11
67
|
</style>
|
|
@@ -1,21 +1,94 @@
|
|
|
1
1
|
---
|
|
2
|
+
/**
|
|
3
|
+
* StepLayoutVertical — Vertical Progress Steps with space for detailed descriptions.
|
|
4
|
+
*/
|
|
5
|
+
interface Props {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { className = '' } = Astro.props;
|
|
2
10
|
---
|
|
3
|
-
|
|
11
|
+
|
|
12
|
+
<div class={`step-lay ${className}`}>
|
|
4
13
|
<div class="step-line">
|
|
5
14
|
<div class="step-point">1</div>
|
|
6
15
|
<div class="step-point">2</div>
|
|
16
|
+
<div class="step-point">3</div>
|
|
7
17
|
</div>
|
|
8
18
|
<div class="step-content">
|
|
9
|
-
<div class="step-block"
|
|
10
|
-
|
|
19
|
+
<div class="step-block">
|
|
20
|
+
<h4>1. Installation</h4>
|
|
21
|
+
<p>Install astro-component-kit via npm in seconds.</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="step-block">
|
|
24
|
+
<h4>2. Configuration</h4>
|
|
25
|
+
<p>Import components and design tokens into your Astro project.</p>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="step-block">
|
|
28
|
+
<h4>3. Build & Ship</h4>
|
|
29
|
+
<p>Enjoy zero-runtime overhead and instant static builds.</p>
|
|
30
|
+
</div>
|
|
11
31
|
</div>
|
|
12
32
|
</div>
|
|
33
|
+
|
|
13
34
|
<style>
|
|
14
|
-
.step-lay {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
35
|
+
.step-lay {
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 2rem;
|
|
38
|
+
width: 100%;
|
|
39
|
+
max-width: 600px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
}
|
|
42
|
+
.step-line {
|
|
43
|
+
width: 36px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
|
+
.step-line::before {
|
|
51
|
+
content: "";
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 18px;
|
|
54
|
+
bottom: 18px;
|
|
55
|
+
width: 2px;
|
|
56
|
+
background: rgba(255, 255, 255, 0.1);
|
|
57
|
+
z-index: 0;
|
|
58
|
+
}
|
|
59
|
+
.step-point {
|
|
60
|
+
width: 34px;
|
|
61
|
+
height: 34px;
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
background: #6366f1;
|
|
64
|
+
color: #fff;
|
|
65
|
+
display: grid;
|
|
66
|
+
place-items: center;
|
|
67
|
+
font-weight: 800;
|
|
68
|
+
font-size: 0.9rem;
|
|
69
|
+
box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
|
|
70
|
+
z-index: 1;
|
|
71
|
+
}
|
|
72
|
+
.step-content {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: 1.5rem;
|
|
76
|
+
flex: 1;
|
|
77
|
+
}
|
|
78
|
+
.step-block {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
min-height: 50px;
|
|
83
|
+
}
|
|
84
|
+
.step-block h4 {
|
|
85
|
+
margin: 0;
|
|
86
|
+
color: #fff;
|
|
87
|
+
font-size: 1.05rem;
|
|
88
|
+
}
|
|
89
|
+
.step-block p {
|
|
90
|
+
color: #94a3b8;
|
|
91
|
+
font-size: 0.85rem;
|
|
92
|
+
margin: 0.25rem 0 0;
|
|
93
|
+
}
|
|
21
94
|
</style>
|