@aws505/sheetsite 1.0.2 → 1.0.4
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 +185 -40
- package/dist/components/index.js +932 -60
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +916 -60
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.js +195 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +185 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +15 -0
- package/src/components/layout/Header.tsx +1 -0
- package/src/components/sections/BeforeAfter.tsx +345 -0
- package/src/components/sections/FAQ.tsx +3 -3
- package/src/components/sections/Gallery.tsx +104 -4
- package/src/components/sections/Hero.tsx +19 -3
- package/src/components/sections/Menu.tsx +312 -0
- package/src/components/sections/Services.tsx +3 -3
- package/src/components/sections/Testimonials.tsx +1 -1
- package/src/components/sections/TrustBadges.tsx +283 -0
- package/src/components/ui/AnimatedSection.tsx +136 -0
- package/src/components/ui/FloatingClaimBanner.tsx +160 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# SheetSite
|
|
2
2
|
|
|
3
|
-
**Build
|
|
3
|
+
**Build professional small business websites in minutes.**
|
|
4
4
|
|
|
5
|
-
SheetSite is a Next.js library
|
|
5
|
+
SheetSite is a Next.js component library providing pre-built, customizable components for small business websites. Designed for rapid development with AI assistance.
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ npx create-next-app@latest my-business-site
|
|
|
12
12
|
cd my-business-site
|
|
13
13
|
|
|
14
14
|
# Install SheetSite
|
|
15
|
-
npm install sheetsite
|
|
15
|
+
npm install @aws505/sheetsite
|
|
16
16
|
|
|
17
17
|
# Start developing
|
|
18
18
|
npm run dev
|
|
@@ -20,51 +20,65 @@ npm run dev
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **SEO
|
|
23
|
+
- **Pre-built Components**: Hero, Services, Gallery with Lightbox, Testimonials, FAQ, Hours, Menu, and more
|
|
24
|
+
- **Business-Type Specific Sections**: Menu for restaurants, Before/After gallery for tailors, Trust Badges for service businesses
|
|
25
|
+
- **Theme System**: CSS custom properties for easy brand customization
|
|
26
|
+
- **Scroll Animations**: Built-in scroll-triggered animations with `AnimatedSection`
|
|
27
|
+
- **SEO Ready**: Structured data support for local businesses
|
|
28
28
|
- **TypeScript**: Full type safety throughout
|
|
29
29
|
- **AI-Optimized**: Designed for rapid development with Claude Code
|
|
30
30
|
|
|
31
|
+
## Components
|
|
32
|
+
|
|
33
|
+
### Layout Components
|
|
34
|
+
- **Header** - Responsive navigation with mobile menu
|
|
35
|
+
- **Footer** - Footer with business info, hours, and social links
|
|
36
|
+
|
|
37
|
+
### Section Components
|
|
38
|
+
- **Hero** - Prominent hero section with CTA buttons
|
|
39
|
+
- **Services** - Grid, list, or minimal service display
|
|
40
|
+
- **Testimonials** - Customer reviews with ratings
|
|
41
|
+
- **FAQ** - Accordion, cards, or simple FAQ display
|
|
42
|
+
- **Hours** - Business hours with "Open Now" status
|
|
43
|
+
- **Gallery** - Image gallery with lightbox support
|
|
44
|
+
- **Menu** - Restaurant menu with categories and dietary badges
|
|
45
|
+
- **BeforeAfter** - Before/after comparison with slider
|
|
46
|
+
- **TrustBadges** - Certifications and affiliations display
|
|
47
|
+
|
|
48
|
+
### UI Components
|
|
49
|
+
- **Button** - Styled buttons and button links
|
|
50
|
+
- **Card** - Flexible card components
|
|
51
|
+
- **AnimatedSection** - Scroll-triggered animations
|
|
52
|
+
- **StaggerContainer** - Staggered child animations
|
|
53
|
+
- **Icons** - Common icon set
|
|
54
|
+
|
|
31
55
|
## Supported Business Types
|
|
32
56
|
|
|
33
57
|
- **Service**: Tailors, Shoe Repair, Dry Cleaners, Salons, Barbershops, Spas
|
|
34
|
-
- **Food**: Restaurants, Cafes, Bakeries, Food Trucks,
|
|
58
|
+
- **Food**: Restaurants, Cafes, Bakeries, Food Trucks, Catering
|
|
35
59
|
- **Retail**: Craft Sellers, Boutiques, Florists, Gift Shops
|
|
36
60
|
- **Home Services**: Cleaning, Landscaping, Handyman, Plumbers, Electricians
|
|
37
61
|
- **Auto**: Auto Repair, Auto Detail, Tire Shops
|
|
38
|
-
- **Professional**: Accountants, Lawyers, Real Estate,
|
|
39
|
-
- **Health**: Personal Trainers, Yoga Studios,
|
|
40
|
-
- **Creative**: Photography,
|
|
41
|
-
|
|
42
|
-
## Documentation
|
|
43
|
-
|
|
44
|
-
- [Quick Start Guide](./docs/QUICKSTART.md)
|
|
45
|
-
- [AI Development Guide](./docs/AI-DEVELOPMENT-GUIDE.md) - **Start here if using Claude Code**
|
|
46
|
-
- [Google Sheets Setup](./docs/GOOGLE-SHEETS-SETUP.md)
|
|
47
|
-
- [Business Type Reference](./docs/BUSINESS-TYPES.md)
|
|
48
|
-
- [Component Reference](./docs/COMPONENTS.md)
|
|
49
|
-
- [Customization Guide](./docs/CUSTOMIZATION.md)
|
|
62
|
+
- **Professional**: Accountants, Lawyers, Real Estate, Consulting
|
|
63
|
+
- **Health**: Personal Trainers, Yoga Studios, Massage Therapy
|
|
64
|
+
- **Creative**: Photography, Music Lessons, Event Planning
|
|
50
65
|
|
|
51
66
|
## Basic Usage
|
|
52
67
|
|
|
53
68
|
```tsx
|
|
54
69
|
// app/page.tsx
|
|
55
70
|
import {
|
|
56
|
-
getSiteData,
|
|
57
|
-
createSheetConfigFromEnv,
|
|
58
71
|
Hero,
|
|
59
72
|
Services,
|
|
60
73
|
Testimonials,
|
|
74
|
+
FAQ,
|
|
75
|
+
Hours,
|
|
61
76
|
Header,
|
|
62
77
|
Footer,
|
|
63
|
-
} from 'sheetsite';
|
|
78
|
+
} from '@aws505/sheetsite/components';
|
|
64
79
|
|
|
65
80
|
export default async function HomePage() {
|
|
66
|
-
const
|
|
67
|
-
const data = await getSiteData(config);
|
|
81
|
+
const data = await fetchSiteData(); // Your data fetching logic
|
|
68
82
|
|
|
69
83
|
return (
|
|
70
84
|
<>
|
|
@@ -73,6 +87,7 @@ export default async function HomePage() {
|
|
|
73
87
|
<Hero business={data.business} />
|
|
74
88
|
<Services services={data.services} />
|
|
75
89
|
<Testimonials testimonials={data.testimonials} />
|
|
90
|
+
<FAQ items={data.faq} />
|
|
76
91
|
</main>
|
|
77
92
|
<Footer business={data.business} hours={data.hours} />
|
|
78
93
|
</>
|
|
@@ -80,24 +95,154 @@ export default async function HomePage() {
|
|
|
80
95
|
}
|
|
81
96
|
```
|
|
82
97
|
|
|
83
|
-
##
|
|
98
|
+
## Business-Type Specific Components
|
|
99
|
+
|
|
100
|
+
### Restaurant Menu
|
|
101
|
+
```tsx
|
|
102
|
+
import { Menu } from '@aws505/sheetsite/components';
|
|
103
|
+
|
|
104
|
+
<Menu
|
|
105
|
+
items={menuItems}
|
|
106
|
+
title="Our Menu"
|
|
107
|
+
showCategories={true}
|
|
108
|
+
variant="cards" // or "list" or "compact"
|
|
109
|
+
/>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Before/After Gallery (Tailors, Home Services)
|
|
113
|
+
```tsx
|
|
114
|
+
import { BeforeAfter } from '@aws505/sheetsite/components';
|
|
115
|
+
|
|
116
|
+
<BeforeAfter
|
|
117
|
+
items={portfolioItems}
|
|
118
|
+
title="Our Work"
|
|
119
|
+
variant="slider" // or "side-by-side" or "stacked"
|
|
120
|
+
/>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Trust Badges (Auto Repair, Professional Services)
|
|
124
|
+
```tsx
|
|
125
|
+
import { TrustBadges } from '@aws505/sheetsite/components';
|
|
126
|
+
|
|
127
|
+
<TrustBadges
|
|
128
|
+
badges={certifications}
|
|
129
|
+
title="Certifications"
|
|
130
|
+
variant="grid" // or "inline" or "cards"
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Gallery with Lightbox
|
|
135
|
+
```tsx
|
|
136
|
+
import { Gallery } from '@aws505/sheetsite/components';
|
|
137
|
+
|
|
138
|
+
<Gallery
|
|
139
|
+
items={galleryItems}
|
|
140
|
+
enableLightbox={true}
|
|
141
|
+
columns={3}
|
|
142
|
+
/>
|
|
143
|
+
```
|
|
84
144
|
|
|
85
|
-
|
|
86
|
-
# Choose mode: "public_csv" or "private_api"
|
|
87
|
-
SHEET_MODE="public_csv"
|
|
145
|
+
## Scroll Animations
|
|
88
146
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
147
|
+
```tsx
|
|
148
|
+
import { AnimatedSection, StaggerContainer } from '@aws505/sheetsite/components';
|
|
149
|
+
|
|
150
|
+
// Single animated element
|
|
151
|
+
<AnimatedSection animation="fade-up" delay={200}>
|
|
152
|
+
<Card>Content here</Card>
|
|
153
|
+
</AnimatedSection>
|
|
154
|
+
|
|
155
|
+
// Staggered children
|
|
156
|
+
<StaggerContainer staggerDelay={100} animation="fade-up">
|
|
157
|
+
<Card>Item 1</Card>
|
|
158
|
+
<Card>Item 2</Card>
|
|
159
|
+
<Card>Item 3</Card>
|
|
160
|
+
</StaggerContainer>
|
|
161
|
+
```
|
|
93
162
|
|
|
94
|
-
|
|
95
|
-
SHEET_ID="your-sheet-id"
|
|
96
|
-
GOOGLE_SERVICE_ACCOUNT_EMAIL="..."
|
|
97
|
-
GOOGLE_PRIVATE_KEY="..."
|
|
163
|
+
Animation options: `fade-up`, `fade-down`, `fade-left`, `fade-right`, `zoom`, `none`
|
|
98
164
|
|
|
99
|
-
|
|
100
|
-
|
|
165
|
+
## Theming with CSS Custom Properties
|
|
166
|
+
|
|
167
|
+
Add these CSS variables to your `globals.css`:
|
|
168
|
+
|
|
169
|
+
```css
|
|
170
|
+
:root {
|
|
171
|
+
--color-primary-50: #fef2f2;
|
|
172
|
+
--color-primary-100: #fee2e2;
|
|
173
|
+
--color-primary-500: #ef4444;
|
|
174
|
+
--color-primary-600: #dc2626;
|
|
175
|
+
--color-primary-700: #b91c1c;
|
|
176
|
+
|
|
177
|
+
--color-accent-400: #facc15;
|
|
178
|
+
--color-accent-500: #eab308;
|
|
179
|
+
--color-accent-600: #ca8a04;
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Tailwind CSS Integration
|
|
184
|
+
|
|
185
|
+
Extend your `tailwind.config.js`:
|
|
186
|
+
|
|
187
|
+
```js
|
|
188
|
+
module.exports = {
|
|
189
|
+
theme: {
|
|
190
|
+
extend: {
|
|
191
|
+
colors: {
|
|
192
|
+
primary: {
|
|
193
|
+
50: 'var(--color-primary-50)',
|
|
194
|
+
100: 'var(--color-primary-100)',
|
|
195
|
+
500: 'var(--color-primary-500)',
|
|
196
|
+
600: 'var(--color-primary-600)',
|
|
197
|
+
700: 'var(--color-primary-700)',
|
|
198
|
+
},
|
|
199
|
+
accent: {
|
|
200
|
+
400: 'var(--color-accent-400)',
|
|
201
|
+
500: 'var(--color-accent-500)',
|
|
202
|
+
600: 'var(--color-accent-600)',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Anchor Links
|
|
211
|
+
|
|
212
|
+
All section components support the `id` prop and include `scroll-mt-20` for proper scrolling with sticky headers:
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
<Services id="services" services={services} />
|
|
216
|
+
<Testimonials id="reviews" testimonials={testimonials} />
|
|
217
|
+
<FAQ id="faq" items={faq} />
|
|
218
|
+
<Hours id="hours" hours={hours} />
|
|
219
|
+
<Gallery id="gallery" items={gallery} />
|
|
220
|
+
<Menu id="menu" items={menu} />
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Navigation automatically scrolls to these sections:
|
|
224
|
+
```tsx
|
|
225
|
+
<a href="/#services">Services</a>
|
|
226
|
+
<a href="/#reviews">Reviews</a>
|
|
227
|
+
<a href="/#faq">FAQ</a>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## TypeScript Types
|
|
231
|
+
|
|
232
|
+
All types are exported for use in your application:
|
|
233
|
+
|
|
234
|
+
```tsx
|
|
235
|
+
import type {
|
|
236
|
+
BusinessInfo,
|
|
237
|
+
Service,
|
|
238
|
+
Testimonial,
|
|
239
|
+
FAQItem,
|
|
240
|
+
HoursEntry,
|
|
241
|
+
GalleryItem,
|
|
242
|
+
MenuItem,
|
|
243
|
+
TrustBadge,
|
|
244
|
+
BeforeAfterItem,
|
|
245
|
+
} from '@aws505/sheetsite/data';
|
|
101
246
|
```
|
|
102
247
|
|
|
103
248
|
## License
|