diff --git a/content/templates/tool.json b/content/templates/tool.json index 7d4f9c6..ca9e20d 100644 --- a/content/templates/tool.json +++ b/content/templates/tool.json @@ -11,20 +11,17 @@ "breadcrumbs": true } }, - { - "id": "tool-tryit", - "type": "tryItWidget", - "props": { - "toolRef": "{{tool.id}}" - } - }, { "id": "tool-beforeafter", "type": "beforeAfter", "props": { "title": { - "en": "Real Before & After Comparisons", - "hi": "वास्तविक पहले और बाद की तुलना" + "en": "Real Before & After Results", + "hi": "वास्तविक पहले और बाद के परिणाम" + }, + "subtitle": { + "en": "Inspect sub-pixel neural transformation details with the interactive comparison slider.", + "hi": "इंटरैक्टिव तुलना स्लाइडर के साथ विवरणों का निरीक्षण करें।" }, "items": "{{tool.content.examples}}" } diff --git a/src/components/sections/HeroSection.tsx b/src/components/sections/HeroSection.tsx index e31a706..8dd6fd1 100644 --- a/src/components/sections/HeroSection.tsx +++ b/src/components/sections/HeroSection.tsx @@ -138,23 +138,17 @@ export function HeroSection({ - {/* CTAs */} -
- - Try with your photo - - {homeApp && ( + {/* App Availability */} + {homeApp && ( +
- {appName} App + Available in {appName} for iOS & Android - )} -
+
+ )} {/* Trust Badges */}
@@ -164,30 +158,11 @@ export function HeroSection({
- {/* Right Column: Hero Interactive Transformation Showcase */} -
-
-
- {example?.before && example?.after ? ( -
- - {example.caption && ( -

- {example.caption} -

- )} -
- ) : ( -
- Interactive transformation preview -
- )} + {/* Right Column: Front Screen ONLY Upload Image Option (No before/after) */} +
+
+
+
diff --git a/src/components/sections/TryItWidget.tsx b/src/components/sections/TryItWidget.tsx index 2fcf45d..b09733d 100644 --- a/src/components/sections/TryItWidget.tsx +++ b/src/components/sections/TryItWidget.tsx @@ -207,111 +207,71 @@ export function TryItWidget({ {/* Main Body per Status */}
{status === 'idle' && ( -
- {/* Left Column: Interactive Before/After Transformation Preview */} -
-
- - Real AI Transformation Output - - - Auto-sliding & scrubber - +
+ {/* Drag & Drop Upload Zone */} +
{ + e.preventDefault(); + setIsDragOver(true); + }} + onDragLeave={() => setIsDragOver(false)} + onClick={() => fileInputRef.current?.click()} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + fileInputRef.current?.click(); + } + }} + role="button" + tabIndex={0} + aria-label="Upload photo to edit" + className={`border-2 border-dashed rounded-3xl p-8 sm:p-12 text-center cursor-pointer transition-all duration-300 group ${ + isDragOver + ? 'border-blue-500 bg-blue-50/60 scale-[1.01]' + : 'border-slate-300 hover:border-blue-500 bg-slate-50/50 hover:bg-blue-50/20' + }`} + > + e.target.files?.[0] && handleFileChange(e.target.files[0])} + /> +
+
- {tool.content?.examples?.[0]?.before && tool.content?.examples?.[0]?.after ? ( -
- -
- ) : ( -
- Transformation preview -
- )} +
+ + Upload Image +
- {tool.content?.examples?.[0]?.caption && ( -

- {tool.content.examples[0].caption} -

- )} +

+ or drag and drop your photo here +

+

+ Supports JPG, PNG, WEBP up to {tool.tryIt?.limits?.maxMB || 12}MB • High-res 4K processing +

- {/* Right Column: Upload Zone & Instant Samples */} -
-
-

- Try with your photo -

-

- Test {resolveLocalised(tool.name, locale)} in your browser with zero setup or sign-in. -

-
- - {/* Drag & Drop Upload Zone */} -
{ - e.preventDefault(); - setIsDragOver(true); - }} - onDragLeave={() => setIsDragOver(false)} - onClick={() => fileInputRef.current?.click()} - onKeyDown={(e) => { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - fileInputRef.current?.click(); - } - }} - role="button" - tabIndex={0} - aria-label="Choose a JPG, PNG, or WebP photo to edit" - className={`border-2 border-dashed rounded-2xl p-6 sm:p-8 text-center cursor-pointer transition-all duration-300 group ${ - isDragOver - ? 'border-blue-500 bg-blue-50/50 scale-[1.01]' - : 'border-slate-300 hover:border-blue-500 bg-slate-50/60 hover:bg-blue-50/30' - }`} - > - e.target.files?.[0] && handleFileChange(e.target.files[0])} - /> -
- -
-

- Drop your photo here, or browse -

-

- JPG, PNG, WebP up to {tool.tryIt?.limits?.maxMB || 12}MB -

-
- - {/* Quick Sample Presets */} -
-

- Or test instantly with a sample photo: -

-
- {samplePresets.map((preset, idx) => ( - - ))} -
+ {/* Quick Sample Presets */} +
+

+ Or test instantly with a sample photo: +

+
+ {samplePresets.map((preset, idx) => ( + + ))}
diff --git a/src/components/ui/BeforeAfterSlider.tsx b/src/components/ui/BeforeAfterSlider.tsx index 33d9bd9..79987ec 100644 --- a/src/components/ui/BeforeAfterSlider.tsx +++ b/src/components/ui/BeforeAfterSlider.tsx @@ -21,7 +21,7 @@ export function BeforeAfterSlider({ afterLabel, caption, aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]', - autoSlide = false, + autoSlide = true, className = '', }: BeforeAfterSliderProps) { return (