mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-05 12:20:47 +01:00
Replace individual static bot pages with a single dynamic [slug]/page.tsx that renders from centralized configuration. This makes adding new bots a matter of editing config files only - no new page files needed. Architecture changes: - Add lib/config/bot-pages.ts as SSOT for all bot page content - Add components/shared/sections/ with generic section components - Add app/bots/[slug]/page.tsx as single dynamic page - Remove 100+ files from individual bot directories New section components: - DisclaimerSection, FeaturesSection, HowItWorksSection - BenefitsSection, TestimonialsSection, VisionSection - TechnologySection, CTASection, DemoSectionWrapper To add a new bot now: 1. Add entry to lib/config/bot-pages.ts (sections + content) 2. Add hero config to data/botHeroConfigs.ts 3. Add demo config to lib/demo/botDemoConfigs.ts 4. Add basic info to data/bots.ts Done - no new page.tsx files needed! Files deleted: ~100+ (bot-specific pages/components) Files added: 11 (config + generic sections) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
'use client';
|
|
|
|
import type { FeaturesContent } from '@/lib/config/bot-pages';
|
|
import type { BotAccentColor } from '@/types/bot';
|
|
import { getAccentClasses } from '@/lib/config/colors';
|
|
|
|
interface FeaturesSectionProps {
|
|
content: FeaturesContent;
|
|
accentColor: BotAccentColor;
|
|
}
|
|
|
|
export function FeaturesSection({ content, accentColor }: FeaturesSectionProps) {
|
|
const { badge, title, subtitle, features, columns = 3 } = content;
|
|
const accent = getAccentClasses(accentColor);
|
|
|
|
const gridCols = {
|
|
2: 'md:grid-cols-2',
|
|
3: 'md:grid-cols-2 lg:grid-cols-3',
|
|
4: 'md:grid-cols-2 lg:grid-cols-4',
|
|
}[columns];
|
|
|
|
return (
|
|
<div className="max-w-6xl mx-auto">
|
|
{badge && (
|
|
<div className="text-center mb-4">
|
|
<span className={`inline-block px-3 py-1 text-sm font-medium rounded-full ${accent.badge}`}>
|
|
{badge}
|
|
</span>
|
|
</div>
|
|
)}
|
|
|
|
<h2 className="text-3xl font-bold text-center text-gray-900 mb-4">{title}</h2>
|
|
|
|
{subtitle && (
|
|
<p className="text-lg text-gray-600 text-center max-w-3xl mx-auto mb-12">{subtitle}</p>
|
|
)}
|
|
|
|
<div className={`grid gap-6 ${gridCols}`}>
|
|
{features.map((feature, index) => (
|
|
<div
|
|
key={index}
|
|
className="bg-white rounded-xl border border-gray-200 p-6 shadow-sm hover:shadow-md transition-shadow"
|
|
>
|
|
<span className="text-3xl mb-4 block">{feature.icon}</span>
|
|
<h3 className="text-lg font-semibold text-gray-900 mb-2">{feature.title}</h3>
|
|
<p className="text-gray-600 text-sm">{feature.description}</p>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|