@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,601 @@
|
|
|
1
|
+
# Footer
|
|
2
|
+
|
|
3
|
+
Site footer component with links, social media, and company information. The persistent bottom section of your site.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { Footer } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component (default export)
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<Footer
|
|
17
|
+
companyName="Acme Corporation"
|
|
18
|
+
tagline="Building the future"
|
|
19
|
+
sections={[
|
|
20
|
+
{
|
|
21
|
+
title: 'Company',
|
|
22
|
+
links: [
|
|
23
|
+
{ label: 'About', href: '/about' },
|
|
24
|
+
{ label: 'Careers', href: '/careers' },
|
|
25
|
+
{ label: 'Contact', href: '/contact' },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
### Required Props
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Description |
|
|
37
|
+
|------|------|-------------|
|
|
38
|
+
| `companyName` | `string \| LocalizedString` | Company/site name |
|
|
39
|
+
|
|
40
|
+
### Optional Props
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default | Description |
|
|
43
|
+
|------|------|---------|-------------|
|
|
44
|
+
| `tagline` | `string \| LocalizedString` | - | Company tagline/slogan |
|
|
45
|
+
| `sections` | `FooterSection[]` | - | Footer link sections |
|
|
46
|
+
| `socialLinks` | `SocialLink[]` | - | Social media links |
|
|
47
|
+
| `legalLinks` | `LegalLink[]` | - | Legal/policy links |
|
|
48
|
+
| `copyright` | `string \| LocalizedString` | Auto | Copyright notice |
|
|
49
|
+
| `showCopyright` | `boolean` | `true` | Show copyright text |
|
|
50
|
+
| `maxWidth` | `MaxWidth` | `'7xl'` | Maximum content width |
|
|
51
|
+
| `className` | `string` | - | Custom CSS classes |
|
|
52
|
+
| `locale` | `string` | - | Current locale |
|
|
53
|
+
|
|
54
|
+
### Type Definitions
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
interface FooterSection {
|
|
58
|
+
title: string | LocalizedString;
|
|
59
|
+
links: FooterLink[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface FooterLink {
|
|
63
|
+
label: string | LocalizedString;
|
|
64
|
+
href: string;
|
|
65
|
+
external?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface SocialLink {
|
|
69
|
+
platform: 'twitter' | 'facebook' | 'linkedin' | 'instagram' | 'youtube' | 'github';
|
|
70
|
+
url: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface LegalLink {
|
|
74
|
+
label: string | LocalizedString;
|
|
75
|
+
href: string;
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
### Simple Footer
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
<Footer
|
|
85
|
+
companyName="Acme Corp"
|
|
86
|
+
tagline="Innovation through technology"
|
|
87
|
+
sections={[
|
|
88
|
+
{
|
|
89
|
+
title: 'Company',
|
|
90
|
+
links: [
|
|
91
|
+
{ label: 'About', href: '/about' },
|
|
92
|
+
{ label: 'Contact', href: '/contact' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
]}
|
|
96
|
+
/>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### With Multiple Sections
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
<Footer
|
|
103
|
+
companyName="Acme Corp"
|
|
104
|
+
tagline="Building the future"
|
|
105
|
+
sections={[
|
|
106
|
+
{
|
|
107
|
+
title: 'Product',
|
|
108
|
+
links: [
|
|
109
|
+
{ label: 'Features', href: '/features' },
|
|
110
|
+
{ label: 'Pricing', href: '/pricing' },
|
|
111
|
+
{ label: 'FAQ', href: '/faq' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: 'Company',
|
|
116
|
+
links: [
|
|
117
|
+
{ label: 'About', href: '/about' },
|
|
118
|
+
{ label: 'Careers', href: '/careers' },
|
|
119
|
+
{ label: 'Contact', href: '/contact' },
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: 'Resources',
|
|
124
|
+
links: [
|
|
125
|
+
{ label: 'Blog', href: '/blog' },
|
|
126
|
+
{ label: 'Documentation', href: '/docs' },
|
|
127
|
+
{ label: 'Support', href: '/support' },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
]}
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### With Social Links
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
<Footer
|
|
138
|
+
companyName="Acme Corp"
|
|
139
|
+
socialLinks={[
|
|
140
|
+
{ platform: 'twitter', url: 'https://twitter.com/acmecorp' },
|
|
141
|
+
{ platform: 'linkedin', url: 'https://linkedin.com/company/acmecorp' },
|
|
142
|
+
{ platform: 'github', url: 'https://github.com/acmecorp' },
|
|
143
|
+
]}
|
|
144
|
+
sections={[
|
|
145
|
+
{
|
|
146
|
+
title: 'Company',
|
|
147
|
+
links: [
|
|
148
|
+
{ label: 'About', href: '/about' },
|
|
149
|
+
{ label: 'Contact', href: '/contact' },
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
]}
|
|
153
|
+
/>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### With Legal Links
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
<Footer
|
|
160
|
+
companyName="Acme Corp"
|
|
161
|
+
legalLinks={[
|
|
162
|
+
{ label: 'Privacy Policy', href: '/privacy' },
|
|
163
|
+
{ label: 'Terms of Service', href: '/terms' },
|
|
164
|
+
{ label: 'Cookie Policy', href: '/cookies' },
|
|
165
|
+
]}
|
|
166
|
+
sections={[
|
|
167
|
+
{
|
|
168
|
+
title: 'Company',
|
|
169
|
+
links: [
|
|
170
|
+
{ label: 'About', href: '/about' },
|
|
171
|
+
{ label: 'Contact', href: '/contact' },
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
]}
|
|
175
|
+
/>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Complete Footer
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
<Footer
|
|
182
|
+
companyName="Acme Corporation"
|
|
183
|
+
tagline="Innovation through technology"
|
|
184
|
+
sections={[
|
|
185
|
+
{
|
|
186
|
+
title: 'Product',
|
|
187
|
+
links: [
|
|
188
|
+
{ label: 'Features', href: '/features' },
|
|
189
|
+
{ label: 'Pricing', href: '/pricing' },
|
|
190
|
+
{ label: 'Updates', href: '/updates' },
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
title: 'Company',
|
|
195
|
+
links: [
|
|
196
|
+
{ label: 'About', href: '/about' },
|
|
197
|
+
{ label: 'Careers', href: '/careers' },
|
|
198
|
+
{ label: 'Press', href: '/press' },
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: 'Resources',
|
|
203
|
+
links: [
|
|
204
|
+
{ label: 'Blog', href: '/blog' },
|
|
205
|
+
{ label: 'Documentation', href: '/docs' },
|
|
206
|
+
{ label: 'Support', href: '/support' },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
title: 'Legal',
|
|
211
|
+
links: [
|
|
212
|
+
{ label: 'Privacy', href: '/privacy' },
|
|
213
|
+
{ label: 'Terms', href: '/terms' },
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
]}
|
|
217
|
+
socialLinks={[
|
|
218
|
+
{ platform: 'twitter', url: 'https://twitter.com/acmecorp' },
|
|
219
|
+
{ platform: 'linkedin', url: 'https://linkedin.com/company/acmecorp' },
|
|
220
|
+
{ platform: 'github', url: 'https://github.com/acmecorp' },
|
|
221
|
+
]}
|
|
222
|
+
/>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Multi-Language Footer
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
<Footer
|
|
229
|
+
companyName="Acme Corp"
|
|
230
|
+
tagline={{
|
|
231
|
+
en: 'Innovation through technology',
|
|
232
|
+
fr: 'Innovation par la technologie',
|
|
233
|
+
es: 'Innovación a través de la tecnología',
|
|
234
|
+
}}
|
|
235
|
+
sections={[
|
|
236
|
+
{
|
|
237
|
+
title: { en: 'Company', fr: 'Entreprise', es: 'Empresa' },
|
|
238
|
+
links: [
|
|
239
|
+
{
|
|
240
|
+
label: { en: 'About', fr: 'À propos', es: 'Acerca de' },
|
|
241
|
+
href: '/about',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: { en: 'Contact', fr: 'Contact', es: 'Contacto' },
|
|
245
|
+
href: '/contact',
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
]}
|
|
250
|
+
legalLinks={[
|
|
251
|
+
{
|
|
252
|
+
label: { en: 'Privacy Policy', fr: 'Politique de confidentialité', es: 'Política de privacidad' },
|
|
253
|
+
href: '/privacy',
|
|
254
|
+
},
|
|
255
|
+
]}
|
|
256
|
+
locale={locale}
|
|
257
|
+
/>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Custom Copyright
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
<Footer
|
|
264
|
+
companyName="Acme Corp"
|
|
265
|
+
copyright="© 2024 Acme Corporation. All rights reserved."
|
|
266
|
+
sections={sections}
|
|
267
|
+
/>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Without Copyright
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
<Footer
|
|
274
|
+
companyName="Acme Corp"
|
|
275
|
+
showCopyright={false}
|
|
276
|
+
sections={sections}
|
|
277
|
+
/>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### External Links
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
<Footer
|
|
284
|
+
companyName="Acme Corp"
|
|
285
|
+
sections={[
|
|
286
|
+
{
|
|
287
|
+
title: 'Community',
|
|
288
|
+
links: [
|
|
289
|
+
{
|
|
290
|
+
label: 'GitHub',
|
|
291
|
+
href: 'https://github.com/acmecorp',
|
|
292
|
+
external: true,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: 'Discord',
|
|
296
|
+
href: 'https://discord.gg/acmecorp',
|
|
297
|
+
external: true,
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
},
|
|
301
|
+
]}
|
|
302
|
+
/>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Styling
|
|
306
|
+
|
|
307
|
+
### Custom Background
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
<Footer
|
|
311
|
+
companyName="Acme Corp"
|
|
312
|
+
sections={sections}
|
|
313
|
+
className="bg-gradient-to-r from-gray-900 to-black text-white"
|
|
314
|
+
/>
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Custom Layout
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
<Footer
|
|
321
|
+
companyName="Acme Corp"
|
|
322
|
+
sections={sections}
|
|
323
|
+
className="grid-cols-1 md:grid-cols-4" // Custom column layout
|
|
324
|
+
/>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Compact Footer
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
<Footer
|
|
331
|
+
companyName="Acme Corp"
|
|
332
|
+
sections={sections}
|
|
333
|
+
className="py-8" // Reduced padding
|
|
334
|
+
/>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Dark Mode
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
<Footer
|
|
341
|
+
companyName="Acme Corp"
|
|
342
|
+
sections={sections}
|
|
343
|
+
className="dark:bg-gray-900 dark:text-white"
|
|
344
|
+
/>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Accessibility
|
|
348
|
+
|
|
349
|
+
Footer includes:
|
|
350
|
+
|
|
351
|
+
- ✅ Semantic `<footer>` element
|
|
352
|
+
- ✅ Proper heading hierarchy for section titles
|
|
353
|
+
- ✅ Keyboard navigable links
|
|
354
|
+
- ✅ ARIA labels for social media icons
|
|
355
|
+
- ✅ External link indicators
|
|
356
|
+
- ✅ Screen reader friendly
|
|
357
|
+
- ✅ Sufficient color contrast
|
|
358
|
+
|
|
359
|
+
### External Link Accessibility
|
|
360
|
+
|
|
361
|
+
```typescript
|
|
362
|
+
// External links automatically include:
|
|
363
|
+
<a
|
|
364
|
+
href="https://external-site.com"
|
|
365
|
+
target="_blank"
|
|
366
|
+
rel="noopener noreferrer"
|
|
367
|
+
aria-label="Opens in new tab"
|
|
368
|
+
>
|
|
369
|
+
External Link
|
|
370
|
+
</a>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Common Patterns
|
|
374
|
+
|
|
375
|
+
### Site-Wide Footer
|
|
376
|
+
|
|
377
|
+
```typescript
|
|
378
|
+
// src/app/layout.tsx
|
|
379
|
+
import { Footer } from '@zoyth/simple-site-framework';
|
|
380
|
+
import { footerConfig } from '@/config/footer';
|
|
381
|
+
|
|
382
|
+
export default function RootLayout({ children }) {
|
|
383
|
+
return (
|
|
384
|
+
<html>
|
|
385
|
+
<body>
|
|
386
|
+
{children}
|
|
387
|
+
<Footer {...footerConfig} />
|
|
388
|
+
</body>
|
|
389
|
+
</html>
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Newsletter Signup Footer
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
<Footer
|
|
398
|
+
companyName="Acme Corp"
|
|
399
|
+
sections={sections}
|
|
400
|
+
>
|
|
401
|
+
<div className="mb-8">
|
|
402
|
+
<h3 className="text-lg font-bold mb-4">Subscribe to Our Newsletter</h3>
|
|
403
|
+
<form className="flex gap-4">
|
|
404
|
+
<input
|
|
405
|
+
type="email"
|
|
406
|
+
placeholder="your@email.com"
|
|
407
|
+
className="flex-1 px-4 py-2 border rounded-lg"
|
|
408
|
+
/>
|
|
409
|
+
<Button type="submit">Subscribe</Button>
|
|
410
|
+
</form>
|
|
411
|
+
</div>
|
|
412
|
+
</Footer>
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Footer with Logo
|
|
416
|
+
|
|
417
|
+
```typescript
|
|
418
|
+
<Footer
|
|
419
|
+
companyName="Acme Corp"
|
|
420
|
+
sections={sections}
|
|
421
|
+
>
|
|
422
|
+
<img
|
|
423
|
+
src="/logo.svg"
|
|
424
|
+
alt="Acme Corp"
|
|
425
|
+
width={120}
|
|
426
|
+
height={32}
|
|
427
|
+
className="mb-4"
|
|
428
|
+
/>
|
|
429
|
+
</Footer>
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Contact Information Footer
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
<Footer
|
|
436
|
+
companyName="Acme Corp"
|
|
437
|
+
tagline="We're here to help"
|
|
438
|
+
sections={sections}
|
|
439
|
+
>
|
|
440
|
+
<div className="space-y-2">
|
|
441
|
+
<p>📧 contact@acmecorp.com</p>
|
|
442
|
+
<p>📞 +1 (555) 123-4567</p>
|
|
443
|
+
<p>📍 123 Main St, San Francisco, CA 94105</p>
|
|
444
|
+
</div>
|
|
445
|
+
</Footer>
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
## Configuration Pattern
|
|
449
|
+
|
|
450
|
+
Centralize footer configuration:
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
// src/config/footer.ts
|
|
454
|
+
import type { FooterProps } from '@zoyth/simple-site-framework';
|
|
455
|
+
|
|
456
|
+
export const footerConfig: FooterProps = {
|
|
457
|
+
companyName: 'Acme Corporation',
|
|
458
|
+
tagline: 'Innovation through technology',
|
|
459
|
+
sections: [
|
|
460
|
+
{
|
|
461
|
+
title: 'Product',
|
|
462
|
+
links: [
|
|
463
|
+
{ label: 'Features', href: '/features' },
|
|
464
|
+
{ label: 'Pricing', href: '/pricing' },
|
|
465
|
+
{ label: 'FAQ', href: '/faq' },
|
|
466
|
+
],
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
title: 'Company',
|
|
470
|
+
links: [
|
|
471
|
+
{ label: 'About', href: '/about' },
|
|
472
|
+
{ label: 'Careers', href: '/careers' },
|
|
473
|
+
{ label: 'Contact', href: '/contact' },
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
title: 'Resources',
|
|
478
|
+
links: [
|
|
479
|
+
{ label: 'Blog', href: '/blog' },
|
|
480
|
+
{ label: 'Documentation', href: '/docs' },
|
|
481
|
+
{ label: 'Support', href: '/support' },
|
|
482
|
+
],
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
socialLinks: [
|
|
486
|
+
{ platform: 'twitter', url: 'https://twitter.com/acmecorp' },
|
|
487
|
+
{ platform: 'linkedin', url: 'https://linkedin.com/company/acmecorp' },
|
|
488
|
+
{ platform: 'github', url: 'https://github.com/acmecorp' },
|
|
489
|
+
],
|
|
490
|
+
legalLinks: [
|
|
491
|
+
{ label: 'Privacy Policy', href: '/privacy' },
|
|
492
|
+
{ label: 'Terms of Service', href: '/terms' },
|
|
493
|
+
],
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
// Use in layout
|
|
497
|
+
import { footerConfig } from '@/config/footer';
|
|
498
|
+
|
|
499
|
+
<Footer {...footerConfig} />
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## Best Practices
|
|
503
|
+
|
|
504
|
+
### ✅ Do
|
|
505
|
+
|
|
506
|
+
- Include essential links (About, Contact, Legal)
|
|
507
|
+
- Group related links in sections
|
|
508
|
+
- Make social icons easily identifiable
|
|
509
|
+
- Use descriptive link text
|
|
510
|
+
- Include copyright notice
|
|
511
|
+
- Link to privacy policy and terms
|
|
512
|
+
- Test keyboard navigation
|
|
513
|
+
|
|
514
|
+
### ❌ Don't
|
|
515
|
+
|
|
516
|
+
- Overcrowd with too many links
|
|
517
|
+
- Use tiny text (accessibility issue)
|
|
518
|
+
- Forget legal links (privacy, terms)
|
|
519
|
+
- Make social icons too small to click
|
|
520
|
+
- Hide important pages in footer only
|
|
521
|
+
- Use link text like "Click Here"
|
|
522
|
+
- Forget to update copyright year
|
|
523
|
+
|
|
524
|
+
## SEO
|
|
525
|
+
|
|
526
|
+
- Uses semantic `<footer>` tag
|
|
527
|
+
- Provides site structure for crawlers
|
|
528
|
+
- Links improve internal linking
|
|
529
|
+
- Copyright establishes ownership
|
|
530
|
+
|
|
531
|
+
### Structured Data
|
|
532
|
+
|
|
533
|
+
Add organization schema to footer:
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
<Footer {...footerConfig}>
|
|
537
|
+
<script type="application/ld+json">
|
|
538
|
+
{JSON.stringify({
|
|
539
|
+
"@context": "https://schema.org",
|
|
540
|
+
"@type": "Organization",
|
|
541
|
+
"name": "Acme Corporation",
|
|
542
|
+
"url": "https://acmecorp.com",
|
|
543
|
+
"logo": "https://acmecorp.com/logo.svg",
|
|
544
|
+
"sameAs": [
|
|
545
|
+
"https://twitter.com/acmecorp",
|
|
546
|
+
"https://linkedin.com/company/acmecorp"
|
|
547
|
+
]
|
|
548
|
+
})}
|
|
549
|
+
</script>
|
|
550
|
+
</Footer>
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
## Performance
|
|
554
|
+
|
|
555
|
+
- Server component by default (no JavaScript)
|
|
556
|
+
- Minimal CSS bundle
|
|
557
|
+
- Lazy-loaded social icons
|
|
558
|
+
- Optimized images if logo included
|
|
559
|
+
|
|
560
|
+
## Troubleshooting
|
|
561
|
+
|
|
562
|
+
### Links not working
|
|
563
|
+
|
|
564
|
+
**Check:**
|
|
565
|
+
1. `href` is provided for each link
|
|
566
|
+
2. Paths are correct
|
|
567
|
+
3. No typos in URLs
|
|
568
|
+
4. External links have proper `http://` or `https://`
|
|
569
|
+
|
|
570
|
+
### Social icons not displaying
|
|
571
|
+
|
|
572
|
+
**Check:**
|
|
573
|
+
1. Platform names are correct (lowercase)
|
|
574
|
+
2. URLs are valid
|
|
575
|
+
3. Icons are imported/available
|
|
576
|
+
4. CSS not hiding icons
|
|
577
|
+
|
|
578
|
+
### Copyright year wrong
|
|
579
|
+
|
|
580
|
+
**Check:**
|
|
581
|
+
1. Using auto-generated copyright (default)
|
|
582
|
+
2. Or provide custom copyright with current year
|
|
583
|
+
3. Server renders correct date
|
|
584
|
+
|
|
585
|
+
### Layout breaking on mobile
|
|
586
|
+
|
|
587
|
+
**Check:**
|
|
588
|
+
1. Using responsive grid classes
|
|
589
|
+
2. Text is wrapping properly
|
|
590
|
+
3. Icons are not too large
|
|
591
|
+
4. Adequate spacing between sections
|
|
592
|
+
|
|
593
|
+
## Related Components
|
|
594
|
+
|
|
595
|
+
- **[Header](./Header.md)** - Site header
|
|
596
|
+
- **[LanguageSelector](./LanguageSelector.md)** - Language switcher
|
|
597
|
+
- **[Button](../ui/Button.md)** - CTA buttons in footer
|
|
598
|
+
|
|
599
|
+
## API Reference
|
|
600
|
+
|
|
601
|
+
Full TypeScript definitions: **[API Reference](../../api/components.md#footer)**
|