@zoyth/simple-site-framework 1.0.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/LICENSE +21 -0
- package/README.md +572 -0
- package/bin/create-simple-site.js +390 -0
- package/bin/simple-site.js +664 -0
- package/dist/client.js +135 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +107 -0
- package/dist/client.mjs.map +1 -0
- package/dist/components/index.d.mts +3936 -0
- package/dist/components/index.d.ts +3936 -0
- package/dist/components/index.js +38265 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +38173 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/index.d.mts +298 -0
- package/dist/config/index.d.ts +298 -0
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +1 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/index.d.mts +2184 -0
- package/dist/index.d.ts +2184 -0
- package/dist/index.js +1713 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1605 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/i18n/index.js +665 -0
- package/dist/lib/i18n/index.js.map +1 -0
- package/dist/lib/i18n/index.mjs +621 -0
- package/dist/lib/i18n/index.mjs.map +1 -0
- package/docs/DOCUMENTATION-STRUCTURE.md +1156 -0
- package/docs/EXPORTS.md +125 -0
- package/docs/PERFORMANCE.md +757 -0
- package/docs/POLICY-PAGES.md +867 -0
- package/docs/ROADMAP.md +334 -0
- package/docs/SEO.md +455 -0
- package/docs/SITEMAP.md +708 -0
- package/docs/STRUCTURED-DATA.md +671 -0
- package/docs/accessibility/common-patterns.md +529 -0
- package/docs/accessibility/keyboard-navigation.md +263 -0
- package/docs/accessibility/overview.md +122 -0
- package/docs/accessibility/screen-readers.md +311 -0
- package/docs/accessibility/wcag-compliance.md +159 -0
- package/docs/api/README.md +164 -0
- package/docs/api/components/Accessibility.md +356 -0
- package/docs/api/components/Button.md +240 -0
- package/docs/api/components/HeroSection.md +306 -0
- package/docs/architecture/decisions.md +449 -0
- package/docs/components/AnalyticsTracker.md +58 -0
- package/docs/components/AnimatedCounter.md +48 -0
- package/docs/components/AnimatedSection.md +56 -0
- package/docs/components/BlogCard.md +42 -0
- package/docs/components/Checkbox.md +56 -0
- package/docs/components/CodeBlock.md +52 -0
- package/docs/components/ComparisonTable.md +40 -0
- package/docs/components/ComponentDemo.md +38 -0
- package/docs/components/CountdownTimer.md +51 -0
- package/docs/components/ExitIntentModal.md +56 -0
- package/docs/components/FAQAccordion.md +66 -0
- package/docs/components/FeaturesGrid.md +55 -0
- package/docs/components/FileUpload.md +54 -0
- package/docs/components/I18nMetaTags.md +55 -0
- package/docs/components/Icon.md +53 -0
- package/docs/components/LazySection.md +46 -0
- package/docs/components/LiveProof.md +53 -0
- package/docs/components/LoadingSpinner.md +46 -0
- package/docs/components/MultiStepForm.md +48 -0
- package/docs/components/PolicyLayout.md +55 -0
- package/docs/components/PricingTable.md +49 -0
- package/docs/components/Radio.md +59 -0
- package/docs/components/SEOMetaTags.md +58 -0
- package/docs/components/ScriptInjector.md +50 -0
- package/docs/components/Select.md +72 -0
- package/docs/components/Skeleton.md +47 -0
- package/docs/components/StatsSection.md +48 -0
- package/docs/components/StickyBar.md +62 -0
- package/docs/components/StructuredData.md +99 -0
- package/docs/components/StyleGuide.md +46 -0
- package/docs/components/TableOfContents.md +47 -0
- package/docs/components/TestimonialCarousel.md +42 -0
- package/docs/components/Timeline.md +51 -0
- package/docs/components/Toast.md +59 -0
- package/docs/components/TrackedLink.md +62 -0
- package/docs/components/TrustBadges.md +44 -0
- package/docs/components/conversion/MobileCTA.md +363 -0
- package/docs/components/forms/ContactForm.md +75 -0
- package/docs/components/forms/FormField.md +74 -0
- package/docs/components/layout/Footer.md +601 -0
- package/docs/components/layout/Header.md +549 -0
- package/docs/components/layout/LanguageSelector.md +54 -0
- package/docs/components/layout/LanguageSwitcher.md +24 -0
- package/docs/components/overview.md +447 -0
- package/docs/components/sections/AboutSection.md +48 -0
- package/docs/components/sections/CTASection.md +596 -0
- package/docs/components/sections/CaseStudySection.md +47 -0
- package/docs/components/sections/ContactSection.md +599 -0
- package/docs/components/sections/FeatureSection.md +44 -0
- package/docs/components/sections/HeroSection.md +404 -0
- package/docs/components/sections/LogosSection.md +47 -0
- package/docs/components/sections/PersonalTaxesSection.md +23 -0
- package/docs/components/sections/RecruitingSection.md +23 -0
- package/docs/components/sections/SecurePortalSection.md +23 -0
- package/docs/components/sections/ServicePageLayout.md +52 -0
- package/docs/components/sections/ServicesSection.md +49 -0
- package/docs/components/sections/TestimonialSection.md +44 -0
- package/docs/components/sections/WhyChooseUsSection.md +54 -0
- package/docs/components/ui/Breadcrumb.md +70 -0
- package/docs/components/ui/Button.md +514 -0
- package/docs/components/ui/Card.md +501 -0
- package/docs/components/ui/Input.md +54 -0
- package/docs/components/ui/MobileLinks.md +43 -0
- package/docs/components/ui/Modal.md +60 -0
- package/docs/components/ui/Tabs.md +62 -0
- package/docs/components/ui/Textarea.md +52 -0
- package/docs/core-concepts/configuration-driven.md +552 -0
- package/docs/core-concepts/overview.md +351 -0
- package/docs/features/accessibility/README.md +73 -0
- package/docs/features/accessibility/aria-support.md +177 -0
- package/docs/features/accessibility/color-contrast.md +155 -0
- package/docs/features/accessibility/focus-management.md +187 -0
- package/docs/features/accessibility/testing.md +196 -0
- package/docs/features/analytics/README.md +51 -0
- package/docs/features/analytics/ab-testing.md +171 -0
- package/docs/features/analytics/conversion-tracking.md +207 -0
- package/docs/features/analytics/custom-events.md +219 -0
- package/docs/features/analytics/privacy.md +198 -0
- package/docs/features/analytics/setup.md +114 -0
- package/docs/features/analytics/tracking-events.md +224 -0
- package/docs/features/i18n/README.md +51 -0
- package/docs/features/i18n/best-practices.md +273 -0
- package/docs/features/i18n/configuration.md +84 -0
- package/docs/features/i18n/formatting.md +133 -0
- package/docs/features/i18n/locale-detection.md +122 -0
- package/docs/features/i18n/routing.md +99 -0
- package/docs/features/i18n/rtl-support.md +191 -0
- package/docs/features/i18n/translations.md +129 -0
- package/docs/features/internationalization.md +595 -0
- package/docs/features/performance/README.md +77 -0
- package/docs/features/performance/bundle-size.md +134 -0
- package/docs/features/performance/caching.md +131 -0
- package/docs/features/performance/code-splitting.md +121 -0
- package/docs/features/performance/image-optimization.md +110 -0
- package/docs/features/performance/lazy-loading.md +92 -0
- package/docs/features/performance/monitoring.md +148 -0
- package/docs/features/seo/README.md +51 -0
- package/docs/features/seo/best-practices.md +184 -0
- package/docs/features/seo/canonical-urls.md +182 -0
- package/docs/features/seo/meta-tags.md +126 -0
- package/docs/features/seo/open-graph.md +166 -0
- package/docs/features/seo/robots-txt.md +146 -0
- package/docs/features/seo/sitemaps.md +162 -0
- package/docs/features/seo/structured-data.md +166 -0
- package/docs/getting-started/installation.md +292 -0
- package/docs/getting-started/introduction.md +195 -0
- package/docs/getting-started/quick-start.md +460 -0
- package/docs/guides/analytics-setup.md +616 -0
- package/docs/i18n/CONFIGURATION.md +353 -0
- package/docs/i18n/EXAMPLES.md +402 -0
- package/docs/i18n/MIGRATION.md +260 -0
- package/docs/i18n/SEO.md +392 -0
- package/docs/i18n/STATIC-GENERATION-FIX.md +71 -0
- package/docs/migration/changelog.md +136 -0
- package/docs/migration/overview.md +233 -0
- package/docs/recipes/adding-animations.md +475 -0
- package/docs/recipes/forms-with-validation.md +393 -0
- package/package.json +152 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# HeroSection
|
|
2
|
+
|
|
3
|
+
The most commonly used component - creates an above-the-fold hero banner with heading, description, CTA buttons, and optional background image.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { HeroSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component (default export)
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<HeroSection
|
|
17
|
+
heading="Transform Your Business"
|
|
18
|
+
description="Professional consulting services that deliver real results"
|
|
19
|
+
cta={{
|
|
20
|
+
text: 'Get Started',
|
|
21
|
+
href: '/contact'
|
|
22
|
+
}}
|
|
23
|
+
variant="centered"
|
|
24
|
+
/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
### Required Props
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Description |
|
|
32
|
+
|------|------|-------------|
|
|
33
|
+
| `heading` | `string \| LocalizedString` | Main heading text |
|
|
34
|
+
|
|
35
|
+
### Optional Props
|
|
36
|
+
|
|
37
|
+
| Prop | Type | Default | Description |
|
|
38
|
+
|------|------|---------|-------------|
|
|
39
|
+
| `description` | `string \| LocalizedString` | - | Subheading/description text |
|
|
40
|
+
| `cta` | `CTAConfig` | - | Primary call-to-action button |
|
|
41
|
+
| `secondaryCTA` | `CTAConfig` | - | Secondary CTA button |
|
|
42
|
+
| `variant` | `'centered' \| 'split' \| 'minimal'` | `'centered'` | Layout variant |
|
|
43
|
+
| `backgroundImage` | `string` | - | Background image URL |
|
|
44
|
+
| `backgroundVideo` | `string` | - | Background video URL (mp4) |
|
|
45
|
+
| `overlay` | `boolean` | `true` | Show dark overlay over background |
|
|
46
|
+
| `overlayOpacity` | `number` | `0.5` | Overlay opacity (0-1) |
|
|
47
|
+
| `height` | `'auto' \| 'screen' \| 'tall'` | `'auto'` | Section height |
|
|
48
|
+
| `align` | `'left' \| 'center' \| 'right'` | `'center'` | Text alignment |
|
|
49
|
+
| `maxWidth` | `MaxWidth` | `'2xl'` | Maximum content width |
|
|
50
|
+
| `className` | `string` | - | Custom CSS classes |
|
|
51
|
+
| `locale` | `string` | - | Current locale (for LocalizedString) |
|
|
52
|
+
|
|
53
|
+
### Type Definitions
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
interface CTAConfig {
|
|
57
|
+
text: string | LocalizedString;
|
|
58
|
+
href: string;
|
|
59
|
+
onClick?: () => void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
type LocalizedString = {
|
|
63
|
+
[locale: string]: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type MaxWidth = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Variants
|
|
70
|
+
|
|
71
|
+
### Centered (Default)
|
|
72
|
+
|
|
73
|
+
Content centered with buttons below:
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
<HeroSection
|
|
77
|
+
heading="Welcome to Our Platform"
|
|
78
|
+
description="The complete solution for modern businesses"
|
|
79
|
+
cta={{ text: 'Start Free Trial', href: '/signup' }}
|
|
80
|
+
variant="centered"
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Best for:** Traditional hero sections, product launches
|
|
85
|
+
|
|
86
|
+
### Split
|
|
87
|
+
|
|
88
|
+
Image on one side, content on the other:
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
<HeroSection
|
|
92
|
+
heading="Meet Your Team"
|
|
93
|
+
description="Expert professionals ready to help"
|
|
94
|
+
cta={{ text: 'Learn More', href: '/about' }}
|
|
95
|
+
variant="split"
|
|
96
|
+
backgroundImage="/team-photo.jpg"
|
|
97
|
+
/>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Best for:** About pages, team introductions, feature highlights
|
|
101
|
+
|
|
102
|
+
### Minimal
|
|
103
|
+
|
|
104
|
+
Simplified layout with less spacing:
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
<HeroSection
|
|
108
|
+
heading="Contact Us"
|
|
109
|
+
description="We'd love to hear from you"
|
|
110
|
+
variant="minimal"
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Best for:** Internal pages, simple headers
|
|
115
|
+
|
|
116
|
+
## Examples
|
|
117
|
+
|
|
118
|
+
### Simple Hero
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
<HeroSection
|
|
122
|
+
heading="Welcome"
|
|
123
|
+
description="Start your journey today"
|
|
124
|
+
cta={{ text: 'Get Started', href: '/signup' }}
|
|
125
|
+
/>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Hero with Two CTAs
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
<HeroSection
|
|
132
|
+
heading="Build Faster"
|
|
133
|
+
description="Ship production-ready sites in hours, not weeks"
|
|
134
|
+
cta={{
|
|
135
|
+
text: 'Start Free Trial',
|
|
136
|
+
href: '/signup'
|
|
137
|
+
}}
|
|
138
|
+
secondaryCTA={{
|
|
139
|
+
text: 'View Demo',
|
|
140
|
+
href: '/demo'
|
|
141
|
+
}}
|
|
142
|
+
/>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Hero with Background Image
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
<HeroSection
|
|
149
|
+
heading="Discover Paradise"
|
|
150
|
+
description="Luxury travel experiences around the world"
|
|
151
|
+
cta={{ text: 'Explore Destinations', href: '/destinations' }}
|
|
152
|
+
backgroundImage="/paradise.jpg"
|
|
153
|
+
overlay={true}
|
|
154
|
+
overlayOpacity={0.6}
|
|
155
|
+
height="screen"
|
|
156
|
+
/>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Hero with Background Video
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
<HeroSection
|
|
163
|
+
heading="Innovation in Motion"
|
|
164
|
+
description="See our technology in action"
|
|
165
|
+
cta={{ text: 'Learn More', href: '/technology' }}
|
|
166
|
+
backgroundVideo="/hero-video.mp4"
|
|
167
|
+
overlay={true}
|
|
168
|
+
/>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Multi-Language Hero
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
<HeroSection
|
|
175
|
+
heading={{
|
|
176
|
+
en: 'Transform Your Business',
|
|
177
|
+
fr: 'Transformez votre entreprise',
|
|
178
|
+
es: 'Transforme tu negocio'
|
|
179
|
+
}}
|
|
180
|
+
description={{
|
|
181
|
+
en: 'Professional consulting services',
|
|
182
|
+
fr: 'Services de conseil professionnels',
|
|
183
|
+
es: 'Servicios de consultoría profesional'
|
|
184
|
+
}}
|
|
185
|
+
cta={{
|
|
186
|
+
text: {
|
|
187
|
+
en: 'Get Started',
|
|
188
|
+
fr: 'Commencer',
|
|
189
|
+
es: 'Empezar'
|
|
190
|
+
},
|
|
191
|
+
href: '/contact'
|
|
192
|
+
}}
|
|
193
|
+
locale={locale}
|
|
194
|
+
/>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Left-Aligned Hero
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
<HeroSection
|
|
201
|
+
heading="Our Mission"
|
|
202
|
+
description="Building the future of sustainable technology"
|
|
203
|
+
cta={{ text: 'Read More', href: '/mission' }}
|
|
204
|
+
align="left"
|
|
205
|
+
/>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Full-Screen Hero
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
<HeroSection
|
|
212
|
+
heading="Welcome to the Future"
|
|
213
|
+
description="Experience innovation like never before"
|
|
214
|
+
cta={{ text: 'Explore', href: '/features' }}
|
|
215
|
+
height="screen"
|
|
216
|
+
backgroundImage="/future.jpg"
|
|
217
|
+
/>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Hero with Analytics
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
<HeroSection
|
|
224
|
+
heading="Start Your Trial"
|
|
225
|
+
description="No credit card required"
|
|
226
|
+
cta={{
|
|
227
|
+
text: 'Sign Up Free',
|
|
228
|
+
href: '/signup',
|
|
229
|
+
onClick: () => trackEvent('hero_cta_click', { location: 'homepage' })
|
|
230
|
+
}}
|
|
231
|
+
/>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Styling
|
|
235
|
+
|
|
236
|
+
### Custom Background
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
<HeroSection
|
|
240
|
+
heading="Custom Styling"
|
|
241
|
+
className="bg-gradient-to-r from-purple-600 to-blue-600"
|
|
242
|
+
/>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Custom Spacing
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
<HeroSection
|
|
249
|
+
heading="Compact Hero"
|
|
250
|
+
className="py-12" // Override default py-20
|
|
251
|
+
/>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Custom Typography
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
<HeroSection
|
|
258
|
+
heading="Large Heading"
|
|
259
|
+
className="[&_h1]:text-7xl [&_p]:text-2xl"
|
|
260
|
+
/>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Accessibility
|
|
264
|
+
|
|
265
|
+
HeroSection includes:
|
|
266
|
+
|
|
267
|
+
- ✅ Semantic HTML (`<section>`, `<h1>`, `<p>`)
|
|
268
|
+
- ✅ Proper heading hierarchy
|
|
269
|
+
- ✅ Focus management for CTAs
|
|
270
|
+
- ✅ Keyboard navigation
|
|
271
|
+
- ✅ Screen reader friendly
|
|
272
|
+
- ✅ ARIA landmarks
|
|
273
|
+
- ✅ Sufficient color contrast (when using default theme)
|
|
274
|
+
|
|
275
|
+
## Performance
|
|
276
|
+
|
|
277
|
+
- **Server-rendered by default** - No client JavaScript unless CTAs have `onClick`
|
|
278
|
+
- **Optimized images** - Automatically uses Next.js `<Image>` if you provide backgroundImage
|
|
279
|
+
- **No layout shift** - Proper aspect ratios and dimensions
|
|
280
|
+
- **Lazy background video** - Videos load only when above the fold
|
|
281
|
+
|
|
282
|
+
## SEO
|
|
283
|
+
|
|
284
|
+
- Uses proper `<h1>` tag for heading (should be one per page)
|
|
285
|
+
- Content is server-rendered for crawlers
|
|
286
|
+
- Structured content helps with featured snippets
|
|
287
|
+
|
|
288
|
+
**Tip:** Use unique, keyword-rich headings for each page's HeroSection.
|
|
289
|
+
|
|
290
|
+
## Common Patterns
|
|
291
|
+
|
|
292
|
+
### Homepage Hero
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
<HeroSection
|
|
296
|
+
heading="Transform Your Business"
|
|
297
|
+
description="Professional services that deliver results"
|
|
298
|
+
cta={{ text: 'Get Started', href: '/contact' }}
|
|
299
|
+
secondaryCTA={{ text: 'Learn More', href: '/about' }}
|
|
300
|
+
backgroundImage="/homepage-hero.jpg"
|
|
301
|
+
height="screen"
|
|
302
|
+
/>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Service Page Hero
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
<HeroSection
|
|
309
|
+
heading="Web Development Services"
|
|
310
|
+
description="Custom websites built for your business"
|
|
311
|
+
cta={{ text: 'Request Quote', href: '/quote' }}
|
|
312
|
+
variant="minimal"
|
|
313
|
+
/>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### About Page Hero
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
<HeroSection
|
|
320
|
+
heading="About Our Company"
|
|
321
|
+
description="Building the future since 2010"
|
|
322
|
+
variant="split"
|
|
323
|
+
backgroundImage="/team.jpg"
|
|
324
|
+
/>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Integration with Other Components
|
|
328
|
+
|
|
329
|
+
### With Breadcrumb
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
import { Breadcrumb, HeroSection } from '@zoyth/simple-site-framework';
|
|
333
|
+
|
|
334
|
+
<>
|
|
335
|
+
<Breadcrumb
|
|
336
|
+
items={[
|
|
337
|
+
{ label: 'Home', href: '/' },
|
|
338
|
+
{ label: 'Services', href: '/services' },
|
|
339
|
+
{ label: 'Web Development' }
|
|
340
|
+
]}
|
|
341
|
+
/>
|
|
342
|
+
<HeroSection heading="Web Development" variant="minimal" />
|
|
343
|
+
</>
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### With Analytics
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
import { HeroSection } from '@zoyth/simple-site-framework';
|
|
350
|
+
import { trackHeroView } from '@/lib/analytics';
|
|
351
|
+
|
|
352
|
+
export default function Page() {
|
|
353
|
+
useEffect(() => {
|
|
354
|
+
trackHeroView('homepage');
|
|
355
|
+
}, []);
|
|
356
|
+
|
|
357
|
+
return <HeroSection {...heroProps} />;
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Troubleshooting
|
|
362
|
+
|
|
363
|
+
### Background image not showing
|
|
364
|
+
|
|
365
|
+
**Check:**
|
|
366
|
+
1. Image path is correct (relative to `public/` folder)
|
|
367
|
+
2. Image file exists
|
|
368
|
+
3. Image is not blocked by content security policy
|
|
369
|
+
|
|
370
|
+
### CTA buttons not working
|
|
371
|
+
|
|
372
|
+
**Check:**
|
|
373
|
+
1. `href` is provided in CTA config
|
|
374
|
+
2. Link is not disabled by parent component
|
|
375
|
+
3. No z-index conflicts with overlay
|
|
376
|
+
|
|
377
|
+
### Text hard to read over background
|
|
378
|
+
|
|
379
|
+
**Solution:**
|
|
380
|
+
- Increase `overlayOpacity`: `overlayOpacity={0.7}`
|
|
381
|
+
- Use darker background image
|
|
382
|
+
- Add custom text shadow: `className="[&_h1]:drop-shadow-lg"`
|
|
383
|
+
|
|
384
|
+
### TypeScript errors with LocalizedString
|
|
385
|
+
|
|
386
|
+
**Solution:**
|
|
387
|
+
```typescript
|
|
388
|
+
import type { LocalizedString } from '@zoyth/simple-site-framework';
|
|
389
|
+
|
|
390
|
+
const heading: LocalizedString = {
|
|
391
|
+
en: 'Welcome',
|
|
392
|
+
fr: 'Bienvenue'
|
|
393
|
+
};
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Related Components
|
|
397
|
+
|
|
398
|
+
- **[CTASection](./CTASection.md)** - Mid-page or end-page CTA
|
|
399
|
+
- **[AboutSection](./AboutSection.md)** - Company information
|
|
400
|
+
- **[Breadcrumb](../ui/Breadcrumb.md)** - Navigation breadcrumb
|
|
401
|
+
|
|
402
|
+
## API Reference
|
|
403
|
+
|
|
404
|
+
Full TypeScript definitions: **[API Reference](../../api/components.md#herosection)**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# LogosSection
|
|
2
|
+
|
|
3
|
+
Client/partner logo showcase section.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { LogosSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<LogosSection
|
|
17
|
+
heading="Trusted by Leading Companies"
|
|
18
|
+
logos={[
|
|
19
|
+
{ name: 'Acme Corp', src: '/logos/acme.png' },
|
|
20
|
+
{ name: 'Tech Inc', src: '/logos/tech.png' },
|
|
21
|
+
{ name: 'Global Ltd', src: '/logos/global.png' },
|
|
22
|
+
]}
|
|
23
|
+
/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
| Prop | Type | Required | Description |
|
|
29
|
+
|------|------|----------|-------------|
|
|
30
|
+
| `heading` | `string \| LocalizedString` | No | Section heading |
|
|
31
|
+
| `logos` | `Logo[]` | Yes | Logo items |
|
|
32
|
+
| `grayscale` | `boolean` | No | Show logos in grayscale |
|
|
33
|
+
| `className` | `string` | No | Custom classes |
|
|
34
|
+
| `locale` | `string` | No | Current locale |
|
|
35
|
+
|
|
36
|
+
### Logo
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Required | Description |
|
|
39
|
+
|------|------|----------|-------------|
|
|
40
|
+
| `name` | `string` | Yes | Company name (for alt text) |
|
|
41
|
+
| `src` | `string` | Yes | Logo image URL |
|
|
42
|
+
| `href` | `string` | No | Link URL |
|
|
43
|
+
|
|
44
|
+
## See Also
|
|
45
|
+
|
|
46
|
+
- [TrustBadges](../TrustBadges.md)
|
|
47
|
+
- [TestimonialSection](./TestimonialSection.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# PersonalTaxesSection
|
|
2
|
+
|
|
3
|
+
Industry-specific section for personal tax services.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { PersonalTaxesSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Note
|
|
14
|
+
|
|
15
|
+
This is a specialized, industry-specific component. For general use, consider:
|
|
16
|
+
- [ServicesSection](./ServicesSection.md)
|
|
17
|
+
- [FeatureSection](./FeatureSection.md)
|
|
18
|
+
- [FeaturesGrid](../FeaturesGrid.md)
|
|
19
|
+
|
|
20
|
+
## See Also
|
|
21
|
+
|
|
22
|
+
- [ServicesSection](./ServicesSection.md)
|
|
23
|
+
- [ServicePageLayout](./ServicePageLayout.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# RecruitingSection
|
|
2
|
+
|
|
3
|
+
Industry-specific section for recruiting services.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { RecruitingSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Note
|
|
14
|
+
|
|
15
|
+
This is a specialized, industry-specific component. For general use, consider:
|
|
16
|
+
- [ServicesSection](./ServicesSection.md)
|
|
17
|
+
- [FeatureSection](./FeatureSection.md)
|
|
18
|
+
- [CTASection](./CTASection.md)
|
|
19
|
+
|
|
20
|
+
## See Also
|
|
21
|
+
|
|
22
|
+
- [ServicesSection](./ServicesSection.md)
|
|
23
|
+
- [ServicePageLayout](./ServicePageLayout.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SecurePortalSection
|
|
2
|
+
|
|
3
|
+
Industry-specific section for secure portal features.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { SecurePortalSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Note
|
|
14
|
+
|
|
15
|
+
This is a specialized, industry-specific component. For general use, consider:
|
|
16
|
+
- [FeatureSection](./FeatureSection.md)
|
|
17
|
+
- [FeaturesGrid](../FeaturesGrid.md)
|
|
18
|
+
- [TrustBadges](../TrustBadges.md)
|
|
19
|
+
|
|
20
|
+
## See Also
|
|
21
|
+
|
|
22
|
+
- [FeaturesGrid](../FeaturesGrid.md)
|
|
23
|
+
- [TrustBadges](../TrustBadges.md)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# ServicePageLayout
|
|
2
|
+
|
|
3
|
+
Complete layout for individual service pages.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { ServicePageLayout } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<ServicePageLayout
|
|
17
|
+
title="Web Development Services"
|
|
18
|
+
description="Custom websites built for your business"
|
|
19
|
+
features={[
|
|
20
|
+
'Responsive design',
|
|
21
|
+
'SEO optimized',
|
|
22
|
+
'Fast performance'
|
|
23
|
+
]}
|
|
24
|
+
benefits={[
|
|
25
|
+
'Increase conversions',
|
|
26
|
+
'Improve brand image',
|
|
27
|
+
'Reach more customers'
|
|
28
|
+
]}
|
|
29
|
+
cta={{
|
|
30
|
+
text: 'Request Quote',
|
|
31
|
+
href: '/quote'
|
|
32
|
+
}}
|
|
33
|
+
/>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Props
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Required | Description |
|
|
39
|
+
|------|------|----------|-------------|
|
|
40
|
+
| `title` | `string \| LocalizedString` | Yes | Service title |
|
|
41
|
+
| `description` | `string \| LocalizedString` | Yes | Service description |
|
|
42
|
+
| `features` | `string[]` | No | Service features |
|
|
43
|
+
| `benefits` | `string[]` | No | Service benefits |
|
|
44
|
+
| `cta` | `CTAConfig` | No | Call-to-action |
|
|
45
|
+
| `image` | `string` | No | Header image |
|
|
46
|
+
| `className` | `string` | No | Custom classes |
|
|
47
|
+
| `locale` | `string` | No | Current locale |
|
|
48
|
+
|
|
49
|
+
## See Also
|
|
50
|
+
|
|
51
|
+
- [ServicesSection](./ServicesSection.md)
|
|
52
|
+
- [HeroSection](./HeroSection.md)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# ServicesSection
|
|
2
|
+
|
|
3
|
+
Service offerings grid section.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { ServicesSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<ServicesSection
|
|
17
|
+
heading="Our Services"
|
|
18
|
+
services={[
|
|
19
|
+
{
|
|
20
|
+
title: 'Web Development',
|
|
21
|
+
description: 'Custom websites built for your business',
|
|
22
|
+
icon: 'code',
|
|
23
|
+
href: '/services/web',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Mobile Apps',
|
|
27
|
+
description: 'Native and cross-platform applications',
|
|
28
|
+
icon: 'mobile',
|
|
29
|
+
href: '/services/mobile',
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Prop | Type | Required | Description |
|
|
38
|
+
|------|------|----------|-------------|
|
|
39
|
+
| `heading` | `string \| LocalizedString` | Yes | Section heading |
|
|
40
|
+
| `description` | `string \| LocalizedString` | No | Section description |
|
|
41
|
+
| `services` | `Service[]` | Yes | Service items |
|
|
42
|
+
| `columns` | `number` | No | Grid columns (default: 3) |
|
|
43
|
+
| `className` | `string` | No | Custom classes |
|
|
44
|
+
| `locale` | `string` | No | Current locale |
|
|
45
|
+
|
|
46
|
+
## See Also
|
|
47
|
+
|
|
48
|
+
- [FeaturesGrid](../FeaturesGrid.md)
|
|
49
|
+
- [ServicePageLayout](./ServicePageLayout.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# TestimonialSection
|
|
2
|
+
|
|
3
|
+
Customer testimonials display section.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { TestimonialSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<TestimonialSection
|
|
17
|
+
heading="What Our Clients Say"
|
|
18
|
+
testimonials={[
|
|
19
|
+
{
|
|
20
|
+
quote: 'Working with this team transformed our business. Revenue increased 300%.',
|
|
21
|
+
author: 'Jane Smith',
|
|
22
|
+
role: 'CEO',
|
|
23
|
+
company: 'Tech Startup Inc',
|
|
24
|
+
image: '/testimonials/jane.jpg',
|
|
25
|
+
},
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Props
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Required | Description |
|
|
33
|
+
|------|------|----------|-------------|
|
|
34
|
+
| `heading` | `string \| LocalizedString` | Yes | Section heading |
|
|
35
|
+
| `description` | `string \| LocalizedString` | No | Section description |
|
|
36
|
+
| `testimonials` | `Testimonial[]` | Yes | Testimonial items |
|
|
37
|
+
| `variant` | `'grid' \| 'carousel'` | No | Display variant |
|
|
38
|
+
| `className` | `string` | No | Custom classes |
|
|
39
|
+
| `locale` | `string` | No | Current locale |
|
|
40
|
+
|
|
41
|
+
## See Also
|
|
42
|
+
|
|
43
|
+
- [TestimonialCarousel](../TestimonialCarousel.md)
|
|
44
|
+
- [LiveProof](../LiveProof.md)
|