feat: route 100% of homepage and tool page media through management folder
This commit is contained in:
@@ -108,9 +108,10 @@ export function HeroSection({
|
||||
if (variant === 'toolHero' && tool) {
|
||||
const categoryName = tool.category?.replace('-', ' ').toUpperCase() || 'AI TOOL';
|
||||
const appName = homeApp ? resolveLocalised(homeApp.name, locale) : 'Mobile App';
|
||||
const toolMedia = (tool as any).media;
|
||||
const primaryExample = tool.content?.examples?.[0] || {
|
||||
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80',
|
||||
after: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=800&auto=format&fit=crop&q=80',
|
||||
before: toolMedia?.before || `/management/pages/tools/${tool.slug}/media/before.jpg`,
|
||||
after: toolMedia?.after || `/management/pages/tools/${tool.slug}/media/after.jpg`,
|
||||
caption: 'Sub-pixel neural transformation details',
|
||||
};
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ const flagshipBanners: FlagshipBanner[] = [
|
||||
toolSlug: 'background-remover',
|
||||
appSlug: 'bg-cleaner-app',
|
||||
appName: 'Magic Cutout Studio',
|
||||
beforeUrl: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80',
|
||||
afterUrl: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=800&auto=format&fit=crop&q=80',
|
||||
beforeUrl: '/management/pages/home/media/showcase_01_alpha_before.jpg',
|
||||
afterUrl: '/management/pages/home/media/showcase_01_alpha_after.jpg',
|
||||
benefits: [
|
||||
'Sub-pixel flyaway hair detection',
|
||||
'Crisp alpha transparent background export',
|
||||
@@ -55,8 +55,8 @@ const flagshipBanners: FlagshipBanner[] = [
|
||||
toolSlug: 'blemish-remover',
|
||||
appSlug: 'portrait-app',
|
||||
appName: 'Portrait Studio AI',
|
||||
beforeUrl: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80',
|
||||
afterUrl: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=800&auto=format&fit=crop&q=80',
|
||||
beforeUrl: '/management/pages/home/media/showcase_02_portrait_before.jpg',
|
||||
afterUrl: '/management/pages/home/media/showcase_02_portrait_after.jpg',
|
||||
benefits: [
|
||||
'Microscopic skin pore texture retained',
|
||||
'Instant acne, scar & discoloration repair',
|
||||
@@ -75,8 +75,8 @@ const flagshipBanners: FlagshipBanner[] = [
|
||||
toolSlug: 'photo-enhancer',
|
||||
appSlug: 'photo-enhancer-pro',
|
||||
appName: 'Enhance Ultra AI',
|
||||
beforeUrl: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=800&auto=format&fit=crop&q=80',
|
||||
afterUrl: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=800&auto=format&fit=crop&q=80',
|
||||
beforeUrl: '/management/pages/home/media/showcase_03_superres_before.jpg',
|
||||
afterUrl: '/management/pages/home/media/showcase_03_superres_after.jpg',
|
||||
benefits: [
|
||||
'Iris clarity & sharp eyelash synthesis',
|
||||
'400% lossless resolution upscaling',
|
||||
|
||||
@@ -50,16 +50,16 @@ export function TryItWidget({
|
||||
|
||||
const samplePresets = [
|
||||
{
|
||||
label: 'Portrait Retouch',
|
||||
url: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=600&auto=format&fit=crop&q=80',
|
||||
label: 'Sample Photo',
|
||||
url: (tool as any).media?.before || '/management/pages/home/media/sample_portrait_1.jpg',
|
||||
},
|
||||
{
|
||||
label: 'Natural Studio Model',
|
||||
url: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=600&auto=format&fit=crop&q=80',
|
||||
url: '/management/pages/home/media/sample_portrait_2.jpg',
|
||||
},
|
||||
{
|
||||
label: 'Vintage Archival Shot',
|
||||
url: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=600&auto=format&fit=crop&q=80',
|
||||
url: '/management/pages/home/media/sample_portrait_3.jpg',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ interface VerticalToolStackProps {
|
||||
|
||||
const icons: Record<string, ElementType> = { Smile, Sparkles, Scissors, Palette, Layers };
|
||||
|
||||
const fallbackImage = 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=720&auto=format&fit=crop&q=76';
|
||||
const fallbackImage = '/management/pages/home/media/sample_portrait_1.jpg';
|
||||
|
||||
export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
||||
const { tools, categories, apps, locale } = context;
|
||||
|
||||
@@ -23,8 +23,8 @@ const useCases: UseCaseCard[] = [
|
||||
toolSlug: 'background-remover',
|
||||
toolName: 'P3M Background Remover',
|
||||
icon: ShoppingBag,
|
||||
beforeImg: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=600&auto=format&fit=crop&q=80',
|
||||
afterImg: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=600&auto=format&fit=crop&q=80',
|
||||
beforeImg: '/management/pages/tools/background-remover/media/before.jpg',
|
||||
afterImg: '/management/pages/tools/background-remover/media/after.jpg',
|
||||
badge: 'P3M Dual-Stream Matting',
|
||||
benefits: ['Clean alpha transparent PNG', 'Flyaway hair strand detection', 'Batch cutout ready in app'],
|
||||
},
|
||||
@@ -35,8 +35,8 @@ const useCases: UseCaseCard[] = [
|
||||
toolSlug: 'blemish-remover',
|
||||
toolName: 'AI Blemish Remover',
|
||||
icon: Camera,
|
||||
beforeImg: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=600&auto=format&fit=crop&q=80',
|
||||
afterImg: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=600&auto=format&fit=crop&q=80',
|
||||
beforeImg: '/management/pages/tools/blemish-remover/media/before.jpg',
|
||||
afterImg: '/management/pages/tools/blemish-remover/media/after.jpg',
|
||||
badge: 'Micro-Pore Safeguard',
|
||||
benefits: ['Zero artificial plastic look', 'Localised neural inpainting', 'Multi-mode eye & skin fixes'],
|
||||
},
|
||||
@@ -47,8 +47,8 @@ const useCases: UseCaseCard[] = [
|
||||
toolSlug: 'old-photo-restorer',
|
||||
toolName: 'Vintage Photo Restorer',
|
||||
icon: Archive,
|
||||
beforeImg: 'https://images.unsplash.com/photo-1509198397868-475647b2a1e5?w=600&auto=format&fit=crop&q=80',
|
||||
afterImg: 'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=600&auto=format&fit=crop&q=80',
|
||||
beforeImg: '/management/pages/tools/old-photo-restorer/media/before.jpg',
|
||||
afterImg: '/management/pages/tools/old-photo-restorer/media/after.jpg',
|
||||
badge: 'Historical Inpainting',
|
||||
benefits: ['Physical scratch & crease repair', 'Historical skin tone colorizer', 'Preserve family heritage'],
|
||||
},
|
||||
@@ -59,8 +59,8 @@ const useCases: UseCaseCard[] = [
|
||||
toolSlug: 'cartoon-avatar',
|
||||
toolName: 'CartoonGAN Anime Avatar',
|
||||
icon: Palette,
|
||||
beforeImg: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=600&auto=format&fit=crop&q=80',
|
||||
afterImg: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=600&auto=format&fit=crop&q=80',
|
||||
beforeImg: '/management/pages/tools/cartoon-avatar/media/before.jpg',
|
||||
afterImg: '/management/pages/tools/cartoon-avatar/media/after.jpg',
|
||||
badge: 'Generative Adversarial Nets',
|
||||
benefits: ['Facial geometry preservation', 'Manga cel shading', 'Social media ready avatars'],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user