oneie 3.5.0 → 3.6.3
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/.claude/agents/agent-director.md +902 -22
- package/.claude/agents/agent-onboard-example-output.md +600 -0
- package/.claude/agents/agent-onboard.md +576 -0
- package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
- package/.claude/commands/deploy.md +77 -150
- package/.claude/commands/one.md +375 -5
- package/.claude/commands/release.md +64 -3
- package/.mcp.json +57 -0
- package/CLAUDE.md +55 -69
- package/CREATE-WEBSITE.md +442 -0
- package/SECURITY.md +31 -0
- package/TESTING-ONBOARDING.md +185 -0
- package/dist/commands/create-website.d.ts +19 -0
- package/dist/commands/create-website.d.ts.map +1 -0
- package/dist/commands/create-website.js +231 -0
- package/dist/commands/create-website.js.map +1 -0
- package/dist/commands/init.d.ts +5 -6
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +213 -103
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/installation-setup.d.ts +24 -1
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +85 -1
- package/dist/utils/installation-setup.js.map +1 -1
- package/dist/utils/launch-claude.d.ts +6 -0
- package/dist/utils/launch-claude.d.ts.map +1 -0
- package/dist/utils/launch-claude.js +51 -0
- package/dist/utils/launch-claude.js.map +1 -0
- package/dist/utils/validation.d.ts +48 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +73 -0
- package/dist/utils/validation.js.map +1 -0
- package/folders.yaml +1 -1
- package/one/.obsidian/core-plugins.json +33 -0
- package/one/.obsidian/workspace.json +20 -20
- package/one/connections/workflow-onboarding.md +683 -0
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
- package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
- package/one/events/DEPLOYMENT.md +178 -0
- package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
- package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
- package/one/events/HANDOFF.md +313 -0
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
- package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
- package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
- package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
- package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
- package/one/events/SHOP-BUILD-STATUS.md +114 -0
- package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
- package/one/events/agent-director-enhancement-summary.md +386 -0
- package/one/events/agent-onboard-implementation-summary.md +457 -0
- package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
- package/one/events/landing-page-generator.md +458 -0
- package/one/events/onboarding-implementation-complete.md +505 -0
- package/one/events/release.md +254 -0
- package/one/events/separate-implementation-status.md +537 -0
- package/one/knowledge/100-inference-quick-reference.md +431 -0
- package/one/knowledge/agent-onboard-usage.md +612 -0
- package/one/knowledge/cli-claude-handoff.md +718 -0
- package/one/knowledge/ontology-blog.yaml +31 -0
- package/one/knowledge/ontology-cheatsheet.md +591 -0
- package/one/knowledge/ontology-community.yaml +42 -0
- package/one/knowledge/ontology-core-universal.md +722 -0
- package/one/knowledge/ontology-core.yaml +50 -0
- package/one/knowledge/ontology-courses.yaml +53 -0
- package/one/knowledge/ontology-creator.md +376 -0
- package/one/knowledge/ontology-developer-guide.md +789 -0
- package/one/knowledge/ontology-education.md +920 -0
- package/one/knowledge/ontology-index.md +354 -0
- package/one/knowledge/ontology-migration-guide.md +811 -0
- package/one/knowledge/ontology-minimal.yaml +1 -1
- package/one/knowledge/ontology-portfolio.yaml +31 -0
- package/one/knowledge/ontology-quickstart.md +576 -0
- package/one/knowledge/ontology-shop.yaml +121 -0
- package/one/knowledge/ontology-tokens.yaml +32 -0
- package/one/knowledge/ontology-tutorial.md +434 -0
- package/one/knowledge/ontology-video-script.md +890 -0
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
- package/one/things/docs/ecommerce/QUICK-START.md +368 -0
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
- package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
- package/one/things/docs/ecommerce/demo.astro +309 -0
- package/one/things/plans/agent-director-100-inference-plans.md +410 -0
- package/one/things/plans/dual-website-strategy.md +612 -0
- package/one/things/plans/feature-based-sites.md +821 -0
- package/one/things/plans/multi-ontology-architecture.md +836 -0
- package/one/things/plans/onboarding.md +32 -0
- package/one/things/plans/separate.md +15 -17
- package/one/things/plans/start-new.md +738 -0
- package/package.json +7 -2
- package/one/things/claude/hooks/agent-hook-manager.js +0 -525
- package/one/things/claude/hooks/agent-load-balancer.js +0 -271
- package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
- package/one/things/claude/hooks/cascade-feedback.js +0 -297
- package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
- package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
- package/one/things/claude/hooks/file-organization-engine.js +0 -427
- package/one/things/claude/hooks/file-organization-monitor.js +0 -269
- package/one/things/claude/hooks/hook-config-manager.js +0 -202
- package/one/things/claude/hooks/hook-orchestrator.js +0 -662
- package/one/things/claude/hooks/hook-performance-report.js +0 -120
- package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
- package/one/things/claude/hooks/memory-optimizer.js +0 -510
- package/one/things/claude/hooks/ontology-compliance.js +0 -394
- package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
- package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
- package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
- package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
- package/one/things/claude/hooks/simple-load-balancer.js +0 -238
- package/one/things/claude/hooks/startup-optimizer.js +0 -625
- package/one/things/claude/hooks/story-scoring-system.js +0 -445
- package/one/things/claude/hooks/story-validation-engine.js +0 -473
- package/one/things/claude/hooks/structure-synchronizer.js +0 -194
- package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
- package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
- package/one/things/claude/hooks/trinity-validation-system.js +0 -392
- package/one/things/plans/organizations-to-groups.md +0 -705
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Urgency Elements - Quick Reference Guide
|
|
2
|
+
|
|
3
|
+
## 🚀 Quick Start
|
|
4
|
+
|
|
5
|
+
### 1. Countdown Timer
|
|
6
|
+
```tsx
|
|
7
|
+
import { CountdownTimer } from '@/components/ecommerce/interactive/CountdownTimer';
|
|
8
|
+
|
|
9
|
+
<CountdownTimer
|
|
10
|
+
client:load
|
|
11
|
+
endDate={new Date('2025-12-31T23:59:59')}
|
|
12
|
+
label="Sale ends in"
|
|
13
|
+
size="md"
|
|
14
|
+
/>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Sizes:** `sm` | `md` | `lg`
|
|
18
|
+
**Urgency:** Turns red when < 1 hour remaining
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### 2. Viewers Counter
|
|
23
|
+
```tsx
|
|
24
|
+
import { ViewersCounter } from '@/components/ecommerce/interactive/ViewersCounter';
|
|
25
|
+
|
|
26
|
+
<ViewersCounter
|
|
27
|
+
client:load
|
|
28
|
+
productId="product-123"
|
|
29
|
+
size="sm"
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Default:** 2-15 random viewers, updates every 8s
|
|
34
|
+
**Sizes:** `sm` | `md` | `lg`
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 3. Social Proof Notifications
|
|
39
|
+
```tsx
|
|
40
|
+
import { SocialProofNotification } from '@/components/ecommerce/interactive/SocialProofNotification';
|
|
41
|
+
|
|
42
|
+
{/* Add once at layout/page level */}
|
|
43
|
+
<SocialProofNotification client:load />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Default:** Appears every 30-90s, auto-dismisses after 5s
|
|
47
|
+
**Location:** Bottom-right corner
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### 4. Low Stock Warning
|
|
52
|
+
```tsx
|
|
53
|
+
// Automatic in ProductCard component
|
|
54
|
+
// Just set inventory < 10 in product data
|
|
55
|
+
const product = {
|
|
56
|
+
...productData,
|
|
57
|
+
inventory: 5, // Shows "Only 5 left!" badge
|
|
58
|
+
inStock: true
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Triggers:** When `inventory < 10` and `inStock === true`
|
|
63
|
+
**Features:** Pulsing red badge + warning message
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 📊 Customization
|
|
68
|
+
|
|
69
|
+
### Countdown Timer Props
|
|
70
|
+
```typescript
|
|
71
|
+
interface CountdownTimerProps {
|
|
72
|
+
endDate: Date; // Required: Sale end date
|
|
73
|
+
label?: string; // Optional: "Sale ends in"
|
|
74
|
+
size?: 'sm'|'md'|'lg'; // Optional: "md"
|
|
75
|
+
onComplete?: () => void; // Optional: Callback when done
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Viewers Counter Props
|
|
80
|
+
```typescript
|
|
81
|
+
interface ViewersCounterProps {
|
|
82
|
+
productId: string; // Required: Unique ID
|
|
83
|
+
size?: 'sm'|'md'|'lg'; // Optional: "sm"
|
|
84
|
+
minViewers?: number; // Optional: 2
|
|
85
|
+
maxViewers?: number; // Optional: 15
|
|
86
|
+
updateInterval?: number; // Optional: 8000ms
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Social Proof Props
|
|
91
|
+
```typescript
|
|
92
|
+
interface SocialProofNotificationProps {
|
|
93
|
+
enabled?: boolean; // Optional: true
|
|
94
|
+
minInterval?: number; // Optional: 30000ms (30s)
|
|
95
|
+
maxInterval?: number; // Optional: 90000ms (90s)
|
|
96
|
+
duration?: number; // Optional: 5000ms (5s)
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 🎨 Styling
|
|
103
|
+
|
|
104
|
+
All components use Tailwind CSS and adapt to your theme:
|
|
105
|
+
|
|
106
|
+
**Light Mode:**
|
|
107
|
+
- Countdown: Foreground text, red when urgent
|
|
108
|
+
- Viewers: Primary eye icon, green pulse
|
|
109
|
+
- Social Proof: White background, green accents
|
|
110
|
+
- Low Stock: Red badge, orange warning
|
|
111
|
+
|
|
112
|
+
**Dark Mode:**
|
|
113
|
+
- Automatically adapts using `dark:` classes
|
|
114
|
+
- Maintains urgency colors for psychology
|
|
115
|
+
- Ensures readability in all contexts
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 📱 Responsive Behavior
|
|
120
|
+
|
|
121
|
+
**Mobile (< 640px):**
|
|
122
|
+
- Countdown: Smaller font, vertical stacking
|
|
123
|
+
- Viewers: Compact layout
|
|
124
|
+
- Social Proof: Full-width on mobile
|
|
125
|
+
- Low Stock: Same visibility
|
|
126
|
+
|
|
127
|
+
**Tablet (640px - 1024px):**
|
|
128
|
+
- All elements scale proportionally
|
|
129
|
+
- Touch-friendly sizing
|
|
130
|
+
|
|
131
|
+
**Desktop (> 1024px):**
|
|
132
|
+
- Full size and spacing
|
|
133
|
+
- Hover effects enabled
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 🎯 Best Practices
|
|
138
|
+
|
|
139
|
+
### Countdown Timers
|
|
140
|
+
✅ Use for flash sales, daily deals, limited offers
|
|
141
|
+
✅ Set realistic end times (24-48 hours works best)
|
|
142
|
+
✅ Place above the fold on sale pages
|
|
143
|
+
❌ Don't use multiple countdowns on same page
|
|
144
|
+
❌ Don't fake the countdown (always use real dates)
|
|
145
|
+
|
|
146
|
+
### Viewers Counter
|
|
147
|
+
✅ Use on product detail pages and popular items
|
|
148
|
+
✅ Set realistic ranges (2-15 for niche, 10-50 for popular)
|
|
149
|
+
✅ Place near product title or add-to-cart button
|
|
150
|
+
❌ Don't show on out-of-stock items
|
|
151
|
+
❌ Don't use same count across all products
|
|
152
|
+
|
|
153
|
+
### Social Proof
|
|
154
|
+
✅ Enable site-wide for consistent social proof
|
|
155
|
+
✅ Use realistic names, cities, and products
|
|
156
|
+
✅ Keep intervals random (30-90s feels natural)
|
|
157
|
+
❌ Don't show too frequently (< 20s feels spammy)
|
|
158
|
+
❌ Don't block important UI elements
|
|
159
|
+
|
|
160
|
+
### Low Stock
|
|
161
|
+
✅ Show when inventory < 10 units
|
|
162
|
+
✅ Update in real-time as stock depletes
|
|
163
|
+
✅ Combine with "hurry" copy for urgency
|
|
164
|
+
❌ Don't fake low stock warnings
|
|
165
|
+
❌ Don't show on pre-order items
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🔧 Implementation Checklist
|
|
170
|
+
|
|
171
|
+
- [ ] Install Framer Motion: `bun add framer-motion`
|
|
172
|
+
- [ ] Import components in your page/layout
|
|
173
|
+
- [ ] Add `client:load` directive for interactivity
|
|
174
|
+
- [ ] Set product inventory data (< 10 for warnings)
|
|
175
|
+
- [ ] Configure countdown end dates
|
|
176
|
+
- [ ] Test on mobile and desktop
|
|
177
|
+
- [ ] Verify dark mode styling
|
|
178
|
+
- [ ] Check performance (Lighthouse score)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 📈 Expected Impact
|
|
183
|
+
|
|
184
|
+
Based on ecommerce research:
|
|
185
|
+
|
|
186
|
+
**Countdown Timers:** +15-30% conversions
|
|
187
|
+
**Low Stock Warnings:** +20-40% sales
|
|
188
|
+
**Social Proof:** +15-25% conversions
|
|
189
|
+
**Viewers Counter:** +10-20% engagement
|
|
190
|
+
|
|
191
|
+
**Combined Effect:** +30-50% overall conversion improvement
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🐛 Troubleshooting
|
|
196
|
+
|
|
197
|
+
### Countdown not updating?
|
|
198
|
+
- Ensure `client:load` directive is present
|
|
199
|
+
- Check endDate is in the future
|
|
200
|
+
- Verify timezone settings
|
|
201
|
+
|
|
202
|
+
### Viewers count not changing?
|
|
203
|
+
- Counter updates every 8s by default
|
|
204
|
+
- Set custom `updateInterval` if needed
|
|
205
|
+
- Check React DevTools for component mount
|
|
206
|
+
|
|
207
|
+
### Social proof not appearing?
|
|
208
|
+
- Wait 5-15s after page load (initial delay)
|
|
209
|
+
- Check browser console for errors
|
|
210
|
+
- Ensure component is mounted once per page
|
|
211
|
+
|
|
212
|
+
### Low stock badge not showing?
|
|
213
|
+
- Verify `inventory < 10`
|
|
214
|
+
- Check `inStock === true`
|
|
215
|
+
- Ensure ProductCard is using latest version
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 📚 Related Documentation
|
|
220
|
+
|
|
221
|
+
- `/ecommerce/demo-urgency` - Live demo page
|
|
222
|
+
- `URGENCY-IMPLEMENTATION-SUMMARY.md` - Full technical details
|
|
223
|
+
- `ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md` - Research basis
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 💡 Pro Tips
|
|
228
|
+
|
|
229
|
+
1. **A/B Test:** Try different countdown durations (24h vs 48h)
|
|
230
|
+
2. **Timing:** Show social proof more frequently during peak hours
|
|
231
|
+
3. **Copy:** "Only X left" outperforms "Low stock"
|
|
232
|
+
4. **Position:** Place countdown above fold for max impact
|
|
233
|
+
5. **Color:** Red/orange urgency colors proven most effective
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
**Need Help?** Check the demo page: `/ecommerce/demo-urgency`
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Example Product Listing Page with Advanced Filtering & Search
|
|
4
|
+
* Demonstrates integration of FilterSidebar, ProductSearch, and SortDropdown
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import Layout from '@/layouts/Layout.astro';
|
|
8
|
+
import { FilterSidebar } from '@/components/ecommerce/interactive/FilterSidebar';
|
|
9
|
+
import { ProductSearch } from '@/components/ecommerce/interactive/ProductSearch';
|
|
10
|
+
import { SortDropdown } from '@/components/ecommerce/interactive/SortDropdown';
|
|
11
|
+
import { ProductGrid } from '@/components/ecommerce/static/ProductGrid';
|
|
12
|
+
|
|
13
|
+
// Mock data - Replace with actual database queries
|
|
14
|
+
const categories = [
|
|
15
|
+
{ id: 'electronics', name: 'Electronics', count: 24 },
|
|
16
|
+
{ id: 'clothing', name: 'Clothing', count: 56 },
|
|
17
|
+
{ id: 'home', name: 'Home & Garden', count: 32 },
|
|
18
|
+
{ id: 'sports', name: 'Sports & Outdoors', count: 18 },
|
|
19
|
+
{ id: 'books', name: 'Books', count: 42 },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const tags = ['Featured', 'New Arrival', 'Sale', 'Popular', 'Best Seller', 'Limited Edition'];
|
|
23
|
+
|
|
24
|
+
const products = [
|
|
25
|
+
{
|
|
26
|
+
id: '1',
|
|
27
|
+
slug: 'wireless-headphones',
|
|
28
|
+
name: 'Premium Wireless Headphones',
|
|
29
|
+
description: 'High-quality wireless headphones with noise cancellation',
|
|
30
|
+
price: 149.99,
|
|
31
|
+
compareAtPrice: 199.99,
|
|
32
|
+
images: ['/images/headphones-1.jpg', '/images/headphones-2.jpg'],
|
|
33
|
+
thumbnail: '/images/headphones-thumb.jpg',
|
|
34
|
+
category: 'electronics',
|
|
35
|
+
tags: ['Featured', 'Best Seller'],
|
|
36
|
+
inStock: true,
|
|
37
|
+
inventory: 42,
|
|
38
|
+
rating: 4.5,
|
|
39
|
+
reviewCount: 128,
|
|
40
|
+
featured: true,
|
|
41
|
+
createdAt: new Date('2024-01-15'),
|
|
42
|
+
updatedAt: new Date('2024-01-20'),
|
|
43
|
+
},
|
|
44
|
+
// Add more products...
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
const title = 'Shop All Products';
|
|
48
|
+
const description = 'Browse our complete collection of products with advanced filtering and search.';
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
<Layout title={title} description={description}>
|
|
52
|
+
<div class="container mx-auto px-4 py-8">
|
|
53
|
+
<!-- Page Header -->
|
|
54
|
+
<div class="mb-8">
|
|
55
|
+
<h1 class="text-3xl font-bold text-foreground mb-2">{title}</h1>
|
|
56
|
+
<p class="text-muted-foreground">{description}</p>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- Main Grid: Sidebar + Content -->
|
|
60
|
+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
|
61
|
+
|
|
62
|
+
<!-- Desktop Sidebar -->
|
|
63
|
+
<aside class="hidden lg:block">
|
|
64
|
+
<div class="sticky top-4">
|
|
65
|
+
<h2 class="text-lg font-semibold text-foreground mb-4">Filters</h2>
|
|
66
|
+
<FilterSidebar
|
|
67
|
+
client:load
|
|
68
|
+
categories={categories}
|
|
69
|
+
tags={tags}
|
|
70
|
+
minPrice={0}
|
|
71
|
+
maxPrice={500}
|
|
72
|
+
onFilterChange={(filters) => {
|
|
73
|
+
console.log('Filters changed:', filters);
|
|
74
|
+
// In production, this would update the product grid
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
</aside>
|
|
79
|
+
|
|
80
|
+
<!-- Main Content Area -->
|
|
81
|
+
<main class="lg:col-span-3">
|
|
82
|
+
|
|
83
|
+
<!-- Search Bar -->
|
|
84
|
+
<div class="mb-6">
|
|
85
|
+
<ProductSearch
|
|
86
|
+
client:load
|
|
87
|
+
products={products}
|
|
88
|
+
categories={categories}
|
|
89
|
+
placeholder="Search products by name, description, or tags..."
|
|
90
|
+
showResultsCount={true}
|
|
91
|
+
onSearchResults={(results) => {
|
|
92
|
+
console.log('Search results:', results);
|
|
93
|
+
// In production, this would update the product grid
|
|
94
|
+
}}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<!-- Toolbar: Mobile Filter + Sort -->
|
|
99
|
+
<div class="flex items-center justify-between mb-6 gap-4">
|
|
100
|
+
|
|
101
|
+
<!-- Mobile Filter Button (shows Sheet drawer) -->
|
|
102
|
+
<div class="lg:hidden flex-1">
|
|
103
|
+
<FilterSidebar
|
|
104
|
+
client:load
|
|
105
|
+
isMobile={true}
|
|
106
|
+
categories={categories}
|
|
107
|
+
tags={tags}
|
|
108
|
+
minPrice={0}
|
|
109
|
+
maxPrice={500}
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<!-- Sort Dropdown -->
|
|
114
|
+
<div class="flex-shrink-0">
|
|
115
|
+
<SortDropdown
|
|
116
|
+
client:load
|
|
117
|
+
value="newest"
|
|
118
|
+
persistPreference={true}
|
|
119
|
+
onChange={(sortBy) => {
|
|
120
|
+
console.log('Sort changed:', sortBy);
|
|
121
|
+
// In production, this would re-sort the product grid
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<!-- Product Count Info -->
|
|
128
|
+
<div class="mb-4 text-sm text-muted-foreground">
|
|
129
|
+
Showing <span class="font-medium text-foreground">{products.length}</span> products
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- Product Grid -->
|
|
133
|
+
<ProductGrid products={products} />
|
|
134
|
+
|
|
135
|
+
<!-- Pagination (Future Enhancement) -->
|
|
136
|
+
<div class="mt-8 flex justify-center">
|
|
137
|
+
<p class="text-sm text-muted-foreground">
|
|
138
|
+
More pagination controls would go here
|
|
139
|
+
</p>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
</main>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</Layout>
|
|
146
|
+
|
|
147
|
+
<style>
|
|
148
|
+
/* Additional custom styles if needed */
|
|
149
|
+
.sticky {
|
|
150
|
+
position: sticky;
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
153
|
+
|
|
154
|
+
<script>
|
|
155
|
+
/**
|
|
156
|
+
* Client-side enhancements
|
|
157
|
+
* This script runs in the browser for interactive features
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
// Example: Track filter interactions
|
|
161
|
+
document.addEventListener('filterChange', (event) => {
|
|
162
|
+
console.log('Filter analytics:', event.detail);
|
|
163
|
+
// Send to analytics service
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Example: Track search queries
|
|
167
|
+
document.addEventListener('searchQuery', (event) => {
|
|
168
|
+
console.log('Search analytics:', event.detail);
|
|
169
|
+
// Send to analytics service
|
|
170
|
+
});
|
|
171
|
+
</script>
|