feat: complete dynamic JSON-driven photo tools frontend connected to FastAPI backend

This commit is contained in:
2026-11-03 12:24:43 +05:30
commit fa2eca3643
91 changed files with 11372 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
import React from 'react';
import { resolveLocalised } from '@/types';
interface StepsSectionProps {
title?: any;
subtitle?: any;
items?: Array<{
title: any;
desc: any;
}>;
locale?: string;
}
export function StepsSection({
title,
subtitle,
items = [],
locale = 'en',
}: StepsSectionProps) {
if (!items || items.length === 0) return null;
return (
<section className="py-12 lg:py-16 bg-slate-50/50 dark:bg-slate-950/50">
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
{(title || subtitle) && (
<div className="text-center max-w-2xl mx-auto mb-12 space-y-3">
{title && (
<h2 className="text-3xl font-bold text-slate-900 dark:text-white">
{resolveLocalised(title, locale)}
</h2>
)}
{subtitle && (
<p className="text-sm text-slate-600 dark:text-slate-400">
{resolveLocalised(subtitle, locale)}
</p>
)}
</div>
)}
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
{items.map((step, idx) => (
<div
key={idx}
className="relative bg-white dark:bg-slate-900 rounded-3xl p-6 sm:p-8 border border-slate-200 dark:border-slate-800 shadow-sm space-y-4"
>
<div className="w-10 h-10 rounded-xl bg-blue-600 text-white font-bold flex items-center justify-center text-base shadow-md shadow-blue-500/20">
{idx + 1}
</div>
<h3 className="text-lg font-bold text-slate-900 dark:text-white">
{resolveLocalised(step.title, locale)}
</h3>
<p className="text-xs text-slate-600 dark:text-slate-400 leading-relaxed">
{resolveLocalised(step.desc, locale)}
</p>
</div>
))}
</div>
</div>
</section>
);
}