feat: INFINITH Marketing Platform — Phase 1 MVP
Complete frontend reference implementation: - Landing page (7 sections, responsive, animated) - Marketing Intelligence Report (11 sections, VIEW Plastic Surgery demo) - Marketing Execution Plan (8 sections, branding/channel/calendar) - Content Studio wizard (channel → strategy → sound → generate) - Channel Connect page (7 platform OAuth flows) - Distribution page (YouTube publish flow) - Performance Dashboard (KPI, funnel, heatmap, trends) - PDF export (section-based, no mid-content splits) - Design system (pastel palette, filled icons, Pretendard/Playfair) - Page navigator (landing ↔ report ↔ plan) - Asset upload (drag & drop, image/video/text) Docs: PRD v2.0, DESIGN_SYSTEM.md, API_CONNECTORS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
bbb7a0de60
90 files changed
+16754
No files matched your search
@@ -0,0 +1,66 @@
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { motion } from 'motion/react';
|
||||
import { ArrowRight } from 'lucide-react';
|
||||
|
||||
export default function CTA() {
|
||||
const [url, setUrl] = useState('');
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleAnalyze = () => {
|
||||
if (url.trim()) navigate('/report/loading', { state: { url } });
|
||||
};
|
||||
|
||||
return (
|
||||
<section className="py-20 md:py-24 bg-primary-900 text-white px-6 relative overflow-hidden">
|
||||
<div className="absolute inset-0 -z-10 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-indigo-900 via-primary-900 to-primary-900 opacity-80"></div>
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-purple-500/20 rounded-full blur-[100px] pointer-events-none"></div>
|
||||
|
||||
<div className="max-w-4xl mx-auto text-center relative z-10">
|
||||
<motion.h2
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="text-4xl md:text-5xl font-serif font-bold mb-4 leading-tight text-transparent bg-clip-text bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff]"
|
||||
>
|
||||
Ready to Transform Your Marketing?
|
||||
</motion.h2>
|
||||
|
||||
<motion.p
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.1 }}
|
||||
className="text-lg md:text-xl text-purple-200 mb-10 max-w-2xl mx-auto font-light"
|
||||
>
|
||||
URL 하나로 시작하는 완벽한 마케팅 자동화. 지금 바로 무료 진단을 받아보세요.
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
className="flex flex-col items-center justify-center gap-4 max-w-md mx-auto"
|
||||
>
|
||||
<input
|
||||
type="url"
|
||||
placeholder="Enter Your URL"
|
||||
value={url}
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
onKeyDown={(e) => e.key === 'Enter' && handleAnalyze()}
|
||||
className="w-full px-8 py-4 text-base font-medium bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff] border border-white/20 rounded-full focus:outline-none focus:ring-2 focus:ring-white/50 shadow-sm text-center text-primary-900 placeholder:text-primary-900/60"
|
||||
/>
|
||||
<button onClick={handleAnalyze} className="w-full px-10 py-4 text-lg font-medium text-white rounded-full transition-all shadow-xl hover:shadow-2xl flex items-center justify-center gap-2 group bg-gradient-to-r from-[#4F1DA1] to-[#021341] hover:from-[#AF90FF] hover:to-[#AF90FF]">
|
||||
Analyze
|
||||
<ArrowRight className="w-5 h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
<p className="text-sm text-purple-200/80 mt-2">
|
||||
네이버 블로그, 플레이스, 소셜미디어 종합 분석 리포트 받아보기
|
||||
</p>
|
||||
</motion.div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer className="bg-white border-t border-slate-100 py-12 px-6">
|
||||
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-[#4F1DA1] to-[#021341] bg-clip-text text-transparent">INFINITH</span>
|
||||
</div>
|
||||
<div className="text-sm text-slate-500 text-center md:text-left">
|
||||
© {new Date().getFullYear()} INFINITH. All rights reserved. <br className="md:hidden" />
|
||||
Infinite Marketing for Premium Medical Business & Marketing Agency
|
||||
</div>
|
||||
<div className="flex items-center gap-6 text-sm font-medium text-slate-600">
|
||||
<a href="#" className="hover:text-primary-900 transition-colors">Privacy Policy</a>
|
||||
<a href="#" className="hover:text-primary-900 transition-colors">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { motion } from 'motion/react';
|
||||
import { ArrowRight, Sparkles } from 'lucide-react';
|
||||
|
||||
export default function Hero() {
|
||||
const [url, setUrl] = useState('');
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleAnalyze = () => {
|
||||
if (url.trim()) navigate('/report/loading', { state: { url } });
|
||||
};
|
||||
|
||||
return (
|
||||
<section className="relative pt-40 pb-24 md:pt-52 md:pb-32 overflow-hidden flex flex-col items-center justify-center min-h-screen text-center px-6">
|
||||
{/* Background Gradient */}
|
||||
<div className="absolute inset-0 -z-10 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-indigo-100 via-purple-50 to-pink-50 opacity-70"></div>
|
||||
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 shadow-sm mb-8"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 text-accent" />
|
||||
<span className="text-sm font-medium text-slate-700">Infinite Marketing for Premium Medical Business & Marketing Agency</span>
|
||||
</motion.div>
|
||||
|
||||
<motion.h1
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.1 }}
|
||||
className="text-5xl md:text-7xl font-serif font-bold text-primary-900 leading-[1.1] tracking-tight mb-6"
|
||||
>
|
||||
AI Marketing Engine <br className="hidden md:block" />
|
||||
<span className="text-gradient">Infinite Marketing.</span>
|
||||
</motion.h1>
|
||||
|
||||
<motion.p
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
className="text-lg md:text-xl text-slate-600 mb-10 max-w-3xl mx-auto leading-relaxed"
|
||||
>
|
||||
Infinite Marketing for Premium Medical Business & Marketing Agency. <br className="hidden md:block"/>
|
||||
AI가 콘텐츠를 만들고 데이터가 마케팅을 개선합니다.
|
||||
콘텐츠 기획, 생성, 영상 제작, 채널 배포, 데이터 분석을 하나의 자동화 엔진으로.
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.3 }}
|
||||
className="flex flex-col items-center justify-center gap-5 max-w-lg mx-auto w-full"
|
||||
>
|
||||
<div className="relative w-full group">
|
||||
<input
|
||||
type="url"
|
||||
placeholder="Enter Your Website URL"
|
||||
value={url}
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
onKeyDown={(e) => e.key === 'Enter' && handleAnalyze()}
|
||||
className="w-full px-8 py-5 text-base font-medium bg-white/80 backdrop-blur-sm border border-slate-200 rounded-2xl focus:outline-none focus:ring-2 focus:ring-accent/20 focus:border-accent/40 shadow-sm text-center text-primary-900 placeholder:text-slate-400 transition-all group-hover:border-slate-300"
|
||||
/>
|
||||
</div>
|
||||
<button onClick={handleAnalyze} className="w-full px-8 py-5 text-base font-bold text-white rounded-2xl transition-all shadow-xl hover:shadow-2xl flex items-center justify-center gap-3 group bg-gradient-to-r from-[#4F1DA1] to-[#021341] hover:scale-[1.02] active:scale-[0.98]">
|
||||
Analyze Marketing Performance
|
||||
<ArrowRight className="w-5 h-5 group-hover:translate-x-1 transition-transform" />
|
||||
</button>
|
||||
<p className="text-xs font-medium text-slate-500 mt-2">
|
||||
네이버 블로그, 플레이스, 소셜미디어 등 Online Presence 종합 분석 리포트를 제공합니다.
|
||||
</p>
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
{/* Decorative elements */}
|
||||
<div className="absolute top-1/4 left-10 w-64 h-64 bg-purple-300 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob"></div>
|
||||
<div className="absolute top-1/3 right-10 w-64 h-64 bg-pink-300 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob animation-delay-2000"></div>
|
||||
<div className="absolute -bottom-8 left-1/2 -translate-x-1/2 w-64 h-64 bg-indigo-300 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob animation-delay-4000"></div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
import React from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
const modules = [
|
||||
{
|
||||
step: "1",
|
||||
title: "Marketing Intelligence",
|
||||
items: [
|
||||
"브랜딩, 마케팅 현황 분석",
|
||||
"타겟 고객 분석",
|
||||
"키워드 분석",
|
||||
"경쟁 및 포지셔닝 분석",
|
||||
"SEO 전략 & 채널별 콘텐츠 기획"
|
||||
],
|
||||
highlight: "AI 기반 시장 통찰력 도출",
|
||||
color: "bg-[#021341]",
|
||||
textColor: "text-indigo-600"
|
||||
},
|
||||
{
|
||||
step: "2",
|
||||
title: "Content Creation",
|
||||
items: [
|
||||
"블로그 콘텐츠 생성",
|
||||
"SEO 콘텐츠 생성",
|
||||
"SNS 콘텐츠 생성",
|
||||
"마케팅 카피 생성",
|
||||
"Human-in-the loop 프로세스"
|
||||
],
|
||||
highlight: "고품질 맞춤형 콘텐츠 자동화",
|
||||
color: "bg-[#021341]",
|
||||
textColor: "text-indigo-600"
|
||||
},
|
||||
{
|
||||
step: "3",
|
||||
title: "Video Automation",
|
||||
items: [
|
||||
"블로그 → 영상 변환",
|
||||
"숏폼 콘텐츠 생성",
|
||||
"유튜브 콘텐츠 제작",
|
||||
"SNS 영상 제작",
|
||||
"멀티모달 AI 엔진: 영상 + 음악 + 카피"
|
||||
],
|
||||
highlight: "원클릭 영상 제작 시스템",
|
||||
color: "bg-[#021341]",
|
||||
textColor: "text-indigo-600"
|
||||
},
|
||||
{
|
||||
step: "4",
|
||||
title: "Distribution Engine",
|
||||
items: [
|
||||
"블로그 게시",
|
||||
"SNS 자동 게시",
|
||||
"유튜브 업로드",
|
||||
"콘텐츠 일정 관리",
|
||||
"SEO, AEO 자동 최적화"
|
||||
],
|
||||
highlight: "전 채널 통합 배포 및 최적화",
|
||||
color: "bg-[#021341]",
|
||||
textColor: "text-indigo-600"
|
||||
},
|
||||
{
|
||||
step: "5",
|
||||
title: "Performance Intelligence",
|
||||
items: [
|
||||
"SEO 성과 분석",
|
||||
"콘텐츠 성과 분석",
|
||||
"채널 성과 분석",
|
||||
"AI 콘텐츠 개선 전략 추천",
|
||||
"데이터 기반 효과 검증"
|
||||
],
|
||||
highlight: "실시간 성과 추적 및 개선",
|
||||
color: "bg-[#021341]",
|
||||
textColor: "text-indigo-600"
|
||||
}
|
||||
];
|
||||
|
||||
const Flywheel = () => (
|
||||
<div className="relative w-72 h-72 md:w-[400px] md:h-[400px] flex items-center justify-center">
|
||||
{/* Center Content */}
|
||||
<div className="absolute inset-0 flex flex-col items-center justify-center text-center z-10">
|
||||
<h3 className="text-[26px] md:text-[31px] font-serif font-bold text-slate-800 leading-tight">
|
||||
Self-Improving<br/>Growth Engine
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const ModuleCard: React.FC<{ mod: any, className?: string }> = ({ mod, className }) => (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className={`bg-white rounded-2xl p-5 md:p-6 shadow-xl shadow-slate-200/50 border border-slate-100 flex flex-col ${className}`}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-5">
|
||||
<div className={`w-10 h-10 shrink-0 rounded-xl flex items-center justify-center text-white font-bold text-lg ${mod.color}`}>
|
||||
{mod.step}
|
||||
</div>
|
||||
<h3 className="text-lg md:text-xl font-bold text-slate-800 leading-tight whitespace-nowrap tracking-tight">{mod.title}</h3>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-3 mb-6 flex-grow">
|
||||
{mod.items.map((item: string, i: number) => (
|
||||
<li key={i} className="text-slate-600 text-sm md:text-base leading-relaxed break-keep">
|
||||
{item}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<div className={`mt-auto pt-4 border-t border-slate-100 font-bold text-sm md:text-base tracking-tight whitespace-nowrap ${mod.textColor}`}>
|
||||
{mod.highlight}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
|
||||
export default function Modules() {
|
||||
return (
|
||||
<section id="modules" className="py-24 md:py-32 bg-white px-6 overflow-hidden relative">
|
||||
{/* Animated Background Blobs */}
|
||||
<div className="absolute top-[-10%] left-[-10%] w-[50vw] h-[50vw] min-w-[600px] min-h-[600px] rounded-full bg-[#fff3eb] opacity-80 blur-[120px] animate-blob-large pointer-events-none"></div>
|
||||
<div className="absolute top-[20%] right-[-10%] w-[40vw] h-[40vw] min-w-[500px] min-h-[500px] rounded-full bg-[#e4cfff] opacity-40 blur-[120px] animate-blob-large animation-delay-7000 pointer-events-none"></div>
|
||||
<div className="absolute bottom-[-10%] left-[20%] w-[60vw] h-[60vw] min-w-[700px] min-h-[700px] rounded-full bg-[#f5f9ff] opacity-80 blur-[120px] animate-blob-large animation-delay-14000 pointer-events-none"></div>
|
||||
|
||||
<div className="max-w-7xl mx-auto relative z-10">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="text-center mb-16 md:mb-24"
|
||||
>
|
||||
<h2 className="text-4xl md:text-5xl font-serif font-bold text-primary-900 mb-6">
|
||||
Core Modules
|
||||
</h2>
|
||||
<p className="text-lg md:text-xl text-slate-600 max-w-2xl mx-auto">
|
||||
성능 개선 반영 자율 순환 마케팅 시스템
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
{/* Desktop Layout — Pentagon around Flywheel */}
|
||||
<div className="hidden lg:block relative max-w-[1100px] mx-auto mt-10" style={{ height: '920px' }}>
|
||||
{/* Center flywheel */}
|
||||
<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
|
||||
<Flywheel />
|
||||
</div>
|
||||
|
||||
{/* Pentagon: 5 cards around center, all same width */}
|
||||
{/* 1. Top center */}
|
||||
<div className="absolute left-1/2 -translate-x-1/2" style={{ top: '0px' }}>
|
||||
<ModuleCard mod={modules[0]} className="w-[260px]" />
|
||||
</div>
|
||||
|
||||
{/* 2. Upper right */}
|
||||
<div className="absolute" style={{ right: '40px', top: '130px' }}>
|
||||
<ModuleCard mod={modules[1]} className="w-[260px]" />
|
||||
</div>
|
||||
|
||||
{/* 3. Lower right */}
|
||||
<div className="absolute" style={{ right: '100px', bottom: '30px' }}>
|
||||
<ModuleCard mod={modules[2]} className="w-[260px]" />
|
||||
</div>
|
||||
|
||||
{/* 4. Lower left */}
|
||||
<div className="absolute" style={{ left: '100px', bottom: '30px' }}>
|
||||
<ModuleCard mod={modules[3]} className="w-[260px]" />
|
||||
</div>
|
||||
|
||||
{/* 5. Upper left */}
|
||||
<div className="absolute" style={{ left: '40px', top: '130px' }}>
|
||||
<ModuleCard mod={modules[4]} className="w-[260px]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Mobile/Tablet Layout (Flex Column) */}
|
||||
<div className="lg:hidden flex flex-col gap-8 items-center">
|
||||
<Flywheel />
|
||||
<div className="w-full grid md:grid-cols-2 gap-6 mt-8">
|
||||
{modules.map((mod, idx) => (
|
||||
<ModuleCard key={idx} mod={mod} className="w-full" />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
export default function Navbar() {
|
||||
return (
|
||||
<nav className="fixed top-0 left-0 right-0 z-50 bg-white/70 backdrop-blur-lg border-b border-white/20">
|
||||
<div className="max-w-7xl mx-auto px-6 h-20 flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-[#4F1DA1] to-[#021341] bg-clip-text text-transparent">INFINITH</span>
|
||||
</div>
|
||||
<div className="hidden md:flex items-center gap-8 text-sm font-medium text-slate-600">
|
||||
<a href="#solution" className="hover:text-primary-900 transition-colors">Solution</a>
|
||||
<a href="#modules" className="hover:text-primary-900 transition-colors">Modules</a>
|
||||
<a href="#use-cases" className="hover:text-primary-900 transition-colors">Use Cases</a>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<button className="px-6 py-3 text-sm font-medium text-white rounded-full transition-all shadow-sm hover:shadow-md bg-gradient-to-r from-[#4F1DA1] to-[#021341] hover:opacity-90">
|
||||
Login
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { useLocation, useNavigate } from 'react-router';
|
||||
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
||||
|
||||
const PAGE_FLOW = [
|
||||
{ path: '/', label: '랜딩' },
|
||||
{ path: '/report/view-clinic', label: '마케팅 분석' },
|
||||
{ path: '/plan/view-clinic', label: '콘텐츠 기획' },
|
||||
{ path: '/studio/view-clinic', label: '콘텐츠 제작' },
|
||||
{ path: '/channels', label: '채널 연결' },
|
||||
{ path: '/distribute', label: '콘텐츠 배포' },
|
||||
{ path: '/performance', label: '성과 관리' },
|
||||
];
|
||||
|
||||
export default function PageNavigator() {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const currentIndex = PAGE_FLOW.findIndex((p) => p.path === location.pathname);
|
||||
if (currentIndex === -1) return null;
|
||||
|
||||
const prev = currentIndex > 0 ? PAGE_FLOW[currentIndex - 1] : null;
|
||||
const next = currentIndex < PAGE_FLOW.length - 1 ? PAGE_FLOW[currentIndex + 1] : null;
|
||||
|
||||
return (
|
||||
<div
|
||||
data-no-print
|
||||
className="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-1 bg-white/90 backdrop-blur-xl border border-slate-200 rounded-full px-2 py-2 shadow-[0_4px_20px_rgba(0,0,0,0.08)]"
|
||||
>
|
||||
{/* Back */}
|
||||
<button
|
||||
onClick={() => prev && navigate(prev.path)}
|
||||
disabled={!prev}
|
||||
className="flex items-center gap-2 px-3 py-2 rounded-full text-sm font-medium transition-all disabled:opacity-30 disabled:cursor-not-allowed hover:bg-slate-50 text-slate-600"
|
||||
>
|
||||
<ChevronLeft size={16} />
|
||||
{prev && <span className="hidden sm:inline">{prev.label}</span>}
|
||||
</button>
|
||||
|
||||
{/* Page Indicators */}
|
||||
<div className="flex items-center gap-2 px-2">
|
||||
{PAGE_FLOW.map((page, i) => (
|
||||
<button
|
||||
key={page.path}
|
||||
onClick={() => navigate(page.path)}
|
||||
title={page.label}
|
||||
className={`rounded-full transition-all ${
|
||||
i === currentIndex
|
||||
? 'w-6 h-2 bg-[#0A1128]'
|
||||
: 'w-2 h-2 bg-slate-300 hover:bg-slate-400'
|
||||
}`}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Next */}
|
||||
<button
|
||||
onClick={() => next && navigate(next.path)}
|
||||
disabled={!next}
|
||||
className="flex items-center gap-2 px-3 py-2 rounded-full text-sm font-medium transition-all disabled:opacity-30 disabled:cursor-not-allowed hover:bg-slate-50 text-slate-600"
|
||||
>
|
||||
{next && <span className="hidden sm:inline">{next.label}</span>}
|
||||
<ChevronRight size={16} />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
const problems = [
|
||||
{
|
||||
title: "콘텐츠 생산의 한계",
|
||||
desc: "블로그, SEO, 유튜브, 숏폼 등 지속적 생산이 필요하지만 인력과 비용, 시간 부족으로 제한됩니다."
|
||||
},
|
||||
{
|
||||
title: "영상 콘텐츠 제작 비용",
|
||||
desc: "영상은 중요하지만 촬영, 편집, 기획 비용이 높습니다. 특히 숏폼 콘텐츠는 지속적인 제작이 어렵습니다.",
|
||||
highlight: true
|
||||
},
|
||||
{
|
||||
title: "데이터 기반의 마케팅 부족",
|
||||
desc: "어떤 콘텐츠가 효과적인지, 어떤 키워드가 유입을 만드는지, 어떤 채널이 성과가 좋은지 알기 어렵고, 각 플랫폼들의 데이터들을 한눈에 파악할 수 없습니다."
|
||||
}
|
||||
];
|
||||
|
||||
export default function Problems() {
|
||||
return (
|
||||
<section className="py-24 bg-slate-50 px-6 relative overflow-hidden">
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="text-center mb-16"
|
||||
>
|
||||
<h2 className="text-3xl md:text-5xl font-serif font-bold text-primary-900 mb-4">
|
||||
Premium Medical Marketing is Hard
|
||||
</h2>
|
||||
<p className="text-lg text-slate-600 max-w-2xl mx-auto">
|
||||
병원 마케팅이 직면한 3가지 핵심 과제
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
<div className="grid md:grid-cols-3 gap-6">
|
||||
{problems.map((problem, idx) => (
|
||||
<motion.div
|
||||
key={idx}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: idx * 0.1 }}
|
||||
className="bg-white rounded-2xl p-8 md:p-10 border border-slate-100 shadow-sm hover:shadow-md transition-shadow flex flex-col justify-center"
|
||||
>
|
||||
<h3 className={`text-2xl font-bold mb-4 ${problem.highlight ? 'text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600' : 'text-primary-900'}`}>
|
||||
{problem.title}
|
||||
</h3>
|
||||
<p className="text-slate-600 text-base leading-relaxed">
|
||||
{problem.desc}
|
||||
</p>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Sparkles, ArrowRight } from 'lucide-react';
|
||||
|
||||
export default function Solution() {
|
||||
return (
|
||||
<section id="solution" className="py-32 bg-primary-900 text-white px-6 relative overflow-hidden">
|
||||
{/* Background Glow */}
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-accent/20 rounded-full blur-[120px] pointer-events-none"></div>
|
||||
|
||||
<div className="max-w-4xl mx-auto text-center relative z-10">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 backdrop-blur-sm border border-white/20 mb-8"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 text-purple-300" />
|
||||
<span className="text-sm font-medium text-purple-100">AI Marketing Engine</span>
|
||||
</motion.div>
|
||||
|
||||
<motion.h2
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.1 }}
|
||||
className="text-4xl md:text-6xl font-serif font-bold mb-6 leading-tight text-transparent bg-clip-text bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff]"
|
||||
>
|
||||
Infinite Marketing Engine
|
||||
</motion.h2>
|
||||
|
||||
<motion.p
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
className="text-xl md:text-2xl text-slate-300 mb-12 max-w-3xl mx-auto leading-relaxed font-light"
|
||||
>
|
||||
<span className="font-medium text-white">Infinite Marketing for Premium Medical Business & Marketing Agency</span>
|
||||
<br className="hidden md:block" />
|
||||
Infinite Marketing은 Premium Medical Business와 Marketing Agency를 위한 AI Marketing Automation Platform입니다.
|
||||
INFINITH는 마케팅 분석, 콘텐츠 생성, 영상 콘텐츠 제작, 채널 배포, 성과 분석과 피드백 적용을 하나의 Self-Improving Marketing Engine으로 제공합니다.
|
||||
</motion.p>
|
||||
|
||||
{/* Circular Loop Diagram */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.8, delay: 0.3 }}
|
||||
className="relative w-full max-w-[320px] md:max-w-[500px] aspect-square mx-auto mt-16 mb-24 md:mb-32"
|
||||
>
|
||||
{/* Static Inner Ring */}
|
||||
<div className="absolute top-[20%] left-[20%] right-[20%] bottom-[20%] rounded-full border border-white/5 shadow-[0_0_40px_rgba(255,255,255,0.02)_inset]"></div>
|
||||
|
||||
{/* Animated Glowing Ring */}
|
||||
<svg className="absolute inset-0 w-full h-full animate-[spin_20s_linear_infinite]" viewBox="0 0 100 100">
|
||||
<defs>
|
||||
<linearGradient id="ringGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stopColor="#a78bfa" stopOpacity="0.1" />
|
||||
<stop offset="50%" stopColor="#c084fc" stopOpacity="0.5" />
|
||||
<stop offset="100%" stopColor="#e879f9" stopOpacity="0.1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<circle cx="50" cy="50" r="30" fill="none" stroke="url(#ringGrad)" strokeWidth="0.5" strokeDasharray="2 2" />
|
||||
</svg>
|
||||
|
||||
{/* Center Orb */}
|
||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-20">
|
||||
<div className="w-40 h-40 md:w-56 md:h-56 rounded-full bg-primary-900/90 backdrop-blur-xl border border-white/5 flex flex-col items-center justify-center shadow-[0_0_60px_rgba(167,139,250,0.1)]">
|
||||
<span className="text-4xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff] mb-2">AGDP</span>
|
||||
<h3 className="text-xl md:text-3xl font-serif font-bold text-white text-center leading-tight">Infinite<br/>Marketing</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Node A: Analysis (Left) */}
|
||||
<div className="absolute top-1/2 left-0 -translate-x-1/2 -translate-y-1/2 z-30 flex flex-col items-center gap-3 md:gap-4">
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 rounded-full border border-purple-500/30 bg-primary-900/80 backdrop-blur-sm flex items-center justify-center shadow-[0_0_20px_rgba(168,85,247,0.15)]">
|
||||
<span className="text-3xl md:text-4xl font-bold text-purple-300">A</span>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<span className="block text-lg md:text-2xl font-medium text-purple-200 leading-tight">Analysis</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Node G: Generation (Top) */}
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1/2 z-30 flex flex-col items-center gap-3 md:gap-4">
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 rounded-full border border-purple-500/30 bg-primary-900/80 backdrop-blur-sm flex items-center justify-center shadow-[0_0_20px_rgba(168,85,247,0.15)]">
|
||||
<span className="text-3xl md:text-4xl font-bold text-purple-300">G</span>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<span className="block text-lg md:text-2xl font-medium text-purple-200 leading-tight">Generation</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Node D: Distribution (Right) */}
|
||||
<div className="absolute top-1/2 right-0 translate-x-1/2 -translate-y-1/2 z-30 flex flex-col items-center gap-3 md:gap-4">
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 rounded-full border border-purple-500/30 bg-primary-900/80 backdrop-blur-sm flex items-center justify-center shadow-[0_0_20px_rgba(168,85,247,0.15)]">
|
||||
<span className="text-3xl md:text-4xl font-bold text-purple-300">D</span>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<span className="block text-lg md:text-2xl font-medium text-purple-200 leading-tight">Distribution</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Node P: Performance (Bottom) */}
|
||||
<div className="absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 z-30 flex flex-col items-center gap-3 md:gap-4">
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 rounded-full border border-purple-500/30 bg-primary-900/80 backdrop-blur-sm flex items-center justify-center shadow-[0_0_20px_rgba(168,85,247,0.15)]">
|
||||
<span className="text-3xl md:text-4xl font-bold text-purple-300">P</span>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<span className="block text-lg md:text-2xl font-medium text-purple-200 leading-tight">Performance</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Reward Signal Curved Text (P to A) */}
|
||||
<svg className="absolute inset-0 w-full h-full pointer-events-none z-20" viewBox="0 0 100 100">
|
||||
<defs>
|
||||
<path id="rewardPath" d="M 10.6 56.9 A 40 40 0 0 0 43.1 89.4" fill="none" />
|
||||
</defs>
|
||||
<text fontSize="3.5" className="font-medium uppercase tracking-widest" fill="#d8b4fe" opacity="0.8">
|
||||
<textPath href="#rewardPath" startOffset="50%" textAnchor="middle">
|
||||
← Reward SIGNAL
|
||||
</textPath>
|
||||
</text>
|
||||
</svg>
|
||||
</motion.div>
|
||||
|
||||
{/* AGDP Cycle Description */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.5 }}
|
||||
className="max-w-3xl mx-auto mt-12 text-center"
|
||||
>
|
||||
<div className="inline-block bg-white/5 border border-white/10 rounded-2xl px-6 py-4 backdrop-blur-sm">
|
||||
<p className="text-sm md:text-base text-slate-300">
|
||||
<span className="font-bold text-purple-300">AGDP Cycle:</span> 분석(Analysis) → 생성(Generation) → 배포(Distribution) → 성과(Performance)의 무한 루프를 통해 콘텐츠 품질(CTR)을 <span className="text-white font-medium">자율 최적화</span>합니다.
|
||||
</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
export default function TargetAudience() {
|
||||
return (
|
||||
<section className="py-24 bg-white px-6">
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="text-center mb-16"
|
||||
>
|
||||
<h2 className="text-3xl md:text-5xl font-serif font-bold text-primary-900 mb-4">
|
||||
Who is Infinite Marketing for
|
||||
</h2>
|
||||
<p className="text-lg text-slate-600 max-w-2xl mx-auto">
|
||||
프리미엄 의료 서비스와 전문 마케팅 에이전시를 위한 최적의 솔루션
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
<div className="grid md:grid-cols-2 gap-8">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: -20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.1 }}
|
||||
className="glass-card p-10 md:p-12 bg-gradient-to-br from-slate-50 to-white border border-slate-100 rounded-3xl"
|
||||
>
|
||||
<h3 className="text-4xl md:text-5xl font-serif font-bold text-primary-900 mb-6 leading-tight">Premium Medical Business</h3>
|
||||
<p className="text-slate-600 mb-10 leading-relaxed text-lg">
|
||||
고객 LTV가 높고 브랜드 경쟁이 심해 콘텐츠 마케팅이 필수적인 프리미엄 의료 서비스 제공 병원
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
{['피부과', '성형외과', '치과', '안과', '헬스케어 클리닉', '피트니스'].map((item, i) => (
|
||||
<div key={i} className="bg-white px-5 py-3 rounded-2xl shadow-sm border border-slate-100 text-slate-700 font-medium hover:shadow-md transition-shadow">
|
||||
{item}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
className="glass-card p-10 md:p-12 bg-gradient-to-br from-purple-50 to-white border border-purple-100/50 rounded-3xl"
|
||||
>
|
||||
<h3 className="text-4xl md:text-5xl font-serif font-bold text-primary-900 mb-6 leading-tight">Medical Marketing Agency</h3>
|
||||
<p className="text-slate-600 mb-10 leading-relaxed text-lg">
|
||||
콘텐츠 제작 비용 부담과 인력 의존도가 높고 영상 제작 생산성 개선이 필요한 병원 마케팅 대행사
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
{['병원 마케팅 대행사', '콘텐츠 마케팅 Agency', '영상 마케팅 Agency', '광고 운영 대행사'].map((item, i) => (
|
||||
<div key={i} className="bg-white px-5 py-3 rounded-2xl shadow-sm border border-purple-50 text-slate-700 font-medium hover:shadow-md transition-shadow">
|
||||
{item}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { CheckCircle2 } from 'lucide-react';
|
||||
|
||||
export default function UseCases() {
|
||||
return (
|
||||
<section id="use-cases" className="py-24 bg-white px-6">
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="text-center mb-16"
|
||||
>
|
||||
<h2 className="text-3xl md:text-5xl font-serif font-bold text-primary-900 mb-4">
|
||||
Use Cases
|
||||
</h2>
|
||||
<p className="text-lg text-slate-600 max-w-2xl mx-auto font-medium">
|
||||
Infinite Marketing이 만드는 실질적인 변화를 확인해보세요!
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
<div className="grid md:grid-cols-2 gap-12">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: -20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.1 }}
|
||||
className="glass-card p-10 md:p-12 bg-gradient-to-br from-blue-50/50 to-white border border-blue-100/30"
|
||||
>
|
||||
<h3 className="text-2xl md:text-3xl font-serif font-bold text-primary-900 mb-8">Premium Medical Business</h3>
|
||||
<ul className="space-y-6">
|
||||
{[
|
||||
'SEO 콘텐츠 자동 생산으로 검색 상위 노출 달성',
|
||||
'비용 부담 없이 고품질 영상 콘텐츠 대량 확대',
|
||||
'자연 검색 유입 증가로 인한 환자 전환율 상승'
|
||||
].map((item, i) => (
|
||||
<li key={i} className="flex items-start gap-4 text-slate-700 font-medium group">
|
||||
<CheckCircle2 className="w-6 h-6 text-[#7A84D4] shrink-0 mt-1" />
|
||||
<span className="leading-relaxed text-lg group-hover:text-primary-900 transition-colors">{item}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
|
||||
<motion.div
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
className="glass-card p-10 md:p-12 bg-gradient-to-br from-purple-50/50 to-white border border-purple-100/30"
|
||||
>
|
||||
<h3 className="text-2xl md:text-3xl font-serif font-bold text-primary-900 mb-8">Marketing Agency</h3>
|
||||
<ul className="space-y-6">
|
||||
{[
|
||||
'AI 기반 콘텐츠 제작 자동화로 생산성 극대화',
|
||||
'블로그 텍스트 기반 영상 제작 자동화로 리소스 절감',
|
||||
'다수 클라이언트 계정의 통합 운영 및 효율화'
|
||||
].map((item, i) => (
|
||||
<li key={i} className="flex items-start gap-4 text-slate-700 font-medium group">
|
||||
<CheckCircle2 className="w-6 h-6 text-purple-500 shrink-0 mt-1" />
|
||||
<span className="leading-relaxed text-lg group-hover:text-primary-900 transition-colors">{item}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* Filled/Shape-style icons for Channel Strategy & Content Calendar.
|
||||
* Soft pastel colors, no outlines — all shapes use fill only.
|
||||
*/
|
||||
|
||||
interface IconProps {
|
||||
size?: number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function YoutubeFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="2" y="4" width="20" height="16" rx="4" fill="currentColor" opacity="0.25" />
|
||||
<path d="M10 8.5v7l6-3.5-6-3.5z" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function InstagramFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
|
||||
<circle cx="12" cy="12" r="4.5" fill="currentColor" />
|
||||
<circle cx="17.5" cy="6.5" r="1.5" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function FacebookFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
|
||||
<path d="M15.5 3.5H13.5C11.29 3.5 9.5 5.29 9.5 7.5V9.5H7.5V12.5H9.5V20.5H12.5V12.5H14.5L15.5 9.5H12.5V7.5C12.5 7.22 12.72 7 13 7H15.5V3.5Z" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function GlobeFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<circle cx="12" cy="12" r="10" fill="currentColor" opacity="0.2" />
|
||||
<ellipse cx="12" cy="12" rx="4" ry="10" fill="currentColor" opacity="0.35" />
|
||||
<line x1="2" y1="12" x2="22" y2="12" stroke="currentColor" strokeWidth="1.5" opacity="0.5" />
|
||||
<line x1="12" y1="2" x2="12" y2="22" stroke="currentColor" strokeWidth="1.5" opacity="0.3" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function VideoFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="1" y="5" width="15" height="14" rx="3" fill="currentColor" opacity="0.25" />
|
||||
<path d="M16 9.5L22 6.5V17.5L16 14.5V9.5Z" fill="currentColor" />
|
||||
<rect x="1" y="5" width="15" height="14" rx="3" fill="currentColor" opacity="0.5" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function MessageFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<path d="M4 4H20C21.1 4 22 4.9 22 6V16C22 17.1 21.1 18 20 18H6L2 22V6C2 4.9 2.9 4 4 4Z" fill="currentColor" opacity="0.3" />
|
||||
<path d="M4 4H20C21.1 4 22 4.9 22 6V16C22 17.1 21.1 18 20 18H6L2 22V6C2 4.9 2.9 4 4 4Z" fill="currentColor" opacity="0.4" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function CalendarFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="3" y="4" width="18" height="18" rx="3" fill="currentColor" opacity="0.25" />
|
||||
<rect x="3" y="4" width="18" height="6" rx="3" fill="currentColor" opacity="0.5" />
|
||||
<circle cx="8" cy="15" r="1.2" fill="currentColor" />
|
||||
<circle cx="12" cy="15" r="1.2" fill="currentColor" />
|
||||
<circle cx="16" cy="15" r="1.2" fill="currentColor" />
|
||||
<line x1="8" y1="2" x2="8" y2="5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
|
||||
<line x1="16" y1="2" x2="16" y2="5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function FileTextFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<path d="M6 2H14L20 8V20C20 21.1 19.1 22 18 22H6C4.9 22 4 21.1 4 20V4C4 2.9 4.9 2 6 2Z" fill="currentColor" opacity="0.25" />
|
||||
<path d="M14 2L20 8H16C14.9 8 14 7.1 14 6V2Z" fill="currentColor" opacity="0.5" />
|
||||
<rect x="8" y="12" width="8" height="1.5" rx="0.75" fill="currentColor" />
|
||||
<rect x="8" y="16" width="5" height="1.5" rx="0.75" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function ShareFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<circle cx="18" cy="5" r="3.5" fill="currentColor" opacity="0.4" />
|
||||
<circle cx="6" cy="12" r="3.5" fill="currentColor" opacity="0.4" />
|
||||
<circle cx="18" cy="19" r="3.5" fill="currentColor" opacity="0.4" />
|
||||
<line x1="9" y1="10.5" x2="15" y2="6.5" stroke="currentColor" strokeWidth="2" opacity="0.3" />
|
||||
<line x1="9" y1="13.5" x2="15" y2="17.5" stroke="currentColor" strokeWidth="2" opacity="0.3" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function MegaphoneFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<path d="M19 3L8 8H4C2.9 8 2 8.9 2 10V14C2 15.1 2.9 16 4 16H5L7 21H10L8 16L19 21V3Z" fill="currentColor" opacity="0.35" />
|
||||
<path d="M21 10C22.1 10 23 10.9 23 12C23 13.1 22.1 14 21 14" stroke="currentColor" strokeWidth="2" strokeLinecap="round" opacity="0.5" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function TiktokFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<rect x="2" y="2" width="20" height="20" rx="6" fill="currentColor" opacity="0.25" />
|
||||
<path d="M16.5 4.5V12.5C16.5 15.26 14.26 17.5 11.5 17.5C8.74 17.5 6.5 15.26 6.5 12.5C6.5 9.74 8.74 7.5 11.5 7.5V10C10.12 10 9 11.12 9 12.5C9 13.88 10.12 15 11.5 15C12.88 15 14 13.88 14 12.5V4.5H16.5Z" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function MusicFilled({ size = 20, className = '' }: IconProps) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" className={className}>
|
||||
<circle cx="7" cy="17" r="3" fill="currentColor" opacity="0.25" />
|
||||
<circle cx="17" cy="15" r="3" fill="currentColor" opacity="0.25" />
|
||||
<circle cx="7" cy="17" r="2" fill="currentColor" />
|
||||
<circle cx="17" cy="15" r="2" fill="currentColor" />
|
||||
<path d="M9 17V7L19 5V15" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none" />
|
||||
<rect x="9" y="5" width="10" height="2" rx="1" fill="currentColor" opacity="0.4" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
import { useState } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube } from 'lucide-react';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { AssetCollectionData, AssetSource, AssetStatus, AssetType } from '../../types/plan';
|
||||
|
||||
interface AssetCollectionProps {
|
||||
data: AssetCollectionData;
|
||||
}
|
||||
|
||||
const filterTabs = [
|
||||
{ key: 'all', label: '전체' },
|
||||
{ key: 'homepage', label: '홈페이지' },
|
||||
{ key: 'naver_place', label: '네이버' },
|
||||
{ key: 'blog', label: '블로그' },
|
||||
{ key: 'social', label: '소셜미디어' },
|
||||
{ key: 'youtube', label: 'YouTube' },
|
||||
] as const;
|
||||
|
||||
type FilterKey = (typeof filterTabs)[number]['key'];
|
||||
|
||||
const sourceBadgeColors: Record<AssetSource, string> = {
|
||||
homepage: 'bg-slate-100 text-slate-700',
|
||||
naver_place: 'bg-[#F3F0FF] text-[#4A3A7C]',
|
||||
blog: 'bg-[#EFF0FF] text-[#3A3F7C]',
|
||||
social: 'bg-pink-100 text-pink-700',
|
||||
youtube: 'bg-[#FFF0F0] text-[#7C3A4B]',
|
||||
};
|
||||
|
||||
const typeBadgeColors: Record<AssetType, string> = {
|
||||
photo: 'bg-indigo-50 text-indigo-700',
|
||||
video: 'bg-purple-50 text-purple-700',
|
||||
text: 'bg-[#FFF6ED] text-[#7C5C3A]',
|
||||
};
|
||||
|
||||
const statusConfig: Record<AssetStatus, { className: string; label: string }> = {
|
||||
collected: { className: 'bg-[#F3F0FF] text-[#4A3A7C]', label: '수집완료' },
|
||||
pending: { className: 'bg-[#FFF6ED] text-[#7C5C3A]', label: '수집 대기' },
|
||||
needs_creation: { className: 'bg-[#FFF0F0] text-[#7C3A4B]', label: '제작 필요' },
|
||||
};
|
||||
|
||||
function formatViews(views: number): string {
|
||||
if (views >= 1_000_000) return `${(views / 1_000_000).toFixed(1)}M`;
|
||||
if (views >= 1_000) return `${Math.round(views / 1_000)}K`;
|
||||
return String(views);
|
||||
}
|
||||
|
||||
export default function AssetCollection({ data }: AssetCollectionProps) {
|
||||
const [activeFilter, setActiveFilter] = useState<FilterKey>('all');
|
||||
|
||||
const filteredAssets =
|
||||
activeFilter === 'all'
|
||||
? data.assets
|
||||
: data.assets.filter((a) => a.source === activeFilter);
|
||||
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="asset-collection"
|
||||
title="Asset Collection"
|
||||
subtitle="에셋 수집 & 리퍼포징 소스"
|
||||
>
|
||||
{/* Source Filter Tabs */}
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{filterTabs.map((tab) => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveFilter(tab.key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeFilter === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-lg'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Asset Cards Grid */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-12">
|
||||
{filteredAssets.map((asset, i) => {
|
||||
const statusInfo = statusConfig[asset.status];
|
||||
return (
|
||||
<motion.div
|
||||
key={asset.id}
|
||||
className="rounded-2xl border border-slate-100 bg-white shadow-sm p-5"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.05 }}
|
||||
>
|
||||
{/* Top badges row */}
|
||||
<div className="flex items-center gap-2 mb-3 flex-wrap">
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${sourceBadgeColors[asset.source]}`}
|
||||
>
|
||||
{asset.sourceLabel}
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${typeBadgeColors[asset.type]}`}
|
||||
>
|
||||
{asset.type}
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ml-auto ${statusInfo.className}`}
|
||||
>
|
||||
{statusInfo.label}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Title & Description */}
|
||||
<h4 className="font-semibold text-[#0A1128] mb-1">{asset.title}</h4>
|
||||
<p className="text-sm text-slate-600 mb-3">{asset.description}</p>
|
||||
|
||||
{/* Repurposing suggestions */}
|
||||
{asset.repurposingSuggestions.length > 0 && (
|
||||
<div>
|
||||
<p className="text-xs font-semibold text-slate-500 uppercase mb-2">
|
||||
Repurposing →
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{asset.repurposingSuggestions.map((suggestion, j) => (
|
||||
<span
|
||||
key={j}
|
||||
className="rounded-full bg-purple-50 text-purple-700 text-xs px-2 py-1"
|
||||
>
|
||||
{suggestion}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* YouTube Repurpose Section */}
|
||||
{data.youtubeRepurpose.length > 0 && (
|
||||
<div>
|
||||
<h3 className="font-serif text-2xl font-bold text-[#0A1128] mb-4">
|
||||
YouTube Top Videos for Repurposing
|
||||
</h3>
|
||||
<div className="flex overflow-x-auto gap-4 pb-4 scrollbar-hide" style={{ scrollbarWidth: 'none' }}>
|
||||
{data.youtubeRepurpose.map((video, i) => (
|
||||
<motion.div
|
||||
key={video.title}
|
||||
className="min-w-[280px] rounded-2xl border border-slate-100 bg-white shadow-sm p-5 shrink-0"
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.1 }}
|
||||
>
|
||||
<div className="flex items-start gap-2 mb-3">
|
||||
<Youtube size={18} className="text-[#D4889A] shrink-0 mt-1" />
|
||||
<h4 className="font-semibold text-sm text-[#0A1128]">{video.title}</h4>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<span className="rounded-full bg-slate-100 text-slate-700 px-3 py-1 text-xs font-medium">
|
||||
{formatViews(video.views)} views
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${
|
||||
video.type === 'Short'
|
||||
? 'bg-purple-50 text-purple-700'
|
||||
: 'bg-[#EFF0FF] text-[#3A3F7C]'
|
||||
}`}
|
||||
>
|
||||
{video.type}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs font-semibold text-slate-500 uppercase mb-2">
|
||||
Repurpose As:
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{video.repurposeAs.map((suggestion, j) => (
|
||||
<span
|
||||
key={j}
|
||||
className="rounded-full bg-purple-50 text-purple-700 text-xs px-2 py-1"
|
||||
>
|
||||
{suggestion}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,408 @@
|
||||
import { useState, type ComponentType } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import {
|
||||
Youtube,
|
||||
Instagram,
|
||||
Facebook,
|
||||
Globe,
|
||||
Video,
|
||||
MessageSquare,
|
||||
CheckCircle2,
|
||||
XCircle,
|
||||
AlertCircle,
|
||||
ArrowRight,
|
||||
} from 'lucide-react';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { BrandGuide } from '../../types/plan';
|
||||
import type { BrandInconsistency } from '../../types/report';
|
||||
|
||||
interface BrandingGuideProps {
|
||||
data: BrandGuide;
|
||||
}
|
||||
|
||||
const tabItems = [
|
||||
{ key: 'visual', label: 'Visual Identity', labelKr: '비주얼 아이덴티티' },
|
||||
{ key: 'tone', label: 'Tone & Voice', labelKr: '톤 & 보이스' },
|
||||
{ key: 'channels', label: 'Channel Rules', labelKr: '채널별 규칙' },
|
||||
{ key: 'consistency', label: 'Brand Consistency', labelKr: '브랜드 일관성' },
|
||||
] as const;
|
||||
|
||||
type TabKey = (typeof tabItems)[number]['key'];
|
||||
|
||||
const channelIconMap: Record<string, ComponentType<{ size?: number; className?: string }>> = {
|
||||
youtube: Youtube,
|
||||
instagram: Instagram,
|
||||
facebook: Facebook,
|
||||
globe: Globe,
|
||||
video: Video,
|
||||
messagesquare: MessageSquare,
|
||||
};
|
||||
|
||||
function getChannelIcon(icon: string) {
|
||||
return channelIconMap[icon.toLowerCase()] ?? Globe;
|
||||
}
|
||||
|
||||
const statusColor: Record<string, string> = {
|
||||
correct: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]',
|
||||
incorrect: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]',
|
||||
missing: 'bg-slate-100 text-slate-500 border-slate-200',
|
||||
};
|
||||
|
||||
const statusLabel: Record<string, string> = {
|
||||
correct: 'Correct',
|
||||
incorrect: 'Incorrect',
|
||||
missing: 'Missing',
|
||||
};
|
||||
|
||||
/* ─── Visual Identity Tab ─── */
|
||||
function VisualIdentityTab({ data }: { data: BrandGuide }) {
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
className="space-y-8"
|
||||
>
|
||||
{/* Color Palette */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">Color Palette</h3>
|
||||
<div className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
{data.colors.map((swatch) => (
|
||||
<div
|
||||
key={swatch.hex}
|
||||
className="rounded-2xl border border-slate-100 overflow-hidden"
|
||||
>
|
||||
<div className="h-20" style={{ backgroundColor: swatch.hex }} />
|
||||
<div className="p-3">
|
||||
<p className="font-mono text-sm text-slate-700">{swatch.hex}</p>
|
||||
<p className="font-medium text-sm text-[#0A1128]">{swatch.name}</p>
|
||||
<p className="text-xs text-slate-500">{swatch.usage}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Typography */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">Typography</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{data.fonts.map((spec) => (
|
||||
<div
|
||||
key={`${spec.family}-${spec.weight}`}
|
||||
className="rounded-2xl border border-slate-100 p-5"
|
||||
>
|
||||
<p className="text-sm text-slate-500 uppercase tracking-wide mb-2">
|
||||
{spec.family}
|
||||
</p>
|
||||
<p
|
||||
className={`mb-3 text-[#0A1128] ${
|
||||
spec.weight.toLowerCase().includes('bold')
|
||||
? 'text-2xl font-bold'
|
||||
: 'text-lg'
|
||||
}`}
|
||||
style={{ fontFamily: spec.family }}
|
||||
>
|
||||
{spec.sampleText}
|
||||
</p>
|
||||
<p className="text-xs text-slate-500">
|
||||
<span className="font-medium text-slate-700">{spec.weight}</span> ·{' '}
|
||||
{spec.usage}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Logo Rules */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">Logo Rules</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{data.logoRules.map((rule) => (
|
||||
<div
|
||||
key={rule.rule}
|
||||
className={`rounded-2xl p-5 ${
|
||||
rule.correct
|
||||
? 'border-2 border-[#D5CDF5] bg-[#F3F0FF]/30'
|
||||
: 'border-2 border-[#F5D5DC] bg-[#FFF0F0]/30'
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
{rule.correct ? (
|
||||
<CheckCircle2 size={20} className="text-[#9B8AD4] shrink-0 mt-1" />
|
||||
) : (
|
||||
<XCircle size={20} className="text-[#D4889A] shrink-0 mt-1" />
|
||||
)}
|
||||
<div>
|
||||
<p className="font-semibold text-[#0A1128]">{rule.rule}</p>
|
||||
<p className="text-sm text-slate-600 mt-1">{rule.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Tone & Voice Tab ─── */
|
||||
function ToneVoiceTab({ tone }: { tone: BrandGuide['toneOfVoice'] }) {
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
className="space-y-6"
|
||||
>
|
||||
{/* Personality */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">Personality</h3>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{tone.personality.map((trait) => (
|
||||
<span
|
||||
key={trait}
|
||||
className="bg-gradient-to-r from-[#4F1DA1]/10 to-[#021341]/10 text-[#4F1DA1] border border-purple-200 rounded-full px-4 py-2 font-medium text-sm"
|
||||
>
|
||||
{trait}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Communication Style */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">Communication Style</h3>
|
||||
<div className="rounded-2xl bg-slate-50 p-6">
|
||||
<p className="text-base leading-relaxed text-slate-700">
|
||||
{tone.communicationStyle}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* DO / DON'T */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<div>
|
||||
<h4 className="font-semibold text-[#4A3A7C] mb-3 flex items-center gap-2">
|
||||
<CheckCircle2 size={16} /> DO
|
||||
</h4>
|
||||
<div className="space-y-3">
|
||||
{tone.doExamples.map((example, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="border-l-4 border-[#9B8AD4] bg-[#F3F0FF]/30 p-4 rounded-r-lg"
|
||||
>
|
||||
<p className="text-sm text-slate-700">{example}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-semibold text-[#7C3A4B] mb-3 flex items-center gap-2">
|
||||
<XCircle size={16} /> DON'T
|
||||
</h4>
|
||||
<div className="space-y-3">
|
||||
{tone.dontExamples.map((example, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="border-l-4 border-[#D4889A] bg-[#FFF0F0]/30 p-4 rounded-r-lg"
|
||||
>
|
||||
<p className="text-sm text-slate-700">{example}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Channel Rules Tab ─── */
|
||||
function ChannelRulesTab({ channels }: { channels: BrandGuide['channelBranding'] }) {
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{channels.map((ch) => {
|
||||
const Icon = getChannelIcon(ch.icon);
|
||||
return (
|
||||
<div key={ch.channel} className="rounded-2xl border border-slate-100 p-5">
|
||||
{/* Header */}
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-9 h-9 rounded-lg bg-gradient-to-br from-[#6C5CE7]/10 to-[#4F1DA1]/10 flex items-center justify-center">
|
||||
<Icon size={18} className="text-[#6C5CE7]" />
|
||||
</div>
|
||||
<p className="font-bold text-[#0A1128]">{ch.channel}</p>
|
||||
<span
|
||||
className={`ml-auto text-xs font-medium px-3 py-1 rounded-full border ${
|
||||
statusColor[ch.currentStatus]
|
||||
}`}
|
||||
>
|
||||
{statusLabel[ch.currentStatus]}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Specs */}
|
||||
<div className="space-y-3 text-sm">
|
||||
<div>
|
||||
<p className="text-slate-500 text-xs uppercase tracking-wide mb-1">Profile Photo</p>
|
||||
<p className="text-slate-700 font-medium">{ch.profilePhoto}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-slate-500 text-xs uppercase tracking-wide mb-1">Banner Spec</p>
|
||||
<p className="text-slate-700 font-medium">{ch.bannerSpec}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-slate-500 text-xs uppercase tracking-wide mb-1">Bio Template</p>
|
||||
<div className="bg-slate-50 rounded-xl p-3">
|
||||
<p className="font-mono text-xs text-slate-600 whitespace-pre-wrap">
|
||||
{ch.bioTemplate}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Brand Consistency Tab (accordion) ─── */
|
||||
function BrandConsistencyTab({ inconsistencies }: { inconsistencies: BrandInconsistency[] }) {
|
||||
const [expanded, setExpanded] = useState<number | null>(0);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<div className="space-y-3">
|
||||
{inconsistencies.map((item, i) => (
|
||||
<div
|
||||
key={item.field}
|
||||
className="rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden"
|
||||
>
|
||||
{/* Header */}
|
||||
<button
|
||||
onClick={() => setExpanded(expanded === i ? null : i)}
|
||||
className="w-full flex items-center justify-between p-5 text-left hover:bg-slate-50/50 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-8 h-8 rounded-lg bg-[#0A1128] flex items-center justify-center text-white text-xs font-bold">
|
||||
{item.values.filter((v) => !v.isCorrect).length}
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-semibold text-[#0A1128]">{item.field}</p>
|
||||
<p className="text-xs text-slate-500">
|
||||
{item.values.filter((v) => !v.isCorrect).length}개 채널 불일치
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<ArrowRight
|
||||
size={16}
|
||||
className={`text-slate-400 transition-transform ${
|
||||
expanded === i ? 'rotate-90' : ''
|
||||
}`}
|
||||
/>
|
||||
</button>
|
||||
|
||||
{/* Expanded */}
|
||||
{expanded === i && (
|
||||
<div className="px-5 pb-5 border-t border-slate-100">
|
||||
<div className="grid gap-2 mt-4 mb-4">
|
||||
{item.values.map((v) => (
|
||||
<div
|
||||
key={v.channel}
|
||||
className={`flex items-center justify-between py-3 px-3 rounded-lg text-sm ${
|
||||
v.isCorrect ? 'bg-[#F3F0FF]/60' : 'bg-[#FFF0F0]/60'
|
||||
}`}
|
||||
>
|
||||
<span className="font-medium text-slate-700 min-w-[100px]">
|
||||
{v.channel}
|
||||
</span>
|
||||
<span
|
||||
className={`flex-1 text-right ${
|
||||
v.isCorrect ? 'text-[#4A3A7C]' : 'text-[#7C3A4B]'
|
||||
}`}
|
||||
>
|
||||
{v.value}
|
||||
</span>
|
||||
<span className="ml-3">
|
||||
{v.isCorrect ? (
|
||||
<CheckCircle2 size={15} className="text-[#9B8AD4]" />
|
||||
) : (
|
||||
<XCircle size={15} className="text-[#D4889A]" />
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Impact */}
|
||||
<div className="rounded-xl bg-[#FFF6ED] border border-[#F5E0C5] p-4 mb-3">
|
||||
<p className="text-xs font-semibold text-[#7C5C3A] uppercase tracking-wide mb-1">
|
||||
<AlertCircle size={12} className="inline mr-1" />
|
||||
Impact
|
||||
</p>
|
||||
<p className="text-sm text-[#7C5C3A]">{item.impact}</p>
|
||||
</div>
|
||||
|
||||
{/* Recommendation */}
|
||||
<div className="rounded-xl bg-[#F3F0FF] border border-[#D5CDF5] p-4">
|
||||
<p className="text-xs font-semibold text-[#4A3A7C] uppercase tracking-wide mb-1">
|
||||
<CheckCircle2 size={12} className="inline mr-1" />
|
||||
Recommendation
|
||||
</p>
|
||||
<p className="text-sm text-[#4A3A7C]">{item.recommendation}</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Main Component ─── */
|
||||
export default function BrandingGuide({ data }: BrandingGuideProps) {
|
||||
const [activeTab, setActiveTab] = useState<TabKey>('visual');
|
||||
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="branding-guide"
|
||||
title="Branding Guide"
|
||||
subtitle="브랜딩 가이드 빌드"
|
||||
>
|
||||
{/* Tabs */}
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{tabItems.map((tab) => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeTab === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-lg'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{activeTab === 'visual' && <VisualIdentityTab data={data} />}
|
||||
{activeTab === 'tone' && <ToneVoiceTab tone={data.toneOfVoice} />}
|
||||
{activeTab === 'channels' && <ChannelRulesTab channels={data.channelBranding} />}
|
||||
{activeTab === 'consistency' && (
|
||||
<BrandConsistencyTab inconsistencies={data.brandInconsistencies} />
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
import { type ComponentType } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import {
|
||||
YoutubeFilled,
|
||||
InstagramFilled,
|
||||
FacebookFilled,
|
||||
GlobeFilled,
|
||||
VideoFilled,
|
||||
MessageFilled,
|
||||
CalendarFilled,
|
||||
TiktokFilled,
|
||||
} from '../icons/FilledIcons';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { ChannelStrategyCard } from '../../types/plan';
|
||||
|
||||
interface ChannelStrategyProps {
|
||||
channels: ChannelStrategyCard[];
|
||||
}
|
||||
|
||||
const channelIconMap: Record<string, ComponentType<{ size?: number; className?: string }>> = {
|
||||
youtube: YoutubeFilled,
|
||||
instagram: InstagramFilled,
|
||||
facebook: FacebookFilled,
|
||||
globe: GlobeFilled,
|
||||
video: VideoFilled,
|
||||
messagesquare: MessageFilled,
|
||||
tiktok: TiktokFilled,
|
||||
};
|
||||
|
||||
function getChannelIcon(icon: string) {
|
||||
return channelIconMap[icon.toLowerCase()] ?? GlobeFilled;
|
||||
}
|
||||
|
||||
const priorityStyle: Record<string, string> = {
|
||||
P0: 'bg-[#FFF0F0] text-[#7C3A4B] border border-[#F5D5DC] shadow-[2px_3px_8px_rgba(212,136,154,0.15)]',
|
||||
P1: 'bg-[#FFF6ED] text-[#7C5C3A] border border-[#F5E0C5] shadow-[2px_3px_8px_rgba(212,168,114,0.15)]',
|
||||
P2: 'bg-[#F3F0FF] text-[#4A3A7C] border border-[#D5CDF5] shadow-[2px_3px_8px_rgba(155,138,212,0.15)]',
|
||||
};
|
||||
|
||||
export default function ChannelStrategy({ channels }: ChannelStrategyProps) {
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="channel-strategy"
|
||||
title="Channel Strategy"
|
||||
subtitle="채널별 커뮤니케이션 전략"
|
||||
dark
|
||||
>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{channels.map((ch, index) => {
|
||||
const Icon = getChannelIcon(ch.icon);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
key={ch.channelId}
|
||||
className="bg-white rounded-2xl p-6 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:shadow-[4px_6px_16px_rgba(0,0,0,0.09)] transition-shadow"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: index * 0.1 }}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-[#F3F0FF] flex items-center justify-center">
|
||||
<Icon size={20} className="text-[#9B8AD4]" />
|
||||
</div>
|
||||
<h4 className="text-lg font-bold text-[#0A1128] flex-1">{ch.channelName}</h4>
|
||||
<span
|
||||
className={`text-xs font-semibold px-3 py-1 rounded-full ${
|
||||
priorityStyle[ch.priority] ?? 'bg-slate-100 text-slate-600'
|
||||
}`}
|
||||
>
|
||||
{ch.priority}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Current → Target */}
|
||||
<div className="flex items-center gap-2 mb-4 flex-wrap">
|
||||
<span className="bg-[#FFF0F0] text-[#7C3A4B] rounded-full px-3 py-1 text-xs font-medium border border-[#F5D5DC] shadow-[2px_3px_6px_rgba(212,136,154,0.12)]">
|
||||
{ch.currentStatus}
|
||||
</span>
|
||||
<span className="text-slate-400 text-sm">→</span>
|
||||
<span className="bg-[#F3F0FF] text-[#4A3A7C] rounded-full px-3 py-1 text-xs font-medium border border-[#D5CDF5] shadow-[2px_3px_6px_rgba(155,138,212,0.12)]">
|
||||
{ch.targetGoal}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Content Types */}
|
||||
<div className="flex flex-wrap gap-2 mb-4">
|
||||
{ch.contentTypes.map((type) => (
|
||||
<span
|
||||
key={type}
|
||||
className="bg-slate-50 border border-slate-100 rounded-full px-3 py-1 text-xs text-slate-600 font-medium shadow-[2px_3px_6px_rgba(0,0,0,0.04)]"
|
||||
>
|
||||
{type}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Posting Frequency */}
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<CalendarFilled size={14} className="text-[#9B8AD4] shrink-0" />
|
||||
<p className="text-sm text-slate-600">{ch.postingFrequency}</p>
|
||||
</div>
|
||||
|
||||
{/* Tone */}
|
||||
<p className="text-sm italic text-[#6C5CE7]/70 mb-4">{ch.tone}</p>
|
||||
|
||||
{/* Format Guidelines */}
|
||||
<ul className="space-y-2">
|
||||
{ch.formatGuidelines.map((guideline, i) => (
|
||||
<li key={i} className="flex items-start gap-2">
|
||||
<span className="shrink-0 w-2 h-2 rounded-full bg-[#6C5CE7] mt-2" />
|
||||
<span className="text-sm text-slate-700">{guideline}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
import { motion } from 'motion/react';
|
||||
import {
|
||||
VideoFilled,
|
||||
FileTextFilled,
|
||||
ShareFilled,
|
||||
MegaphoneFilled,
|
||||
} from '../icons/FilledIcons';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { CalendarData, ContentCategory, CalendarEntry } from '../../types/plan';
|
||||
|
||||
interface ContentCalendarProps {
|
||||
data: CalendarData;
|
||||
}
|
||||
|
||||
const contentTypeColors: Record<ContentCategory, { bg: string; text: string; entry: string; border: string; shadow: string }> = {
|
||||
video: { bg: 'bg-[#F3F0FF]', text: 'text-[#6C5CE7]', entry: 'bg-[#F3F0FF] border-[#D5CDF5]', border: 'border-[#D5CDF5]', shadow: 'shadow-[2px_3px_8px_rgba(155,138,212,0.15)]' },
|
||||
blog: { bg: 'bg-[#EFF0FF]', text: 'text-[#3A3F7C]', entry: 'bg-[#EFF0FF] border-[#C5CBF5]', border: 'border-[#C5CBF5]', shadow: 'shadow-[2px_3px_8px_rgba(122,132,212,0.15)]' },
|
||||
social: { bg: 'bg-[#FFF6ED]', text: 'text-[#7C5C3A]', entry: 'bg-[#FFF6ED] border-[#F5E0C5]', border: 'border-[#F5E0C5]', shadow: 'shadow-[2px_3px_8px_rgba(212,168,114,0.15)]' },
|
||||
ad: { bg: 'bg-[#FFF0F0]', text: 'text-[#7C3A4B]', entry: 'bg-[#FFF0F0] border-[#F5D5DC]', border: 'border-[#F5D5DC]', shadow: 'shadow-[2px_3px_8px_rgba(212,136,154,0.15)]' },
|
||||
};
|
||||
|
||||
const contentTypeLabels: Record<ContentCategory, string> = {
|
||||
video: 'Video',
|
||||
blog: 'Blog',
|
||||
social: 'Social',
|
||||
ad: 'Ad',
|
||||
};
|
||||
|
||||
const contentTypeIcons: Record<ContentCategory, typeof VideoFilled> = {
|
||||
video: VideoFilled,
|
||||
blog: FileTextFilled,
|
||||
social: ShareFilled,
|
||||
ad: MegaphoneFilled,
|
||||
};
|
||||
|
||||
const dayHeaders = ['월', '화', '수', '목', '금', '토', '일'];
|
||||
|
||||
export default function ContentCalendar({ data }: ContentCalendarProps) {
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="content-calendar"
|
||||
title="Content Calendar"
|
||||
subtitle="콘텐츠 캘린더 (월간)"
|
||||
dark
|
||||
>
|
||||
{/* Monthly Summary */}
|
||||
<div className="flex flex-wrap gap-4 mb-8">
|
||||
{data.monthlySummary.map((item) => {
|
||||
const colors = contentTypeColors[item.type];
|
||||
return (
|
||||
<motion.div
|
||||
key={item.type}
|
||||
className={`flex-1 min-w-[140px] rounded-2xl border p-4 ${colors.bg} ${colors.border} ${colors.shadow}`}
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<span
|
||||
className="w-3 h-3 rounded-full"
|
||||
style={{ backgroundColor: item.color }}
|
||||
/>
|
||||
<span className={`text-sm font-medium ${colors.text}`}>{item.label}</span>
|
||||
</div>
|
||||
<span className={`text-2xl font-bold ${colors.text}`}>{item.count}</span>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* Weekly Calendar Grid */}
|
||||
{data.weeks.map((week, weekIdx) => {
|
||||
const dayCells: CalendarEntry[][] = Array.from({ length: 7 }, () => []);
|
||||
for (const entry of week.entries) {
|
||||
const dayIndex = entry.dayOfWeek;
|
||||
if (dayIndex >= 0 && dayIndex <= 6) {
|
||||
dayCells[dayIndex].push(entry);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
key={week.weekNumber}
|
||||
className="bg-white rounded-2xl p-5 mb-4 shadow-[3px_4px_12px_rgba(0,0,0,0.06)]"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: weekIdx * 0.1 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-[#0A1128] mb-3">{week.label}</p>
|
||||
<div className="grid grid-cols-7 gap-2">
|
||||
{/* Day headers */}
|
||||
{dayHeaders.map((day) => (
|
||||
<div
|
||||
key={day}
|
||||
className="text-xs text-slate-400 uppercase tracking-wide text-center mb-1 font-medium"
|
||||
>
|
||||
{day}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* Day cells */}
|
||||
{dayCells.map((entries, dayIdx) => (
|
||||
<div
|
||||
key={dayIdx}
|
||||
className={`min-h-[80px] rounded-xl p-2 ${
|
||||
entries.length > 0
|
||||
? 'bg-slate-50/50 border border-slate-100'
|
||||
: 'border border-dashed border-slate-200/60'
|
||||
}`}
|
||||
>
|
||||
{entries.map((entry, entryIdx) => {
|
||||
const colors = contentTypeColors[entry.contentType];
|
||||
const Icon = contentTypeIcons[entry.contentType];
|
||||
return (
|
||||
<div
|
||||
key={entryIdx}
|
||||
className={`${colors.entry} border rounded-lg p-2 mb-1 shadow-[2px_2px_6px_rgba(0,0,0,0.04)]`}
|
||||
>
|
||||
<div className="flex items-center gap-1 mb-1">
|
||||
<Icon size={11} className={colors.text} />
|
||||
</div>
|
||||
<p className="text-sm text-slate-700 leading-tight">
|
||||
{entry.title}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
|
||||
{/* Color Legend */}
|
||||
<div className="flex flex-wrap gap-3 mt-4">
|
||||
{(Object.keys(contentTypeColors) as ContentCategory[]).map((type) => {
|
||||
const colors = contentTypeColors[type];
|
||||
return (
|
||||
<span
|
||||
key={type}
|
||||
className={`${colors.bg} ${colors.text} border ${colors.border} rounded-full px-3 py-1 text-xs font-medium ${colors.shadow}`}
|
||||
>
|
||||
{contentTypeLabels[type]}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
import { useState } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { ArrowRight, Video, FileText, Share2, Megaphone } from 'lucide-react';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { ContentStrategyData } from '../../types/plan';
|
||||
|
||||
interface ContentStrategyProps {
|
||||
data: ContentStrategyData;
|
||||
}
|
||||
|
||||
const tabItems = [
|
||||
{ key: 'pillars', label: 'Content Pillars', labelKr: '콘텐츠 필러' },
|
||||
{ key: 'types', label: 'Content Types', labelKr: '콘텐츠 유형' },
|
||||
{ key: 'workflow', label: 'Production Workflow', labelKr: '제작 워크플로우' },
|
||||
{ key: 'repurposing', label: 'Repurposing', labelKr: '콘텐츠 재활용' },
|
||||
] as const;
|
||||
|
||||
type TabKey = (typeof tabItems)[number]['key'];
|
||||
|
||||
const channelColorMap: Record<string, string> = {
|
||||
YouTube: 'bg-[#FFF0F0] text-[#7C3A4B]',
|
||||
Instagram: 'bg-pink-100 text-pink-700',
|
||||
Blog: 'bg-[#EFF0FF] text-[#3A3F7C]',
|
||||
'블로그': 'bg-[#EFF0FF] text-[#3A3F7C]',
|
||||
'네이버블로그': 'bg-[#F3F0FF] text-[#4A3A7C]',
|
||||
'네이버': 'bg-[#F3F0FF] text-[#4A3A7C]',
|
||||
Facebook: 'bg-indigo-100 text-indigo-700',
|
||||
'홈페이지': 'bg-slate-100 text-slate-700',
|
||||
Website: 'bg-slate-100 text-slate-700',
|
||||
TikTok: 'bg-purple-100 text-purple-700',
|
||||
'카카오': 'bg-[#FFF6ED] text-[#7C5C3A]',
|
||||
};
|
||||
|
||||
function getChannelBadgeClass(channel: string): string {
|
||||
for (const [key, value] of Object.entries(channelColorMap)) {
|
||||
if (channel.toLowerCase().includes(key.toLowerCase())) return value;
|
||||
}
|
||||
return 'bg-slate-100 text-slate-700';
|
||||
}
|
||||
|
||||
export default function ContentStrategy({ data }: ContentStrategyProps) {
|
||||
const [activeTab, setActiveTab] = useState<TabKey>('pillars');
|
||||
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="content-strategy"
|
||||
title="Content Strategy"
|
||||
subtitle="콘텐츠 마케팅 전략"
|
||||
>
|
||||
{/* Tabs */}
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{tabItems.map((tab) => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeTab === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-lg'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Tab 1: Content Pillars */}
|
||||
{activeTab === 'pillars' && (
|
||||
<motion.div
|
||||
className="grid md:grid-cols-2 gap-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
{data.pillars.map((pillar, i) => (
|
||||
<motion.div
|
||||
key={pillar.title}
|
||||
className="rounded-2xl border border-slate-100 bg-white shadow-sm p-6 border-l-4"
|
||||
style={{ borderLeftColor: pillar.color }}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4, delay: i * 0.1 }}
|
||||
>
|
||||
<h4 className="font-serif text-xl font-bold text-[#0A1128] mb-2">
|
||||
{pillar.title}
|
||||
</h4>
|
||||
<p className="text-sm text-slate-600 mb-3">{pillar.description}</p>
|
||||
<span className="inline-block rounded-full bg-slate-100 px-3 py-1 text-xs font-medium text-slate-700 mb-4">
|
||||
{pillar.relatedUSP}
|
||||
</span>
|
||||
<ul className="space-y-2">
|
||||
{pillar.exampleTopics.map((topic, j) => (
|
||||
<li key={j} className="flex items-start gap-2 text-sm text-slate-700">
|
||||
<span
|
||||
className="shrink-0 w-2 h-2 rounded-full mt-2"
|
||||
style={{ backgroundColor: pillar.color }}
|
||||
/>
|
||||
{topic}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Tab 2: Content Types */}
|
||||
{activeTab === 'types' && (
|
||||
<motion.div
|
||||
className="rounded-2xl overflow-hidden border border-slate-100"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<div className="grid grid-cols-4 bg-[#0A1128] text-white">
|
||||
<div className="px-6 py-4 text-sm font-semibold">Format</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">Channels</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">Frequency</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">Purpose</div>
|
||||
</div>
|
||||
{data.typeMatrix.map((row, i) => (
|
||||
<motion.div
|
||||
key={row.format}
|
||||
className={`grid grid-cols-4 ${i % 2 === 0 ? 'bg-white' : 'bg-slate-50'}`}
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.3, delay: i * 0.04 }}
|
||||
>
|
||||
<div className="px-6 py-4 text-sm font-medium text-[#0A1128]">
|
||||
{row.format}
|
||||
</div>
|
||||
<div className="px-6 py-4 flex flex-wrap gap-2">
|
||||
{row.channels.map((ch) => (
|
||||
<span
|
||||
key={ch}
|
||||
className={`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium ${getChannelBadgeClass(ch)}`}
|
||||
>
|
||||
{ch}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className="px-6 py-4 text-sm text-slate-700">{row.frequency}</div>
|
||||
<div className="px-6 py-4 text-sm text-slate-600">{row.purpose}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Tab 3: Production Workflow */}
|
||||
{activeTab === 'workflow' && (
|
||||
<motion.div
|
||||
className="flex md:flex-row flex-col gap-4 items-stretch"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
{data.workflow.map((step, i) => (
|
||||
<div key={step.step} className="flex md:flex-row flex-col items-center gap-4 flex-1">
|
||||
<motion.div
|
||||
className="flex-1 w-full rounded-2xl border border-slate-100 bg-white shadow-sm p-5"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4, delay: i * 0.1 }}
|
||||
>
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white font-bold flex items-center justify-center mb-3">
|
||||
{step.step}
|
||||
</div>
|
||||
<h4 className="font-semibold text-[#0A1128] mb-1">{step.name}</h4>
|
||||
<p className="text-sm text-slate-600 mb-3">{step.description}</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<span className="rounded-full bg-purple-50 text-purple-700 px-2 py-1 text-xs">
|
||||
{step.owner}
|
||||
</span>
|
||||
<span className="rounded-full bg-slate-100 text-slate-600 px-2 py-1 text-xs">
|
||||
{step.duration}
|
||||
</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
{i < data.workflow.length - 1 && (
|
||||
<ArrowRight
|
||||
size={20}
|
||||
className="text-slate-300 shrink-0 hidden md:block"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Tab 4: Repurposing */}
|
||||
{activeTab === 'repurposing' && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
{/* Source Card */}
|
||||
<div className="rounded-2xl bg-gradient-to-r from-[#4F1DA1] to-[#021341] p-6 text-white mb-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<Video size={28} className="text-purple-300" />
|
||||
<h4 className="font-serif text-xl font-bold">{data.repurposingSource}</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Connector */}
|
||||
<div className="flex justify-center mb-6">
|
||||
<div className="w-px h-8 bg-gradient-to-b from-[#4F1DA1] to-slate-200" />
|
||||
</div>
|
||||
|
||||
{/* Outputs Grid */}
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-3">
|
||||
{data.repurposingOutputs.map((output, i) => (
|
||||
<motion.div
|
||||
key={`${output.format}-${i}`}
|
||||
className="rounded-xl border border-slate-100 bg-white p-4"
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.3, delay: i * 0.05 }}
|
||||
>
|
||||
<p className="font-semibold text-sm text-[#0A1128] mb-1">{output.format}</p>
|
||||
<p className="text-xs text-slate-500 mb-1">{output.channel}</p>
|
||||
<p className="text-xs text-slate-600">{output.description}</p>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
import { useState, useRef, useCallback, type DragEvent, type ChangeEvent } from 'react';
|
||||
import { motion, AnimatePresence } from 'motion/react';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import { VideoFilled, FileTextFilled } from '../icons/FilledIcons';
|
||||
|
||||
// ─── Types ───
|
||||
|
||||
type UploadCategory = 'all' | 'image' | 'video' | 'text';
|
||||
|
||||
interface UploadedAsset {
|
||||
id: string;
|
||||
file: File;
|
||||
category: 'image' | 'video' | 'text';
|
||||
previewUrl: string | null;
|
||||
name: string;
|
||||
size: string;
|
||||
uploadedAt: Date;
|
||||
}
|
||||
|
||||
// ─── Helpers ───
|
||||
|
||||
function categorize(file: File): 'image' | 'video' | 'text' {
|
||||
if (file.type.startsWith('image/')) return 'image';
|
||||
if (file.type.startsWith('video/')) return 'video';
|
||||
return 'text';
|
||||
}
|
||||
|
||||
function formatSize(bytes: number): string {
|
||||
if (bytes >= 1_048_576) return `${(bytes / 1_048_576).toFixed(1)} MB`;
|
||||
if (bytes >= 1024) return `${Math.round(bytes / 1024)} KB`;
|
||||
return `${bytes} B`;
|
||||
}
|
||||
|
||||
function uid() {
|
||||
return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
||||
}
|
||||
|
||||
const categoryConfig: Record<UploadCategory, { label: string }> = {
|
||||
all: { label: '전체' },
|
||||
image: { label: 'Image' },
|
||||
video: { label: 'Video' },
|
||||
text: { label: 'Text' },
|
||||
};
|
||||
|
||||
const categoryBadge: Record<'image' | 'video' | 'text', string> = {
|
||||
image: 'bg-[#F3F0FF] text-[#4A3A7C] shadow-[2px_3px_6px_rgba(155,138,212,0.12)]',
|
||||
video: 'bg-[#FFF0F0] text-[#7C3A4B] shadow-[2px_3px_6px_rgba(212,136,154,0.12)]',
|
||||
text: 'bg-[#FFF6ED] text-[#7C5C3A] shadow-[2px_3px_6px_rgba(212,168,114,0.12)]',
|
||||
};
|
||||
|
||||
const ACCEPT_MAP: Record<string, string> = {
|
||||
'image/*': '.jpg,.jpeg,.png,.gif,.webp,.svg',
|
||||
'video/*': '.mp4,.mov,.webm,.avi',
|
||||
'text/*': '.txt,.md,.doc,.docx,.pdf,.csv,.json',
|
||||
};
|
||||
const ALL_ACCEPT = Object.values(ACCEPT_MAP).join(',');
|
||||
|
||||
// ─── Component ───
|
||||
|
||||
export default function MyAssetUpload() {
|
||||
const [assets, setAssets] = useState<UploadedAsset[]>([]);
|
||||
const [activeFilter, setActiveFilter] = useState<UploadCategory>('all');
|
||||
const [isDragOver, setIsDragOver] = useState(false);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const processFiles = useCallback((files: FileList | File[]) => {
|
||||
const newAssets: UploadedAsset[] = Array.from(files).map((file) => {
|
||||
const cat = categorize(file);
|
||||
const previewUrl =
|
||||
cat === 'image' || cat === 'video'
|
||||
? URL.createObjectURL(file)
|
||||
: null;
|
||||
return {
|
||||
id: uid(),
|
||||
file,
|
||||
category: cat,
|
||||
previewUrl,
|
||||
name: file.name,
|
||||
size: formatSize(file.size),
|
||||
uploadedAt: new Date(),
|
||||
};
|
||||
});
|
||||
setAssets((prev) => [...newAssets, ...prev]);
|
||||
}, []);
|
||||
|
||||
const handleDrop = useCallback(
|
||||
(e: DragEvent) => {
|
||||
e.preventDefault();
|
||||
setIsDragOver(false);
|
||||
if (e.dataTransfer.files.length) processFiles(e.dataTransfer.files);
|
||||
},
|
||||
[processFiles],
|
||||
);
|
||||
|
||||
const handleInputChange = useCallback(
|
||||
(e: ChangeEvent<HTMLInputElement>) => {
|
||||
if (e.target.files?.length) {
|
||||
processFiles(e.target.files);
|
||||
e.target.value = '';
|
||||
}
|
||||
},
|
||||
[processFiles],
|
||||
);
|
||||
|
||||
const removeAsset = useCallback((id: string) => {
|
||||
setAssets((prev) => {
|
||||
const found = prev.find((a) => a.id === id);
|
||||
if (found?.previewUrl) URL.revokeObjectURL(found.previewUrl);
|
||||
return prev.filter((a) => a.id !== id);
|
||||
});
|
||||
}, []);
|
||||
|
||||
const filtered =
|
||||
activeFilter === 'all' ? assets : assets.filter((a) => a.category === activeFilter);
|
||||
|
||||
const counts = {
|
||||
all: assets.length,
|
||||
image: assets.filter((a) => a.category === 'image').length,
|
||||
video: assets.filter((a) => a.category === 'video').length,
|
||||
text: assets.filter((a) => a.category === 'text').length,
|
||||
};
|
||||
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="my-asset-upload"
|
||||
title="My Assets"
|
||||
subtitle="나의 에셋 업로드"
|
||||
>
|
||||
{/* Drop Zone */}
|
||||
<div
|
||||
onDragOver={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||
onDragLeave={() => setIsDragOver(false)}
|
||||
onDrop={handleDrop}
|
||||
onClick={() => inputRef.current?.click()}
|
||||
className={`relative rounded-2xl border-2 border-dashed p-10 md:p-14 text-center cursor-pointer transition-all mb-8 ${
|
||||
isDragOver
|
||||
? 'border-[#9B8AD4] bg-[#F3F0FF]/60 scale-[1.01]'
|
||||
: 'border-slate-200 bg-slate-50/50 hover:border-[#D5CDF5] hover:bg-[#F3F0FF]/20'
|
||||
}`}
|
||||
>
|
||||
<input
|
||||
ref={inputRef}
|
||||
type="file"
|
||||
multiple
|
||||
accept={ALL_ACCEPT}
|
||||
onChange={handleInputChange}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
{/* Upload Icon */}
|
||||
<div className="flex justify-center mb-4">
|
||||
<div className="w-14 h-14 rounded-2xl bg-[#F3F0FF] flex items-center justify-center shadow-[3px_4px_12px_rgba(155,138,212,0.15)]">
|
||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none">
|
||||
<path
|
||||
d="M12 16V4M12 4L8 8M12 4L16 8"
|
||||
stroke="#9B8AD4"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M4 14V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V14"
|
||||
stroke="#9B8AD4"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p className="text-[#0A1128] font-semibold mb-1">
|
||||
파일을 드래그하거나 클릭하여 업로드
|
||||
</p>
|
||||
<p className="text-sm text-slate-400">
|
||||
Image, Video, Text 파일 지원 (JPG, PNG, MP4, MOV, TXT, PDF, DOC 등)
|
||||
</p>
|
||||
|
||||
{/* File Type Badges */}
|
||||
<div className="flex justify-center gap-2 mt-4">
|
||||
{(['image', 'video', 'text'] as const).map((cat) => (
|
||||
<span
|
||||
key={cat}
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${categoryBadge[cat]}`}
|
||||
>
|
||||
{cat === 'image' ? 'Image' : cat === 'video' ? 'Video' : 'Text'}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Filter Tabs + Count */}
|
||||
{assets.length > 0 && (
|
||||
<>
|
||||
<div className="flex flex-wrap items-center gap-2 mb-6">
|
||||
{(Object.keys(categoryConfig) as UploadCategory[]).map((key) => (
|
||||
<button
|
||||
key={key}
|
||||
onClick={() => setActiveFilter(key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeFilter === key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-md'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50 shadow-[2px_3px_6px_rgba(0,0,0,0.04)]'
|
||||
}`}
|
||||
>
|
||||
{categoryConfig[key].label}
|
||||
<span className="ml-2 opacity-70">{counts[key]}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Uploaded Assets Grid */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
<AnimatePresence mode="popLayout">
|
||||
{filtered.map((asset) => (
|
||||
<motion.div
|
||||
key={asset.id}
|
||||
layout
|
||||
className="bg-white rounded-2xl border border-slate-100 overflow-hidden shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:shadow-[4px_6px_16px_rgba(0,0,0,0.09)] transition-shadow group"
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
exit={{ opacity: 0, scale: 0.9 }}
|
||||
transition={{ duration: 0.25 }}
|
||||
>
|
||||
{/* Preview Area */}
|
||||
<div className="relative h-40 bg-slate-50 flex items-center justify-center overflow-hidden">
|
||||
{asset.category === 'image' && asset.previewUrl && (
|
||||
<img
|
||||
src={asset.previewUrl}
|
||||
alt={asset.name}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
)}
|
||||
{asset.category === 'video' && asset.previewUrl && (
|
||||
<video
|
||||
src={asset.previewUrl}
|
||||
className="w-full h-full object-cover"
|
||||
muted
|
||||
playsInline
|
||||
onMouseOver={(e) => (e.target as HTMLVideoElement).play()}
|
||||
onMouseOut={(e) => {
|
||||
const v = e.target as HTMLVideoElement;
|
||||
v.pause();
|
||||
v.currentTime = 0;
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{asset.category === 'text' && (
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<FileTextFilled size={36} className="text-[#D4A872]" />
|
||||
<span className="text-xs text-slate-400 font-medium">
|
||||
{asset.name.split('.').pop()?.toUpperCase()}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Remove Button */}
|
||||
<button
|
||||
onClick={() => removeAsset(asset.id)}
|
||||
className="absolute top-2 right-2 w-7 h-7 rounded-full bg-white/90 backdrop-blur-sm border border-slate-100 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm hover:bg-[#FFF0F0]"
|
||||
>
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
|
||||
<path d="M2 2L10 10M10 2L2 10" stroke="#7C3A4B" strokeWidth="1.5" strokeLinecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{/* Category Badge */}
|
||||
<span
|
||||
className={`absolute top-2 left-2 rounded-full px-3 py-1 text-xs font-semibold ${categoryBadge[asset.category]}`}
|
||||
>
|
||||
{asset.category === 'image'
|
||||
? 'Image'
|
||||
: asset.category === 'video'
|
||||
? 'Video'
|
||||
: 'Text'}
|
||||
</span>
|
||||
|
||||
{/* Video Duration Overlay */}
|
||||
{asset.category === 'video' && (
|
||||
<div className="absolute bottom-2 right-2 flex items-center gap-1 bg-black/50 backdrop-blur-sm rounded-full px-2 py-1">
|
||||
<VideoFilled size={10} className="text-white" />
|
||||
<span className="text-xs text-white font-medium">Video</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Info */}
|
||||
<div className="p-4">
|
||||
<p className="text-sm font-medium text-[#0A1128] truncate mb-1">
|
||||
{asset.name}
|
||||
</p>
|
||||
<p className="text-xs text-slate-400">{asset.size}</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { Rocket, Download, Loader2 } from 'lucide-react';
|
||||
import { useExportPDF } from '../../hooks/useExportPDF';
|
||||
|
||||
export default function PlanCTA() {
|
||||
const { exportPDF, isExporting } = useExportPDF();
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<motion.section
|
||||
className="py-16 md:py-20 px-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, ease: 'easeOut' }}
|
||||
>
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<div
|
||||
data-cta-card
|
||||
className="rounded-2xl bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff] p-10 md:p-14 text-center"
|
||||
>
|
||||
<div className="flex justify-center mb-6">
|
||||
<div className="w-14 h-14 rounded-full bg-white/80 backdrop-blur-sm border border-white/40 flex items-center justify-center">
|
||||
<Rocket size={28} className="text-[#4F1DA1]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 className="font-serif text-2xl md:text-3xl font-bold text-[#021341] mb-3">
|
||||
콘텐츠 제작을 시작하세요
|
||||
</h3>
|
||||
|
||||
<p className="text-[#021341]/60 mb-8 max-w-lg mx-auto">
|
||||
INFINITH가 브랜딩부터 콘텐츠 제작, 채널 배포까지 자동화합니다.
|
||||
</p>
|
||||
|
||||
<div className="flex flex-col sm:flex-row gap-3 justify-center">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => navigate('/studio/view-clinic')}
|
||||
className="inline-flex items-center justify-center gap-2 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] px-6 py-3 text-sm font-medium text-white shadow-md hover:shadow-lg transition-shadow"
|
||||
>
|
||||
콘텐츠 제작 시작
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => exportPDF('INFINITH_Marketing_Plan')}
|
||||
disabled={isExporting}
|
||||
className="inline-flex items-center justify-center gap-2 rounded-full bg-white border border-slate-200 px-6 py-3 text-sm font-medium text-[#021341] shadow-sm hover:shadow-md transition-shadow disabled:opacity-60"
|
||||
>
|
||||
{isExporting ? (
|
||||
<Loader2 size={16} className="animate-spin" />
|
||||
) : (
|
||||
<Download size={16} />
|
||||
)}
|
||||
플랜 다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Calendar, Globe } from 'lucide-react';
|
||||
|
||||
interface PlanHeaderProps {
|
||||
clinicName: string;
|
||||
clinicNameEn: string;
|
||||
date: string;
|
||||
targetUrl: string;
|
||||
}
|
||||
|
||||
export default function PlanHeader({
|
||||
clinicName,
|
||||
clinicNameEn,
|
||||
date,
|
||||
targetUrl,
|
||||
}: PlanHeaderProps) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-[radial-gradient(ellipse_at_top_left,#e0e7ff,transparent_50%),radial-gradient(ellipse_at_bottom_right,#fce7f3,transparent_50%),radial-gradient(ellipse_at_center,#f5f3ff,transparent_60%)] py-20 md:py-28 px-6">
|
||||
{/* Animated blobs */}
|
||||
<motion.div
|
||||
className="absolute top-10 left-10 w-72 h-72 rounded-full bg-indigo-200/30 blur-3xl"
|
||||
animate={{ x: [0, 30, 0], y: [0, -20, 0] }}
|
||||
transition={{ duration: 8, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
<motion.div
|
||||
className="absolute bottom-10 right-10 w-96 h-96 rounded-full bg-pink-200/30 blur-3xl"
|
||||
animate={{ x: [0, -20, 0], y: [0, 30, 0] }}
|
||||
transition={{ duration: 10, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
<motion.div
|
||||
className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-80 rounded-full bg-purple-200/20 blur-3xl"
|
||||
animate={{ scale: [1, 1.1, 1] }}
|
||||
transition={{ duration: 6, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="flex flex-col md:flex-row items-center md:items-start justify-between gap-10">
|
||||
{/* Left: Text content */}
|
||||
<motion.div
|
||||
className="flex-1 text-center md:text-left"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<motion.p
|
||||
className="text-xs font-semibold text-[#6C5CE7] mb-4 tracking-widest uppercase"
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.1 }}
|
||||
>
|
||||
Marketing Execution Plan
|
||||
</motion.p>
|
||||
|
||||
<motion.h1
|
||||
className="font-serif text-4xl md:text-5xl font-bold text-[#0A1128] mb-3"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
>
|
||||
{clinicName}
|
||||
</motion.h1>
|
||||
|
||||
<motion.p
|
||||
className="text-xl text-slate-600 mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
{clinicNameEn}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
className="flex flex-wrap gap-3 justify-center md:justify-start"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.4 }}
|
||||
>
|
||||
<span className="inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700">
|
||||
<Calendar size={14} className="text-slate-400" />
|
||||
{date}
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700">
|
||||
<Globe size={14} className="text-slate-400" />
|
||||
{targetUrl}
|
||||
</span>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
{/* Right: 90 Days badge */}
|
||||
<motion.div
|
||||
className="shrink-0"
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.3 }}
|
||||
>
|
||||
<div className="w-32 h-32 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] flex flex-col items-center justify-center shadow-lg">
|
||||
<span className="text-4xl font-bold text-white leading-none">
|
||||
90
|
||||
</span>
|
||||
<span className="text-sm text-purple-200">Days</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import type { ComponentType } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube, Instagram, Globe, Star, Facebook, Search } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { ScoreRing } from './ui/ScoreRing';
|
||||
import { SeverityBadge } from './ui/SeverityBadge';
|
||||
import type { ChannelScore } from '../../types/report';
|
||||
|
||||
interface ChannelOverviewProps {
|
||||
channels: ChannelScore[];
|
||||
}
|
||||
|
||||
const iconMap: Record<string, ComponentType<{ size?: number; className?: string }>> = {
|
||||
youtube: Youtube,
|
||||
instagram: Instagram,
|
||||
facebook: Facebook,
|
||||
star: Star,
|
||||
globe: Globe,
|
||||
search: Search,
|
||||
};
|
||||
|
||||
const brandColor: Record<string, string> = {
|
||||
facebook: '#1877F2',
|
||||
instagram: '#E1306C',
|
||||
youtube: '#FF0000',
|
||||
globe: '#6B2D8B',
|
||||
};
|
||||
|
||||
function getChannelColor(icon: string | undefined): string | undefined {
|
||||
return brandColor[icon?.toLowerCase() ?? ''];
|
||||
}
|
||||
|
||||
export default function ChannelOverview({ channels }: ChannelOverviewProps) {
|
||||
return (
|
||||
<SectionWrapper id="channel-overview" title="Channel Health Score" subtitle="채널별 건강도 종합">
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
||||
{channels.map((ch, i) => {
|
||||
const Icon = iconMap[ch.icon?.toLowerCase()] ?? Globe;
|
||||
const color = getChannelColor(ch.icon);
|
||||
return (
|
||||
<motion.div
|
||||
key={ch.channel}
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-4 text-center flex flex-col items-center gap-3"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: i * 0.08 }}
|
||||
>
|
||||
<div className="w-10 h-10 rounded-xl bg-slate-50 flex items-center justify-center">
|
||||
<Icon size={20} style={color ? { color } : undefined} className={color ? '' : 'text-slate-500'} />
|
||||
</div>
|
||||
<p className="text-sm font-medium text-[#0A1128]">{ch.channel}</p>
|
||||
<ScoreRing score={ch.score} maxScore={ch.maxScore} size={60} color={color} />
|
||||
<p className="text-xs text-slate-500 line-clamp-2 leading-relaxed">
|
||||
{ch.headline}
|
||||
</p>
|
||||
<SeverityBadge severity={ch.status} />
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Calendar, Users, MapPin, Phone, Award, Star, Globe } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import type { ClinicSnapshot as ClinicSnapshotType } from '../../types/report';
|
||||
|
||||
interface ClinicSnapshotProps {
|
||||
data: ClinicSnapshotType;
|
||||
}
|
||||
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(2)}M`;
|
||||
if (n >= 1_000) return `${(n / 1_000).toFixed(0)}K`;
|
||||
return n.toLocaleString();
|
||||
}
|
||||
|
||||
const infoFields = (data: ClinicSnapshotType) => [
|
||||
{ label: '개원', value: `${data.established} (${data.yearsInBusiness}년)`, icon: Calendar },
|
||||
{ label: '의료진', value: `${data.staffCount}명`, icon: Users },
|
||||
{ label: '강남언니 평점', value: `${data.overallRating} / 5.0`, icon: Star },
|
||||
{ label: '리뷰 수', value: formatNumber(data.totalReviews), icon: Star },
|
||||
{ label: '시술 가격대', value: `${data.priceRange.min} ~ ${data.priceRange.max}`, icon: Globe },
|
||||
{ label: '위치', value: `${data.location} (${data.nearestStation})`, icon: MapPin },
|
||||
{ label: '전화', value: data.phone, icon: Phone },
|
||||
{ label: '도메인', value: data.domain, icon: Globe },
|
||||
];
|
||||
|
||||
export default function ClinicSnapshot({ data }: ClinicSnapshotProps) {
|
||||
const fields = infoFields(data);
|
||||
|
||||
return (
|
||||
<SectionWrapper id="clinic-snapshot" title="Clinic Overview" subtitle="병원 기본 정보">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8">
|
||||
{fields.map((field, i) => {
|
||||
const Icon = field.icon;
|
||||
return (
|
||||
<motion.div
|
||||
key={field.label}
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-5"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: i * 0.05 }}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="shrink-0 w-8 h-8 rounded-lg bg-slate-50 flex items-center justify-center">
|
||||
<Icon size={16} className="text-slate-400" />
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<p className="text-xs text-slate-500 uppercase tracking-wide">{field.label}</p>
|
||||
<p className="text-lg font-semibold text-[#0A1128] mt-1">{field.value}</p>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* Lead Doctor Highlight */}
|
||||
<motion.div
|
||||
className="rounded-2xl bg-gradient-to-r from-[#4F1DA1]/5 to-[#021341]/5 border border-purple-100 p-6 mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<Award size={20} className="text-[#6C5CE7]" />
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">대표 원장</h3>
|
||||
</div>
|
||||
<p className="text-xl font-bold text-[#0A1128] mb-1">{data.leadDoctor.name}</p>
|
||||
<p className="text-sm text-slate-600 mb-3">{data.leadDoctor.credentials}</p>
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex items-center gap-1">
|
||||
{Array.from({ length: 5 }).map((_, i) => (
|
||||
<Star
|
||||
key={i}
|
||||
size={16}
|
||||
className={i < Math.round(data.leadDoctor.rating) ? 'text-[#6B2D8B] fill-[#6B2D8B]' : 'text-slate-200'}
|
||||
/>
|
||||
))}
|
||||
<span className="text-sm font-semibold text-[#0A1128] ml-1">
|
||||
{data.leadDoctor.rating}
|
||||
</span>
|
||||
</div>
|
||||
<span className="text-sm text-slate-500">
|
||||
리뷰 {formatNumber(data.leadDoctor.reviewCount)}건
|
||||
</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Certifications */}
|
||||
{data.certifications.length > 0 && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.4 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-3">인증 및 자격</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{data.certifications.map((cert) => (
|
||||
<span
|
||||
key={cert}
|
||||
className="rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700"
|
||||
>
|
||||
{cert}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
import { useState } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import {
|
||||
Facebook, AlertCircle, AlertTriangle, ExternalLink, CheckCircle2, XCircle,
|
||||
ArrowRight, Link2, MessageCircle, TrendingUp, Eye, ImageIcon, Globe,
|
||||
} from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { SeverityBadge } from './ui/SeverityBadge';
|
||||
import { EvidenceGallery } from './ui/EvidenceGallery';
|
||||
import type {
|
||||
FacebookAudit as FacebookAuditType,
|
||||
FacebookPage,
|
||||
BrandInconsistency,
|
||||
DiagnosisItem,
|
||||
} from '../../types/report';
|
||||
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
|
||||
if (n >= 1_000) return `${(n / 1_000).toFixed(1)}K`;
|
||||
return n.toLocaleString();
|
||||
}
|
||||
|
||||
/* ─── Page Card ─── */
|
||||
function PageCard({ page, index }: { key?: string | number; page: FacebookPage; index: number }) {
|
||||
const isKR = page.language === 'KR';
|
||||
const langColor = isKR ? 'bg-slate-100 text-slate-700' : 'bg-[#EFF0FF] text-[#3A3F7C]';
|
||||
const isLogoMismatch = page.logo?.includes('불일치');
|
||||
const isLowFollowers = page.followers < 500;
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className={`rounded-2xl border shadow-sm p-6 ${
|
||||
isKR && isLowFollowers
|
||||
? 'bg-[#FFF0F0]/30 border-[#F5D5DC]/60'
|
||||
: 'bg-white border-slate-100'
|
||||
}`}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: index * 0.15 }}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className={`text-xs font-medium px-3 py-1 rounded-full ${langColor}`}>
|
||||
{page.label}
|
||||
</span>
|
||||
<div className="w-8 h-8 rounded-lg bg-[#1877F2] flex items-center justify-center">
|
||||
<Facebook size={16} className="text-white" />
|
||||
</div>
|
||||
</div>
|
||||
{isKR && isLowFollowers && (
|
||||
<span className="text-xs font-medium px-3 py-1 rounded-full bg-[#FFF0F0] text-[#7C3A4B]">
|
||||
방치 상태
|
||||
</span>
|
||||
)}
|
||||
{page.hasWhatsApp && (
|
||||
<span className="text-xs font-medium px-3 py-1 rounded-full bg-[#F3F0FF] text-[#4A3A7C]">
|
||||
WhatsApp 연결
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<h3 className="font-bold text-lg text-[#0A1128] mb-1">{page.pageName}</h3>
|
||||
<p className="text-xs text-slate-500 mb-4">{page.category}</p>
|
||||
|
||||
{/* Metrics grid */}
|
||||
<div className="grid grid-cols-3 gap-2 mb-5">
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-400 uppercase tracking-wide">팔로워</p>
|
||||
<p className={`text-lg font-bold ${isLowFollowers ? 'text-[#7C3A4B]' : 'text-[#0A1128]'}`}>
|
||||
{formatNumber(page.followers)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-400 uppercase tracking-wide">리뷰</p>
|
||||
<p className={`text-lg font-bold ${page.reviews === 0 ? 'text-[#7C3A4B]' : 'text-[#0A1128]'}`}>
|
||||
{page.reviews}
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-400 uppercase tracking-wide">팔로잉</p>
|
||||
<p className="text-lg font-bold text-[#0A1128]">{formatNumber(page.following)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Detail rows */}
|
||||
<div className="space-y-3 mb-5 text-sm">
|
||||
<div className="flex items-center justify-between py-1 border-b border-slate-100 last:border-0">
|
||||
<span className="text-slate-500 flex items-center gap-2"><Eye size={13} /> 최근 게시물</span>
|
||||
<span className="font-medium text-[#0A1128]">{page.recentPostAge}</span>
|
||||
</div>
|
||||
{page.postFrequency && (
|
||||
<div className="flex items-center justify-between py-1 border-b border-slate-100 last:border-0">
|
||||
<span className="text-slate-500 flex items-center gap-2"><TrendingUp size={13} /> 게시 빈도</span>
|
||||
<span className="font-medium text-[#0A1128]">{page.postFrequency}</span>
|
||||
</div>
|
||||
)}
|
||||
{page.topContentType && (
|
||||
<div className="flex items-center justify-between py-1 border-b border-slate-100 last:border-0">
|
||||
<span className="text-slate-500 flex items-center gap-2"><ImageIcon size={13} /> 콘텐츠 유형</span>
|
||||
<span className="font-medium text-[#0A1128] text-right text-xs max-w-[180px]">{page.topContentType}</span>
|
||||
</div>
|
||||
)}
|
||||
{page.engagement && (
|
||||
<div className="flex items-center justify-between py-1 border-b border-slate-100 last:border-0">
|
||||
<span className="text-slate-500 flex items-center gap-2"><MessageCircle size={13} /> 참여율</span>
|
||||
<span className={`font-medium text-right text-xs max-w-[180px] ${
|
||||
page.engagement.includes('0~3') ? 'text-[#7C3A4B]' : 'text-[#0A1128]'
|
||||
}`}>{page.engagement}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Logo analysis - the enhanced version */}
|
||||
<div className={`rounded-xl p-4 mb-4 ${
|
||||
isLogoMismatch
|
||||
? 'bg-[#FFF0F0] border border-[#F5D5DC]'
|
||||
: 'bg-[#F3F0FF] border border-[#D5CDF5]'
|
||||
}`}>
|
||||
<div className="flex items-start gap-2 mb-2">
|
||||
{isLogoMismatch
|
||||
? <AlertTriangle size={16} className="text-[#7C3A4B] shrink-0 mt-1" />
|
||||
: <CheckCircle2 size={16} className="text-[#9B8AD4] shrink-0 mt-1" />
|
||||
}
|
||||
<p className={`text-sm font-semibold ${isLogoMismatch ? 'text-[#7C3A4B]' : 'text-[#4A3A7C]'}`}>
|
||||
로고 {page.logo}
|
||||
</p>
|
||||
</div>
|
||||
<p className={`text-xs leading-relaxed ml-6 ${isLogoMismatch ? 'text-[#7C3A4B]' : 'text-[#4A3A7C]'}`}>
|
||||
{page.logoDescription}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Domain link */}
|
||||
<div className="rounded-xl bg-slate-50 p-3 mb-4">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<Link2 size={12} className="text-slate-400" />
|
||||
<p className="text-xs text-slate-400 uppercase tracking-wide">연결 도메인</p>
|
||||
</div>
|
||||
<p className={`text-sm font-mono ${
|
||||
page.linkedDomain?.includes('다름') ? 'text-[#7C5C3A]' : 'text-slate-700'
|
||||
}`}>
|
||||
{page.linkedDomain || page.link}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Bio */}
|
||||
<div className="rounded-xl bg-slate-50 p-3 mb-4">
|
||||
<p className="text-xs text-slate-400 uppercase tracking-wide mb-1">Bio</p>
|
||||
<p className="text-sm text-slate-600 italic">"{page.bio}"</p>
|
||||
</div>
|
||||
|
||||
{/* Link */}
|
||||
<a
|
||||
href={`https://${page.url}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 text-sm text-[#6C5CE7] hover:underline"
|
||||
>
|
||||
<ExternalLink size={14} />
|
||||
{page.url}
|
||||
</a>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Brand Inconsistency Map ─── */
|
||||
function BrandConsistencyMap({ inconsistencies }: { inconsistencies: BrandInconsistency[] }) {
|
||||
const [expanded, setExpanded] = useState<number | null>(0);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className="mt-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
<h3 className="font-serif font-bold text-xl text-[#0A1128] mb-2">Brand Consistency Map</h3>
|
||||
<p className="text-sm text-slate-500 mb-5">전 채널 브랜드 일관성 분석</p>
|
||||
|
||||
<div className="space-y-3">
|
||||
{inconsistencies.map((item, i) => (
|
||||
<div
|
||||
key={item.field}
|
||||
className="rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden"
|
||||
>
|
||||
{/* Header - clickable */}
|
||||
<button
|
||||
onClick={() => setExpanded(expanded === i ? null : i)}
|
||||
className="w-full flex items-center justify-between p-5 text-left hover:bg-slate-50/50 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-8 h-8 rounded-lg bg-primary-900 flex items-center justify-center text-white text-xs font-bold">
|
||||
{item.values.filter(v => !v.isCorrect).length}
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-semibold text-[#0A1128]">{item.field}</p>
|
||||
<p className="text-xs text-slate-500">
|
||||
{item.values.filter(v => !v.isCorrect).length}개 채널 불일치
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<ArrowRight
|
||||
size={16}
|
||||
className={`text-slate-400 transition-transform ${expanded === i ? 'rotate-90' : ''}`}
|
||||
/>
|
||||
</button>
|
||||
|
||||
{/* Expanded content */}
|
||||
{expanded === i && (
|
||||
<div className="px-5 pb-5 border-t border-slate-100">
|
||||
{/* Channel values */}
|
||||
<div className="grid gap-2 mt-4 mb-4">
|
||||
{item.values.map((v) => (
|
||||
<div
|
||||
key={v.channel}
|
||||
className={`flex items-center justify-between py-3 px-3 rounded-lg text-sm ${
|
||||
v.isCorrect ? 'bg-[#F3F0FF]/60' : 'bg-[#FFF0F0]/60'
|
||||
}`}
|
||||
>
|
||||
<span className="font-medium text-slate-700 min-w-[100px]">{v.channel}</span>
|
||||
<span className={`flex-1 text-right ${v.isCorrect ? 'text-[#4A3A7C]' : 'text-[#7C3A4B]'}`}>
|
||||
{v.value}
|
||||
</span>
|
||||
<span className="ml-3">
|
||||
{v.isCorrect
|
||||
? <CheckCircle2 size={15} className="text-[#9B8AD4]" />
|
||||
: <XCircle size={15} className="text-[#D4889A]" />
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Impact */}
|
||||
<div className="rounded-xl bg-[#FFF6ED] border border-[#F5E0C5] p-4 mb-3">
|
||||
<p className="text-xs font-semibold text-[#7C5C3A] uppercase tracking-wide mb-1">
|
||||
<AlertCircle size={12} className="inline mr-1" />
|
||||
Impact
|
||||
</p>
|
||||
<p className="text-sm text-[#7C5C3A]">{item.impact}</p>
|
||||
</div>
|
||||
|
||||
{/* Recommendation */}
|
||||
<div className="rounded-xl bg-[#F3F0FF] border border-[#D5CDF5] p-4">
|
||||
<p className="text-xs font-semibold text-[#4A3A7C] uppercase tracking-wide mb-1">
|
||||
<CheckCircle2 size={12} className="inline mr-1" />
|
||||
Recommendation
|
||||
</p>
|
||||
<p className="text-sm text-[#4A3A7C]">{item.recommendation}</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Diagnosis Section ─── */
|
||||
function DiagnosisSection({ items }: { items: DiagnosisItem[] }) {
|
||||
return (
|
||||
<motion.div
|
||||
className="mt-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.4 }}
|
||||
>
|
||||
<h3 className="font-serif font-bold text-xl text-[#0A1128] mb-2">진단 결과</h3>
|
||||
<p className="text-sm text-slate-500 mb-4">Facebook 채널 문제점</p>
|
||||
|
||||
<div className="rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden">
|
||||
{items.map((item, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className={`p-5 ${
|
||||
i < items.length - 1 ? 'border-b border-slate-100' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="min-w-[120px] md:min-w-[160px]">
|
||||
<p className="font-semibold text-sm text-[#0A1128]">{item.category}</p>
|
||||
</div>
|
||||
<p className="flex-1 text-sm text-slate-600">{item.detail}</p>
|
||||
<div className="shrink-0">
|
||||
<SeverityBadge severity={item.severity} />
|
||||
</div>
|
||||
</div>
|
||||
{item.evidenceIds && item.evidenceIds.length > 0 && (
|
||||
<EvidenceGallery evidenceIds={item.evidenceIds} compact />
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Consolidation Recommendation ─── */
|
||||
function ConsolidationCard({ text }: { text: string }) {
|
||||
return (
|
||||
<motion.div
|
||||
className="mt-8 rounded-2xl bg-gradient-to-r from-[#4F1DA1] to-[#021341] p-6 md:p-8 text-white"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.5 }}
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="w-10 h-10 rounded-xl bg-white/10 flex items-center justify-center shrink-0">
|
||||
<Globe size={20} className="text-white" />
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-serif font-bold text-2xl mb-2">통합 권장 사항</h4>
|
||||
<p className="text-sm text-purple-200 leading-relaxed">{text}</p>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Main Component ─── */
|
||||
export default function FacebookAudit({ data }: { data: FacebookAuditType }) {
|
||||
return (
|
||||
<SectionWrapper id="facebook-audit" title="Facebook Analysis" subtitle="페이스북 페이지 분석">
|
||||
{/* Page cards side by side */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{data.pages.map((page, i) => (
|
||||
<PageCard key={page.pageName} page={page} index={i} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Brand Consistency Map - the new enhanced section */}
|
||||
{data.brandInconsistencies && data.brandInconsistencies.length > 0 && (
|
||||
<BrandConsistencyMap inconsistencies={data.brandInconsistencies} />
|
||||
)}
|
||||
|
||||
{/* Diagnosis table */}
|
||||
{data.diagnosis && data.diagnosis.length > 0 && (
|
||||
<DiagnosisSection items={data.diagnosis} />
|
||||
)}
|
||||
|
||||
{/* Consolidation recommendation */}
|
||||
{data.consolidationRecommendation && (
|
||||
<ConsolidationCard text={data.consolidationRecommendation} />
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Instagram, AlertCircle, FileText, Users, Eye } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { MetricCard } from './ui/MetricCard';
|
||||
import { DiagnosisRow } from './ui/DiagnosisRow';
|
||||
import type { InstagramAudit as InstagramAuditType, InstagramAccount } from '../../types/report';
|
||||
|
||||
interface InstagramAuditProps {
|
||||
data: InstagramAuditType;
|
||||
}
|
||||
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(2)}M`;
|
||||
if (n >= 1_000) return `${(n / 1_000).toFixed(0)}K`;
|
||||
return n.toLocaleString();
|
||||
}
|
||||
|
||||
function AccountCard({ account, index }: { key?: string | number; account: InstagramAccount; index: number }) {
|
||||
const langColor = account.language === 'KR'
|
||||
? 'bg-slate-100 text-slate-700'
|
||||
: 'bg-[#EFF0FF] text-[#3A3F7C]';
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: index * 0.1 }}
|
||||
>
|
||||
{/* Language badge + handle */}
|
||||
<div className="flex items-center gap-2 mb-4">
|
||||
<span className={`text-xs font-medium px-3 py-1 rounded-full ${langColor}`}>
|
||||
{account.label}
|
||||
</span>
|
||||
<div className="w-8 h-8 rounded-lg bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center">
|
||||
<Instagram size={16} className="text-white" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 className="font-bold text-lg text-[#0A1128] mb-1">{account.handle}</h3>
|
||||
<p className="text-xs text-slate-500 mb-4">{account.category}</p>
|
||||
|
||||
{/* Compact metrics */}
|
||||
<div className="grid grid-cols-3 gap-2 mb-4">
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-500">게시물</p>
|
||||
<p className="text-lg font-bold text-[#0A1128]">{formatNumber(account.posts)}</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-500">팔로워</p>
|
||||
<p className="text-lg font-bold text-[#0A1128]">{formatNumber(account.followers)}</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-slate-50 p-3 text-center">
|
||||
<p className="text-xs text-slate-500">팔로잉</p>
|
||||
<p className="text-lg font-bold text-[#0A1128]">{formatNumber(account.following)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Format & reels */}
|
||||
<div className="space-y-2 mb-4">
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
<span className="text-slate-500">콘텐츠 포맷</span>
|
||||
<span className="font-medium text-[#0A1128]">{account.contentFormat}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
<span className="text-slate-500">릴스 수</span>
|
||||
<span className={`font-medium ${account.reelsCount === 0 ? 'text-[#7C3A4B]' : 'text-[#0A1128]'}`}>
|
||||
{account.reelsCount === 0 ? (
|
||||
<span className="inline-flex items-center gap-1">
|
||||
<AlertCircle size={14} className="text-[#D4889A]" />
|
||||
0 (미운영)
|
||||
</span>
|
||||
) : (
|
||||
account.reelsCount
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Highlights */}
|
||||
{account.highlights.length > 0 && (
|
||||
<div className="mb-4">
|
||||
<p className="text-xs text-slate-500 mb-2">하이라이트</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{account.highlights.map((h) => (
|
||||
<span
|
||||
key={h}
|
||||
className="rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700"
|
||||
>
|
||||
{h}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Bio */}
|
||||
{account.bio && (
|
||||
<div className="rounded-xl bg-slate-50 p-3">
|
||||
<p className="text-xs text-slate-400 mb-1">Bio</p>
|
||||
<p className="text-sm text-slate-600 whitespace-pre-line">{account.bio}</p>
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function InstagramAudit({ data }: InstagramAuditProps) {
|
||||
return (
|
||||
<SectionWrapper id="instagram-audit" title="Instagram Analysis" subtitle="인스타그램 채널 분석">
|
||||
{/* Account cards */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
||||
{data.accounts.map((account, i) => (
|
||||
<AccountCard key={account.handle} account={account} index={i} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Diagnosis */}
|
||||
{data.diagnosis.length > 0 && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-4">진단 결과</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow key={i} category={item.category} detail={item.detail} severity={item.severity} evidenceIds={item.evidenceIds} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { TrendingUp, ArrowUpRight, Download, Loader2 } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { useExportPDF } from '../../hooks/useExportPDF';
|
||||
import type { KPIMetric } from '../../types/report';
|
||||
|
||||
interface KPIDashboardProps {
|
||||
metrics: KPIMetric[];
|
||||
}
|
||||
|
||||
function isNegativeValue(value: string): boolean {
|
||||
const lower = value.toLowerCase();
|
||||
return lower === '0' || lower.includes('없음') || lower.includes('불가') || lower === 'n/a';
|
||||
}
|
||||
|
||||
export default function KPIDashboard({ metrics }: KPIDashboardProps) {
|
||||
const { exportPDF, isExporting } = useExportPDF();
|
||||
|
||||
return (
|
||||
<SectionWrapper id="kpi-dashboard" title="KPI Dashboard" subtitle="핵심 성과 지표 목표">
|
||||
{/* KPI Table */}
|
||||
<motion.div
|
||||
className="rounded-2xl overflow-hidden border border-slate-100 mb-10"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="grid grid-cols-4 bg-[#0A1128] text-white">
|
||||
<div className="px-6 py-4 text-sm font-semibold">Metric</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">Current</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">3-Month Target</div>
|
||||
<div className="px-6 py-4 text-sm font-semibold">12-Month Target</div>
|
||||
</div>
|
||||
|
||||
{/* Data rows */}
|
||||
{metrics.map((metric, i) => (
|
||||
<motion.div
|
||||
key={metric.metric}
|
||||
className={`grid grid-cols-4 ${i % 2 === 0 ? 'bg-white' : 'bg-slate-50'}`}
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.3, delay: i * 0.04 }}
|
||||
>
|
||||
<div className="px-6 py-4 text-sm font-medium text-[#0A1128]">{metric.metric}</div>
|
||||
<div className={`px-6 py-4 text-sm font-semibold ${isNegativeValue(metric.current) ? 'text-[#7C3A4B]' : 'text-[#0A1128]'}`}>
|
||||
{metric.current}
|
||||
</div>
|
||||
<div className="px-6 py-4 text-sm font-medium text-[#4A3A7C]">{metric.target3Month}</div>
|
||||
<div className="px-6 py-4 text-sm font-medium text-[#4A3A7C]">{metric.target12Month}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</motion.div>
|
||||
|
||||
{/* CTA Card */}
|
||||
<motion.div
|
||||
data-cta-card
|
||||
className="rounded-2xl bg-gradient-to-r from-[#fff3eb] via-[#e4cfff] to-[#f5f9ff] p-8 md:p-12 text-center relative overflow-hidden"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.3 }}
|
||||
>
|
||||
<div className="relative">
|
||||
<div className="w-14 h-14 rounded-2xl bg-[#021341]/10 flex items-center justify-center mx-auto mb-6">
|
||||
<TrendingUp size={28} className="text-[#021341]" />
|
||||
</div>
|
||||
<h3 className="font-serif text-2xl md:text-3xl font-bold text-[#021341] mb-3">
|
||||
Start Your Transformation
|
||||
</h3>
|
||||
<p className="text-[#021341]/60 mb-8 max-w-xl mx-auto">
|
||||
INFINITH와 함께 데이터 기반 마케팅 전환을 시작하세요. 90일 안에 측정 가능한 성과를 만들어 드립니다.
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row items-center justify-center gap-4">
|
||||
<a
|
||||
href="/plan/view-clinic"
|
||||
className="inline-flex items-center gap-2 bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white font-semibold px-8 py-4 rounded-full hover:shadow-xl transition-all"
|
||||
>
|
||||
마케팅 기획
|
||||
<ArrowUpRight size={18} />
|
||||
</a>
|
||||
<button
|
||||
onClick={() => exportPDF('INFINITH_Marketing_Report_뷰성형외과')}
|
||||
disabled={isExporting}
|
||||
className="inline-flex items-center gap-2 bg-white border border-slate-200 text-[#021341] font-semibold px-8 py-4 rounded-full hover:bg-slate-50 shadow-sm hover:shadow-md transition-all disabled:opacity-60 disabled:cursor-not-allowed"
|
||||
>
|
||||
{isExporting ? (
|
||||
<>
|
||||
<Loader2 size={18} className="animate-spin" />
|
||||
내보내는 중...
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Download size={18} />
|
||||
리포트 다운로드
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { CheckCircle2, XCircle, HelpCircle, ExternalLink, AlertCircle, Globe, Shield } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import type { OtherChannel, WebsiteAudit } from '../../types/report';
|
||||
|
||||
interface OtherChannelsProps {
|
||||
channels: OtherChannel[];
|
||||
website: WebsiteAudit;
|
||||
}
|
||||
|
||||
const statusConfig = {
|
||||
active: { icon: CheckCircle2, color: 'text-[#9B8AD4]', label: '활성' },
|
||||
inactive: { icon: XCircle, color: 'text-[#D4889A]', label: '비활성' },
|
||||
unknown: { icon: HelpCircle, color: 'text-slate-400', label: '미확인' },
|
||||
not_found: { icon: XCircle, color: 'text-[#D4889A]', label: '미발견' },
|
||||
};
|
||||
|
||||
export default function OtherChannels({ channels, website }: OtherChannelsProps) {
|
||||
return (
|
||||
<SectionWrapper id="other-channels" title="Other Channels & Website" subtitle="기타 채널 및 웹사이트 기술 진단">
|
||||
{/* Other Channels */}
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm overflow-hidden mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<div className="px-6 py-4 border-b border-slate-100">
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">기타 채널 현황</h3>
|
||||
</div>
|
||||
<div className="divide-y divide-slate-100">
|
||||
{channels.map((ch, i) => {
|
||||
const cfg = statusConfig[ch.status];
|
||||
const StatusIcon = cfg.icon;
|
||||
return (
|
||||
<motion.div
|
||||
key={ch.name}
|
||||
className="flex items-center gap-4 px-6 py-4"
|
||||
initial={{ opacity: 0, x: -10 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.3, delay: i * 0.05 }}
|
||||
>
|
||||
<StatusIcon size={20} className={cfg.color} />
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-semibold text-[#0A1128]">{ch.name}</p>
|
||||
<p className="text-sm text-slate-500">{ch.details}</p>
|
||||
</div>
|
||||
<span className={`text-xs font-medium ${cfg.color}`}>{cfg.label}</span>
|
||||
{ch.url && (
|
||||
<a
|
||||
href={ch.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-[#6C5CE7] hover:underline"
|
||||
>
|
||||
<ExternalLink size={16} />
|
||||
</a>
|
||||
)}
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Website Tech Audit */}
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-6">
|
||||
<Globe size={20} className="text-[#6C5CE7]" />
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">웹사이트 기술 진단</h3>
|
||||
</div>
|
||||
|
||||
{/* Domain info */}
|
||||
<div className="rounded-xl bg-slate-50 p-4 mb-6">
|
||||
<p className="text-sm font-semibold text-[#0A1128] mb-2">기본 도메인: {website.primaryDomain}</p>
|
||||
{website.additionalDomains.length > 0 && (
|
||||
<div className="mt-2 space-y-1">
|
||||
{website.additionalDomains.map((d) => (
|
||||
<p key={d.domain} className="text-sm text-slate-600">
|
||||
{d.domain} — <span className="text-slate-400">{d.purpose}</span>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<p className="text-sm text-slate-500 mt-2">
|
||||
주요 CTA: <span className="font-medium text-[#0A1128]">{website.mainCTA}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Tracking Pixels */}
|
||||
<div className="mb-6">
|
||||
<p className="text-sm font-semibold text-slate-700 mb-3">트래킹 픽셀 설치 현황</p>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-3">
|
||||
{website.trackingPixels.map((pixel) => (
|
||||
<div
|
||||
key={pixel.name}
|
||||
className={`flex items-center gap-2 rounded-xl p-3 ${
|
||||
pixel.installed
|
||||
? 'bg-[#F3F0FF] border border-[#D5CDF5]'
|
||||
: 'bg-[#FFF0F0] border border-[#F5D5DC]'
|
||||
}`}
|
||||
>
|
||||
{pixel.installed ? (
|
||||
<CheckCircle2 size={16} className="text-[#9B8AD4] shrink-0" />
|
||||
) : (
|
||||
<XCircle size={16} className="text-[#D4889A] shrink-0" />
|
||||
)}
|
||||
<div className="min-w-0">
|
||||
<p className={`text-sm font-medium ${pixel.installed ? 'text-[#4A3A7C]' : 'text-[#7C3A4B]'}`}>
|
||||
{pixel.name}
|
||||
</p>
|
||||
{pixel.details && (
|
||||
<p className="text-xs text-slate-500 truncate">{pixel.details}</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* SNS Links Status */}
|
||||
{!website.snsLinksOnSite && (
|
||||
<motion.div
|
||||
className="rounded-xl bg-[#FFF0F0] border border-[#F5D5DC] p-4 flex items-start gap-3"
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: 0.3 }}
|
||||
>
|
||||
<AlertCircle size={20} className="text-[#7C3A4B] shrink-0 mt-1" />
|
||||
<div>
|
||||
<p className="text-sm font-bold text-[#7C3A4B]">홈페이지에 SNS 링크 없음</p>
|
||||
<p className="text-sm text-[#7C3A4B] mt-1">
|
||||
웹사이트에서 소셜 미디어 채널로의 연결이 없습니다. 방문자가 SNS를 통해 브랜드와 연결할 수 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
{website.snsLinksOnSite && (
|
||||
<div className="rounded-xl bg-[#F3F0FF] border border-[#D5CDF5] p-4 flex items-center gap-3">
|
||||
<CheckCircle2 size={20} className="text-[#9B8AD4]" />
|
||||
<p className="text-sm font-medium text-[#4A3A7C]">홈페이지에 SNS 링크 연결됨</p>
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { AlertCircle } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import type { DiagnosisItem } from '../../types/report';
|
||||
|
||||
interface ProblemDiagnosisProps {
|
||||
diagnosis: DiagnosisItem[];
|
||||
}
|
||||
|
||||
const severityDot: Record<string, string> = {
|
||||
critical: 'bg-[#C084CF]',
|
||||
warning: 'bg-[#8B9CF7]',
|
||||
good: 'bg-[#7C6DD8]',
|
||||
excellent: 'bg-[#6C5CE7]',
|
||||
unknown: 'bg-slate-400',
|
||||
};
|
||||
|
||||
export default function ProblemDiagnosis({ diagnosis }: ProblemDiagnosisProps) {
|
||||
return (
|
||||
<SectionWrapper id="problem-diagnosis" title="Critical Issues" subtitle="핵심 문제 진단" dark>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{diagnosis.map((item, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="bg-white/10 backdrop-blur-sm border border-white/10 rounded-2xl p-6 relative overflow-hidden"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: i * 0.08 }}
|
||||
>
|
||||
{/* Severity dot */}
|
||||
<div className="absolute top-4 right-4">
|
||||
<span className={`block w-3 h-3 rounded-full ${severityDot[item.severity] ?? severityDot.unknown}`} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="shrink-0 w-8 h-8 rounded-lg bg-white/10 flex items-center justify-center mt-1">
|
||||
<AlertCircle size={16} className="text-[#E8B4C0]" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-lg font-bold text-white mb-2">{item.category}</p>
|
||||
<p className="text-sm text-purple-200 leading-relaxed">{item.detail}</p>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Calendar, Globe, MapPin } from 'lucide-react';
|
||||
import { ScoreRing } from './ui/ScoreRing';
|
||||
|
||||
interface ReportHeaderProps {
|
||||
clinicName: string;
|
||||
clinicNameEn: string;
|
||||
overallScore: number;
|
||||
date: string;
|
||||
targetUrl: string;
|
||||
location: string;
|
||||
logoImage?: string;
|
||||
brandColors?: { primary: string; accent: string; text: string };
|
||||
}
|
||||
|
||||
export default function ReportHeader({
|
||||
clinicName,
|
||||
logoImage,
|
||||
brandColors,
|
||||
clinicNameEn,
|
||||
overallScore,
|
||||
date,
|
||||
targetUrl,
|
||||
location,
|
||||
}: ReportHeaderProps) {
|
||||
return (
|
||||
<section className="relative overflow-hidden bg-[radial-gradient(ellipse_at_top_left,#e0e7ff,transparent_50%),radial-gradient(ellipse_at_bottom_right,#fce7f3,transparent_50%),radial-gradient(ellipse_at_center,#f5f3ff,transparent_60%)] py-20 px-6">
|
||||
{/* Animated blobs */}
|
||||
<motion.div
|
||||
className="absolute top-10 left-10 w-72 h-72 rounded-full bg-indigo-200/30 blur-3xl"
|
||||
animate={{ x: [0, 30, 0], y: [0, -20, 0] }}
|
||||
transition={{ duration: 8, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
<motion.div
|
||||
className="absolute bottom-10 right-10 w-96 h-96 rounded-full bg-pink-200/30 blur-3xl"
|
||||
animate={{ x: [0, -20, 0], y: [0, 30, 0] }}
|
||||
transition={{ duration: 10, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
<motion.div
|
||||
className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-80 rounded-full bg-purple-200/20 blur-3xl"
|
||||
animate={{ scale: [1, 1.1, 1] }}
|
||||
transition={{ duration: 6, repeat: Infinity, ease: 'easeInOut' }}
|
||||
/>
|
||||
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="flex flex-col md:flex-row items-center md:items-start justify-between gap-10">
|
||||
{/* Left: Text content */}
|
||||
<motion.div
|
||||
className="flex-1 text-center md:text-left"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<motion.p
|
||||
className="font-serif text-3xl md:text-4xl font-normal text-[#6C5CE7] mb-4 tracking-wide"
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.1 }}
|
||||
>
|
||||
Marketing Intelligence Report
|
||||
</motion.p>
|
||||
|
||||
{logoImage && (
|
||||
<motion.div
|
||||
className="mb-4"
|
||||
initial={{ opacity: 0, scale: 0.9 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.15 }}
|
||||
>
|
||||
<img
|
||||
src={logoImage}
|
||||
alt={clinicName}
|
||||
className="h-16 md:h-20 w-auto object-contain md:mx-0 mx-auto"
|
||||
onError={(e) => { (e.target as HTMLImageElement).style.display = 'none'; }}
|
||||
/>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
<motion.h1
|
||||
className="font-serif text-4xl md:text-5xl font-bold text-[#0A1128] mb-3"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
>
|
||||
{clinicName}
|
||||
</motion.h1>
|
||||
|
||||
<motion.p
|
||||
className="text-lg text-slate-600 mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
{clinicNameEn}
|
||||
</motion.p>
|
||||
|
||||
<motion.div
|
||||
className="flex flex-wrap gap-3 justify-center md:justify-start"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.4 }}
|
||||
>
|
||||
<span className="inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700">
|
||||
<Calendar size={14} className="text-slate-400" />
|
||||
{date}
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700">
|
||||
<Globe size={14} className="text-slate-400" />
|
||||
{targetUrl}
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700">
|
||||
<MapPin size={14} className="text-slate-400" />
|
||||
{location}
|
||||
</span>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
{/* Right: Score ring */}
|
||||
<motion.div
|
||||
className="shrink-0"
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, delay: 0.3 }}
|
||||
>
|
||||
<div className="bg-white/60 backdrop-blur-sm border border-white/40 rounded-3xl p-8 shadow-lg">
|
||||
<p className="text-xs text-slate-500 uppercase tracking-wide text-center mb-4">
|
||||
Overall Score
|
||||
</p>
|
||||
<ScoreRing score={overallScore} size={160} label="종합 점수" />
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
interface ReportNavProps {
|
||||
sections: { id: string; label: string }[];
|
||||
}
|
||||
|
||||
export function ReportNav({ sections }: ReportNavProps) {
|
||||
const [activeId, setActiveId] = useState(sections[0]?.id ?? '');
|
||||
const navRef = useRef<HTMLDivElement>(null);
|
||||
const tabRefs = useRef<Map<string, HTMLButtonElement>>(new Map());
|
||||
|
||||
useEffect(() => {
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
const visible = entries
|
||||
.filter((e) => e.isIntersecting)
|
||||
.sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top);
|
||||
|
||||
if (visible.length > 0) {
|
||||
setActiveId(visible[0].target.id);
|
||||
}
|
||||
},
|
||||
{ rootMargin: '-100px 0px -60% 0px', threshold: 0 }
|
||||
);
|
||||
|
||||
sections.forEach(({ id }) => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) observer.observe(el);
|
||||
});
|
||||
|
||||
return () => observer.disconnect();
|
||||
}, [sections]);
|
||||
|
||||
useEffect(() => {
|
||||
const activeTab = tabRefs.current.get(activeId);
|
||||
if (activeTab && navRef.current) {
|
||||
activeTab.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'nearest',
|
||||
inline: 'center',
|
||||
});
|
||||
}
|
||||
}, [activeId]);
|
||||
|
||||
const handleClick = (id: string) => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) {
|
||||
el.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<nav data-report-nav className="sticky top-20 z-40 bg-white/80 backdrop-blur-lg border-b border-slate-100">
|
||||
<div
|
||||
ref={navRef}
|
||||
className="max-w-7xl mx-auto flex overflow-x-auto scrollbar-hide"
|
||||
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
||||
>
|
||||
{sections.map(({ id, label }) => (
|
||||
<button
|
||||
key={id}
|
||||
ref={(el) => {
|
||||
if (el) tabRefs.current.set(id, el);
|
||||
}}
|
||||
onClick={() => handleClick(id)}
|
||||
className={`
|
||||
shrink-0 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap
|
||||
border-b-2
|
||||
${activeId === id
|
||||
? 'border-[#6C5CE7] text-[#0A1128]'
|
||||
: 'border-transparent text-slate-500 hover:text-slate-700'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { CheckCircle2 } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import type { RoadmapMonth } from '../../types/report';
|
||||
|
||||
interface RoadmapTimelineProps {
|
||||
months: RoadmapMonth[];
|
||||
}
|
||||
|
||||
export default function RoadmapTimeline({ months }: RoadmapTimelineProps) {
|
||||
return (
|
||||
<SectionWrapper id="roadmap" title="90-Day Roadmap" subtitle="실행 로드맵">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
{months.map((month, i) => (
|
||||
<motion.div
|
||||
key={month.month}
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: i * 0.15 }}
|
||||
>
|
||||
{/* Month badge */}
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white flex items-center justify-center font-bold text-sm">
|
||||
{month.month}
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-xl md:text-2xl text-[#0A1128]">{month.title}</h3>
|
||||
<p className="text-sm text-slate-500">{month.subtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Task checklist */}
|
||||
<ul className="space-y-3">
|
||||
{month.tasks.map((task, j) => (
|
||||
<motion.li
|
||||
key={j}
|
||||
className="flex items-start gap-3"
|
||||
initial={{ opacity: 0, x: -10 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.3, delay: i * 0.15 + j * 0.05 }}
|
||||
>
|
||||
{task.completed ? (
|
||||
<CheckCircle2 size={18} className="text-[#9B8AD4] shrink-0 mt-1" />
|
||||
) : (
|
||||
<div className="w-[18px] h-[18px] rounded-full border-2 border-slate-200 shrink-0 mt-1" />
|
||||
)}
|
||||
<span className={`text-sm ${task.completed ? 'text-slate-400 line-through' : 'text-slate-700'}`}>
|
||||
{task.task}
|
||||
</span>
|
||||
</motion.li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
import { useState, type ComponentType } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube, Instagram, Facebook, Globe, Search, Star, ArrowUpRight } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { ComparisonRow } from './ui/ComparisonRow';
|
||||
import type { TransformationProposal as TransformationProposalType, PlatformStrategy } from '../../types/report';
|
||||
|
||||
interface TransformationProposalProps {
|
||||
data: TransformationProposalType;
|
||||
}
|
||||
|
||||
const tabItems = [
|
||||
{ key: 'brand', label: 'Brand Identity', labelKr: '브랜드 아이덴티티' },
|
||||
{ key: 'content', label: 'Content Strategy', labelKr: '콘텐츠 전략' },
|
||||
{ key: 'platform', label: 'Platform Strategies', labelKr: '플랫폼 전략' },
|
||||
{ key: 'website', label: 'Website', labelKr: '웹사이트 개선' },
|
||||
{ key: 'newChannel', label: 'New Channels', labelKr: '신규 채널' },
|
||||
] as const;
|
||||
|
||||
type TabKey = (typeof tabItems)[number]['key'];
|
||||
|
||||
const platformIconMap: Record<string, ComponentType<{ size?: number; className?: string }>> = {
|
||||
youtube: Youtube,
|
||||
instagram: Instagram,
|
||||
facebook: Facebook,
|
||||
website: Globe,
|
||||
blog: Globe,
|
||||
naver: Search,
|
||||
tiktok: Star,
|
||||
};
|
||||
|
||||
function PlatformStrategyCard({ strategy, index }: { key?: string | number; strategy: PlatformStrategy; index: number }) {
|
||||
const Icon = platformIconMap[strategy.icon?.toLowerCase()] ?? Globe;
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: index * 0.1 }}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-gradient-to-br from-[#6C5CE7]/10 to-[#4F1DA1]/10 flex items-center justify-center">
|
||||
<Icon size={20} className="text-[#6C5CE7]" />
|
||||
</div>
|
||||
<h4 className="font-bold text-[#0A1128]">{strategy.platform}</h4>
|
||||
</div>
|
||||
|
||||
{/* Current to Target */}
|
||||
<div className="flex items-center gap-3 mb-4 text-sm">
|
||||
<span className="rounded-lg bg-[#FFF0F0] px-3 py-2 text-[#7C3A4B] font-medium">
|
||||
{strategy.currentMetric}
|
||||
</span>
|
||||
<ArrowUpRight size={16} className="text-slate-400" />
|
||||
<span className="rounded-lg bg-[#F3F0FF] px-3 py-2 text-[#4A3A7C] font-medium">
|
||||
{strategy.targetMetric}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Strategy bullets */}
|
||||
<ul className="space-y-2">
|
||||
{strategy.strategies.map((s, i) => (
|
||||
<li key={i} className="flex items-start gap-2">
|
||||
<span className="shrink-0 w-2 h-2 rounded-full bg-[#6C5CE7] mt-2" />
|
||||
<div>
|
||||
<p className="text-sm font-medium text-[#0A1128]">{s.strategy}</p>
|
||||
<p className="text-xs text-slate-500">{s.detail}</p>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
const priorityColor: Record<string, string> = {
|
||||
high: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]',
|
||||
medium: 'bg-[#FFF6ED] text-[#7C5C3A] border-[#F5E0C5]',
|
||||
low: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]',
|
||||
높음: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]',
|
||||
중간: 'bg-[#FFF6ED] text-[#7C5C3A] border-[#F5E0C5]',
|
||||
낮음: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]',
|
||||
};
|
||||
|
||||
export default function TransformationProposal({ data }: TransformationProposalProps) {
|
||||
const [activeTab, setActiveTab] = useState<TabKey>('brand');
|
||||
|
||||
return (
|
||||
<SectionWrapper id="transformation" title="Transformation Proposal" subtitle="As-Is → To-Be 전환 제안">
|
||||
{/* Tabs */}
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{tabItems.map((tab) => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeTab === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-lg'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Brand Identity */}
|
||||
{activeTab === 'brand' && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">브랜드 아이덴티티</h3>
|
||||
{data.brandIdentity.map((item, i) => (
|
||||
<ComparisonRow key={i} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Content Strategy */}
|
||||
{activeTab === 'content' && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">콘텐츠 전략</h3>
|
||||
{data.contentStrategy.map((item, i) => (
|
||||
<ComparisonRow key={i} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Platform Strategies */}
|
||||
{activeTab === 'platform' && (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{data.platformStrategies.map((strategy, i) => (
|
||||
<PlatformStrategyCard key={strategy.platform} strategy={strategy} index={i} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Website Improvements */}
|
||||
{activeTab === 'website' && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">웹사이트 개선</h3>
|
||||
{data.websiteImprovements.map((item, i) => (
|
||||
<ComparisonRow key={i} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* New Channel Proposals */}
|
||||
{activeTab === 'newChannel' && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm overflow-hidden"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
>
|
||||
<table className="w-full text-left">
|
||||
<thead>
|
||||
<tr className="bg-slate-50 border-b border-slate-100">
|
||||
<th className="px-6 py-3 text-xs font-semibold text-slate-500 uppercase tracking-wide">채널</th>
|
||||
<th className="px-6 py-3 text-xs font-semibold text-slate-500 uppercase tracking-wide">우선순위</th>
|
||||
<th className="px-6 py-3 text-xs font-semibold text-slate-500 uppercase tracking-wide">근거</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-100">
|
||||
{data.newChannelProposals.map((ch, i) => (
|
||||
<motion.tr
|
||||
key={ch.channel}
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.3, delay: i * 0.05 }}
|
||||
>
|
||||
<td className="px-6 py-4 text-sm font-medium text-[#0A1128]">{ch.channel}</td>
|
||||
<td className="px-6 py-4">
|
||||
<span
|
||||
className={`inline-flex items-center rounded-full text-xs font-medium px-3 py-1 border ${
|
||||
priorityColor[ch.priority.toLowerCase()] ?? 'bg-slate-50 text-slate-700 border-slate-200'
|
||||
}`}
|
||||
>
|
||||
{ch.priority}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-6 py-4 text-sm text-slate-600">{ch.rationale}</td>
|
||||
</motion.tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube, Users, Video, Eye, TrendingUp, ExternalLink } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { MetricCard } from './ui/MetricCard';
|
||||
import { DiagnosisRow } from './ui/DiagnosisRow';
|
||||
import type { YouTubeAudit as YouTubeAuditType } from '../../types/report';
|
||||
|
||||
interface YouTubeAuditProps {
|
||||
data: YouTubeAuditType;
|
||||
}
|
||||
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(2)}M`;
|
||||
if (n >= 1_000) return `${(n / 1_000).toFixed(0)}K`;
|
||||
return n.toLocaleString();
|
||||
}
|
||||
|
||||
export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
||||
return (
|
||||
<SectionWrapper id="youtube-audit" title="YouTube Analysis" subtitle="유튜브 채널 분석">
|
||||
{/* Metrics row */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
|
||||
<MetricCard
|
||||
label="구독자"
|
||||
value={formatNumber(data.subscribers)}
|
||||
icon={<Users size={20} />}
|
||||
subtext={data.subscriberRank}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 영상 수"
|
||||
value={formatNumber(data.totalVideos)}
|
||||
icon={<Video size={20} />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 조회수"
|
||||
value={formatNumber(data.totalViews)}
|
||||
icon={<Eye size={20} />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="주간 성장"
|
||||
value={`+${formatNumber(data.weeklyViewGrowth.absolute)}`}
|
||||
icon={<TrendingUp size={20} />}
|
||||
subtext={`${data.weeklyViewGrowth.percentage > 0 ? '+' : ''}${data.weeklyViewGrowth.percentage}%`}
|
||||
trend={data.weeklyViewGrowth.percentage > 0 ? 'up' : data.weeklyViewGrowth.percentage < 0 ? 'down' : 'neutral'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Channel info card */}
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6 mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-[#FFF0F0] flex items-center justify-center">
|
||||
<Youtube size={20} className="text-[#D4889A]" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-bold text-[#0A1128]">{data.channelName}</p>
|
||||
<p className="text-sm text-slate-500">{data.handle}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-sm text-slate-600 mb-4">{data.channelDescription}</p>
|
||||
<div className="flex flex-wrap gap-3 text-sm text-slate-500">
|
||||
<span>개설일: {data.channelCreatedDate}</span>
|
||||
<span>평균 영상 길이: {data.avgVideoLength}</span>
|
||||
<span>업로드 빈도: {data.uploadFrequency}</span>
|
||||
</div>
|
||||
|
||||
{/* Linked URLs */}
|
||||
{data.linkedUrls.length > 0 && (
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
{data.linkedUrls.map((link) => (
|
||||
<a
|
||||
key={link.url}
|
||||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 text-xs text-[#6C5CE7] hover:underline"
|
||||
>
|
||||
<ExternalLink size={12} />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
|
||||
{/* Playlists */}
|
||||
{data.playlists.length > 0 && (
|
||||
<motion.div
|
||||
className="mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.25 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-3">재생목록</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{data.playlists.map((pl) => (
|
||||
<span
|
||||
key={pl}
|
||||
className="rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700"
|
||||
>
|
||||
{pl}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Top Videos */}
|
||||
{data.topVideos.length > 0 && (
|
||||
<motion.div
|
||||
className="mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-4">인기 영상 TOP {data.topVideos.length}</p>
|
||||
<div className="flex gap-4 overflow-x-auto pb-4 scrollbar-thin scrollbar-thumb-slate-200">
|
||||
{data.topVideos.map((video, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="rounded-xl bg-white border border-slate-100 shadow-sm p-4 min-w-[250px] shrink-0"
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.05 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<span
|
||||
className={`text-xs font-medium px-2 py-1 rounded-full ${
|
||||
video.type === 'Short'
|
||||
? 'bg-purple-50 text-purple-700'
|
||||
: 'bg-[#EFF0FF] text-[#3A3F7C]'
|
||||
}`}
|
||||
>
|
||||
{video.type}
|
||||
</span>
|
||||
<span className="text-xs text-slate-400">{video.uploadedAgo}</span>
|
||||
</div>
|
||||
<p className="text-sm font-medium text-[#0A1128] line-clamp-2 mb-2">
|
||||
{video.title}
|
||||
</p>
|
||||
<div className="flex items-center gap-1 text-sm text-slate-600">
|
||||
<Eye size={14} className="text-slate-400" />
|
||||
<span className="font-semibold">{formatNumber(video.views)}</span>
|
||||
<span className="text-slate-400">views</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Diagnosis */}
|
||||
{data.diagnosis.length > 0 && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.35 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-4">진단 결과</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow key={i} category={item.category} detail={item.detail} severity={item.severity} evidenceIds={item.evidenceIds} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
interface ComparisonRowProps {
|
||||
key?: string | number;
|
||||
area: string;
|
||||
asIs: string;
|
||||
toBe: string;
|
||||
}
|
||||
|
||||
export function ComparisonRow({ area, asIs, toBe }: ComparisonRowProps) {
|
||||
return (
|
||||
<div className="grid grid-cols-[120px_1fr_1fr] gap-3 items-start py-4 border-b border-slate-100 last:border-0">
|
||||
<span className="font-medium text-sm text-slate-700 pt-3">{area}</span>
|
||||
<div className="bg-[#FFF0F0]/50 rounded-lg p-3 text-sm text-slate-600">
|
||||
{asIs}
|
||||
</div>
|
||||
<div className="bg-[#F3F0FF]/50 rounded-lg p-3 text-sm text-slate-700 font-medium">
|
||||
{toBe}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Severity } from '../../../types/report';
|
||||
import { SeverityBadge } from './SeverityBadge';
|
||||
import { EvidenceGallery } from './EvidenceGallery';
|
||||
|
||||
interface DiagnosisRowProps {
|
||||
key?: string | number;
|
||||
category: string;
|
||||
detail: string;
|
||||
severity: Severity;
|
||||
evidenceIds?: string[];
|
||||
}
|
||||
|
||||
export function DiagnosisRow({ category, detail, severity, evidenceIds }: DiagnosisRowProps) {
|
||||
return (
|
||||
<div className="py-4 border-b border-slate-100 last:border-0">
|
||||
<div className="flex items-center gap-4">
|
||||
<span className="font-bold text-sm text-[#0A1128] shrink-0 w-28">
|
||||
{category}
|
||||
</span>
|
||||
<p className="flex-1 text-sm text-slate-600">{detail}</p>
|
||||
<div className="shrink-0">
|
||||
<SeverityBadge severity={severity} />
|
||||
</div>
|
||||
</div>
|
||||
<EvidenceGallery evidenceIds={evidenceIds} compact />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { useScreenshots } from '../../../contexts/ScreenshotContext';
|
||||
import { EvidenceScreenshot } from './EvidenceScreenshot';
|
||||
|
||||
interface EvidenceGalleryProps {
|
||||
evidenceIds?: string[];
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function EvidenceGallery({ evidenceIds, compact }: EvidenceGalleryProps) {
|
||||
const { getByIds } = useScreenshots();
|
||||
|
||||
if (!evidenceIds?.length) return null;
|
||||
|
||||
const items = getByIds(evidenceIds);
|
||||
if (!items.length) return null;
|
||||
|
||||
if (items.length === 1) {
|
||||
return (
|
||||
<div className="mt-3">
|
||||
<EvidenceScreenshot evidence={items[0]} compact={compact} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-3 flex gap-3 overflow-x-auto pb-2" style={{ scrollbarWidth: 'thin' }}>
|
||||
{items.map((item) => (
|
||||
<div key={item.id} className="shrink-0 w-[200px]">
|
||||
<EvidenceScreenshot evidence={item} compact />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import { useEffect, useCallback } from 'react';
|
||||
import { motion, AnimatePresence } from 'motion/react';
|
||||
import type { ScreenshotEvidence } from '../../../types/report';
|
||||
|
||||
interface EvidenceLightboxProps {
|
||||
evidence: ScreenshotEvidence | null;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export function EvidenceLightbox({ evidence, onClose }: EvidenceLightboxProps) {
|
||||
const handleKeyDown = useCallback(
|
||||
(e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') onClose();
|
||||
},
|
||||
[onClose],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (evidence) {
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
return () => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
document.body.style.overflow = '';
|
||||
};
|
||||
}, [evidence, handleKeyDown]);
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{evidence && (
|
||||
<motion.div
|
||||
data-no-print
|
||||
className="fixed inset-0 z-50 flex items-center justify-center p-6"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
>
|
||||
{/* Backdrop */}
|
||||
<div
|
||||
className="absolute inset-0 bg-black/60 backdrop-blur-sm"
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
{/* Content */}
|
||||
<motion.div
|
||||
className="relative max-w-5xl w-full max-h-[90vh] flex flex-col"
|
||||
initial={{ scale: 0.95, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
exit={{ scale: 0.95, opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
>
|
||||
{/* Close button */}
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute -top-3 -right-3 z-10 w-8 h-8 rounded-full bg-white shadow-md flex items-center justify-center hover:bg-slate-50 transition-colors"
|
||||
>
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 2L12 12M12 2L2 12" stroke="#0A1128" strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{/* Image container with annotations */}
|
||||
<div className="relative rounded-2xl overflow-hidden bg-white shadow-2xl">
|
||||
<img
|
||||
src={evidence.url}
|
||||
alt={evidence.caption}
|
||||
className="w-full h-auto max-h-[70vh] object-contain"
|
||||
/>
|
||||
|
||||
{/* Annotation overlays */}
|
||||
{evidence.annotations?.map((ann, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="absolute border-2 border-[#C084CF] rounded-lg pointer-events-none"
|
||||
style={{
|
||||
left: `${ann.x}%`,
|
||||
top: `${ann.y}%`,
|
||||
width: ann.width ? `${ann.width}%` : 'auto',
|
||||
height: ann.height ? `${ann.height}%` : 'auto',
|
||||
}}
|
||||
>
|
||||
{ann.label && (
|
||||
<span className="absolute -top-6 left-0 text-xs bg-[#C084CF] text-white px-2 py-1 rounded font-medium whitespace-nowrap">
|
||||
{ann.label}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Caption */}
|
||||
<div className="mt-3 bg-white rounded-xl px-4 py-3 shadow-sm">
|
||||
<p className="text-sm text-[#0A1128] font-medium">{evidence.caption}</p>
|
||||
{evidence.sourceUrl && (
|
||||
<p className="text-xs text-slate-400 mt-1">{evidence.sourceUrl}</p>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useState } from 'react';
|
||||
import type { ScreenshotEvidence } from '../../../types/report';
|
||||
import { EvidenceLightbox } from './EvidenceLightbox';
|
||||
|
||||
interface EvidenceScreenshotProps {
|
||||
evidence: ScreenshotEvidence;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function EvidenceScreenshot({ evidence, compact }: EvidenceScreenshotProps) {
|
||||
const [loaded, setLoaded] = useState(true);
|
||||
const [lightboxOpen, setLightboxOpen] = useState(false);
|
||||
|
||||
if (!loaded) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setLightboxOpen(true)}
|
||||
className={`group relative rounded-xl overflow-hidden border border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:shadow-[4px_6px_16px_rgba(0,0,0,0.09)] transition-all cursor-pointer ${
|
||||
compact ? 'w-full' : 'w-full max-w-[400px]'
|
||||
}`}
|
||||
>
|
||||
<div className="relative">
|
||||
<img
|
||||
src={evidence.url}
|
||||
alt={evidence.caption}
|
||||
className={`w-full object-cover ${compact ? 'h-24' : 'h-48'}`}
|
||||
onError={() => setLoaded(false)}
|
||||
/>
|
||||
|
||||
{/* Hover overlay */}
|
||||
<div className="absolute inset-0 bg-[#0A1128]/0 group-hover:bg-[#0A1128]/10 transition-colors flex items-center justify-center">
|
||||
<div className="w-8 h-8 rounded-full bg-white/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M15 3H21V9M21 3L13 11M10 5H5C3.9 5 3 5.9 3 7V19C3 20.1 3.9 21 5 21H17C18.1 21 19 20.1 19 19V14" stroke="#6C5CE7" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Channel badge */}
|
||||
<span className="absolute top-2 left-2 rounded-full bg-white/90 backdrop-blur-sm px-2 py-1 text-xs font-medium text-[#4A3A7C] shadow-sm">
|
||||
{evidence.channel}
|
||||
</span>
|
||||
|
||||
{/* Annotation indicators */}
|
||||
{evidence.annotations?.map((ann, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="absolute border-2 border-[#C084CF]/60 rounded-lg pointer-events-none"
|
||||
style={{
|
||||
left: `${ann.x}%`,
|
||||
top: `${ann.y}%`,
|
||||
width: ann.width ? `${ann.width}%` : 'auto',
|
||||
height: ann.height ? `${ann.height}%` : 'auto',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Caption */}
|
||||
{!compact && (
|
||||
<div className="px-3 py-2">
|
||||
<p className="text-xs text-slate-600 leading-relaxed line-clamp-2">
|
||||
{evidence.caption}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
|
||||
<EvidenceLightbox
|
||||
evidence={lightboxOpen ? evidence : null}
|
||||
onClose={() => setLightboxOpen(false)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { ArrowUp, ArrowDown, Minus } from 'lucide-react';
|
||||
|
||||
interface MetricCardProps {
|
||||
key?: string | number;
|
||||
label: string;
|
||||
value: string | number;
|
||||
subtext?: string;
|
||||
icon?: ReactNode;
|
||||
trend?: 'up' | 'down' | 'neutral';
|
||||
}
|
||||
|
||||
const trendConfig = {
|
||||
up: { icon: ArrowUp, color: 'text-emerald-500' },
|
||||
down: { icon: ArrowDown, color: 'text-red-500' },
|
||||
neutral: { icon: Minus, color: 'text-slate-400' },
|
||||
};
|
||||
|
||||
export function MetricCard({ label, value, subtext, icon, trend }: MetricCardProps) {
|
||||
return (
|
||||
<div className="rounded-2xl border border-slate-100 shadow-sm bg-white p-5 relative">
|
||||
{icon && (
|
||||
<div className="absolute top-4 right-4 text-slate-300">
|
||||
{icon}
|
||||
</div>
|
||||
)}
|
||||
<p className="text-sm text-slate-500 mb-1">{label}</p>
|
||||
<div className="flex items-end gap-2">
|
||||
<span className="text-3xl font-bold text-[#0A1128]">{value}</span>
|
||||
{trend && (
|
||||
<span className={`${trendConfig[trend].color} mb-1`}>
|
||||
{(() => {
|
||||
const TrendIcon = trendConfig[trend].icon;
|
||||
return <TrendIcon size={18} />;
|
||||
})()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{subtext && (
|
||||
<p className="text-xs text-slate-400 mt-1">{subtext}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
interface ScoreRingProps {
|
||||
score: number;
|
||||
maxScore?: number;
|
||||
size?: number;
|
||||
label?: string;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
function getScoreColor(score: number, maxScore: number): string {
|
||||
const pct = (score / maxScore) * 100;
|
||||
if (pct <= 40) return '#C084CF'; // soft violet — critical
|
||||
if (pct <= 60) return '#8B9CF7'; // periwinkle blue — caution
|
||||
if (pct <= 80) return '#7C6DD8'; // medium purple — good
|
||||
return '#6C5CE7'; // Infinith primary purple — excellent
|
||||
}
|
||||
|
||||
export function ScoreRing({
|
||||
score,
|
||||
maxScore = 100,
|
||||
size = 120,
|
||||
label,
|
||||
color,
|
||||
}: ScoreRingProps) {
|
||||
const strokeWidth = 8;
|
||||
const radius = (size - strokeWidth) / 2;
|
||||
const circumference = 2 * Math.PI * radius;
|
||||
const progress = Math.min(score / maxScore, 1);
|
||||
const strokeDashoffset = circumference * (1 - progress);
|
||||
const resolvedColor = color ?? getScoreColor(score, maxScore);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<div className="relative" style={{ width: size, height: size }}>
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox={`0 0 ${size} ${size}`}
|
||||
className="-rotate-90"
|
||||
>
|
||||
<circle
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
r={radius}
|
||||
fill="none"
|
||||
stroke="#f1f5f9"
|
||||
strokeWidth={strokeWidth}
|
||||
/>
|
||||
<motion.circle
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
r={radius}
|
||||
fill="none"
|
||||
stroke={resolvedColor}
|
||||
strokeWidth={strokeWidth}
|
||||
strokeLinecap="round"
|
||||
strokeDasharray={circumference}
|
||||
initial={{ strokeDashoffset: circumference }}
|
||||
animate={{ strokeDashoffset }}
|
||||
transition={{ duration: 1, ease: 'easeOut' }}
|
||||
/>
|
||||
</svg>
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-[#0A1128]">{score}</span>
|
||||
</div>
|
||||
</div>
|
||||
{label && (
|
||||
<span className="text-sm text-slate-500 text-center">{label}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
interface SectionWrapperProps {
|
||||
id: string;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
children: ReactNode;
|
||||
dark?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function SectionWrapper({
|
||||
id,
|
||||
title,
|
||||
subtitle,
|
||||
children,
|
||||
dark = false,
|
||||
className = '',
|
||||
}: SectionWrapperProps) {
|
||||
return (
|
||||
<motion.section
|
||||
id={id}
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, ease: 'easeOut' }}
|
||||
className={`
|
||||
${dark
|
||||
? 'bg-[#0A1128] text-white relative overflow-hidden'
|
||||
: 'bg-white'
|
||||
}
|
||||
py-16 md:py-20 px-6
|
||||
${className}
|
||||
`}
|
||||
>
|
||||
{dark && (
|
||||
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(108,92,231,0.15),transparent_60%)]" />
|
||||
)}
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="mb-10">
|
||||
<h2
|
||||
className={`
|
||||
font-serif font-bold text-3xl md:text-4xl mb-3
|
||||
${dark
|
||||
? 'bg-gradient-to-r from-purple-300 to-blue-300 bg-clip-text text-transparent'
|
||||
: 'text-gradient'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
{subtitle && (
|
||||
<p
|
||||
className={`text-lg ${dark ? 'text-purple-200' : 'text-slate-600'}`}
|
||||
>
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</motion.section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
type SeverityLevel = 'critical' | 'warning' | 'good' | 'excellent' | 'unknown';
|
||||
|
||||
interface SeverityBadgeProps {
|
||||
severity: SeverityLevel;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
const config: Record<SeverityLevel, { className: string; defaultLabel: string }> = {
|
||||
critical: {
|
||||
className: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]',
|
||||
defaultLabel: '심각',
|
||||
},
|
||||
warning: {
|
||||
className: 'bg-[#FFF6ED] text-[#7C5C3A] border-[#F5E0C5]',
|
||||
defaultLabel: '주의',
|
||||
},
|
||||
good: {
|
||||
className: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]',
|
||||
defaultLabel: '양호',
|
||||
},
|
||||
excellent: {
|
||||
className: 'bg-[#EFF0FF] text-[#3A3F7C] border-[#C5CBF5]',
|
||||
defaultLabel: '우수',
|
||||
},
|
||||
unknown: {
|
||||
className: 'bg-slate-50 text-slate-700 border-slate-200',
|
||||
defaultLabel: '미확인',
|
||||
},
|
||||
};
|
||||
|
||||
export function SeverityBadge({ severity, label }: SeverityBadgeProps) {
|
||||
const { className, defaultLabel } = config[severity];
|
||||
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center rounded-full text-xs font-medium px-3 py-1 border ${className}`}
|
||||
>
|
||||
{label ?? defaultLabel}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
import { useState, useCallback } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { FileTextFilled } from '../icons/FilledIcons';
|
||||
import type { StudioState } from '../../types/studio';
|
||||
import { CHANNEL_OPTIONS } from '../../types/studio';
|
||||
import { generateImage, type GenerateResult } from '../../services/geminiImageGen';
|
||||
|
||||
interface Props {
|
||||
studioState: StudioState;
|
||||
}
|
||||
|
||||
type GenStatus = 'idle' | 'generating' | 'done' | 'error';
|
||||
|
||||
const PLACEHOLDER_BLOG = `# 한번에 성공하는 코성형, VIEW의 비결
|
||||
|
||||
코성형은 얼굴의 중심을 결정하는 중요한 수술입니다. VIEW 성형외과는 21년간 축적된 노하우를 바탕으로, 환자 개개인의 얼굴 비율과 피부 특성을 정밀 분석하여 자연스러운 결과를 만들어냅니다.
|
||||
|
||||
## 왜 VIEW인가?
|
||||
|
||||
- **21년 무사고** 안전 시스템
|
||||
- **분야별 전문의** 협진 시스템
|
||||
- **수술실 CCTV** 투명한 수술 환경
|
||||
- **전담 마취과 전문의** 상주
|
||||
|
||||
## 코성형 종류별 특징
|
||||
|
||||
### 1. 매부리코 교정
|
||||
매부리코는 코뼈와 연골의 돌출로 인해 발생합니다. VIEW에서는 절골술과 연골 성형을 병행하여 자연스러운 일자 라인을 만들어냅니다.
|
||||
|
||||
### 2. 콧대 높이기
|
||||
실리콘이나 고어텍스를 이용한 융비술로 이상적인 콧대 높이를 만듭니다. 환자의 피부 두께와 코 구조에 맞는 보형물을 선택합니다.
|
||||
|
||||
### 3. 코끝 성형
|
||||
코끝의 모양과 각도를 조절하여 세련된 인상을 만드는 수술입니다. 자가연골(귀연골, 비중격연골)을 활용하여 자연스러운 결과를 추구합니다.
|
||||
|
||||
## 상담 예약
|
||||
|
||||
지금 바로 무료 상담을 예약하세요. VIEW 성형외과 전문의가 1:1 맞춤 상담을 제공합니다.
|
||||
|
||||
☎ 02-XXX-XXXX | 서울 강남구 논현동`;
|
||||
|
||||
export default function BlogEditorStep({ studioState }: Props) {
|
||||
const [imageStatus, setImageStatus] = useState<GenStatus>('idle');
|
||||
const [imageResult, setImageResult] = useState<GenerateResult | null>(null);
|
||||
const [imageError, setImageError] = useState('');
|
||||
const [blogText, setBlogText] = useState(PLACEHOLDER_BLOG);
|
||||
const [activeTab, setActiveTab] = useState<'image' | 'text'>('image');
|
||||
|
||||
const activeChannel = CHANNEL_OPTIONS.find(c => c.channel === studioState.channel);
|
||||
const activeFormat = activeChannel?.formats.find(f => f.key === studioState.format);
|
||||
|
||||
const handleGenerateImage = useCallback(async () => {
|
||||
setImageStatus('generating');
|
||||
setImageError('');
|
||||
try {
|
||||
const res = await generateImage(studioState);
|
||||
setImageResult(res);
|
||||
setImageStatus('done');
|
||||
} catch (err) {
|
||||
setImageError(err instanceof Error ? err.message : '이미지 생성 실패');
|
||||
setImageStatus('error');
|
||||
}
|
||||
}, [studioState]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Tabs */}
|
||||
<div className="flex gap-2 mb-8">
|
||||
{([
|
||||
{ key: 'image' as const, label: '대표 이미지' },
|
||||
{ key: 'text' as const, label: '블로그 텍스트' },
|
||||
]).map(tab => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
className={`flex items-center gap-2 px-5 py-3 rounded-full text-sm font-medium transition-all ${
|
||||
activeTab === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-md'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{activeTab === 'image' && (
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
{/* Image generation */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">대표 이미지 생성</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">블로그 상단에 들어갈 대표 이미지를 AI로 생성합니다</p>
|
||||
|
||||
<div className="bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-5 mb-4 space-y-3">
|
||||
<SummaryRow label="포맷" value={activeFormat?.label ?? '-'} />
|
||||
<SummaryRow label="비율" value="16:9 (블로그 헤더)" />
|
||||
<SummaryRow label="스타일" value="프리미엄 의료 마케팅" />
|
||||
</div>
|
||||
|
||||
{(imageStatus === 'idle' || imageStatus === 'error') && (
|
||||
<button
|
||||
onClick={handleGenerateImage}
|
||||
className="w-full flex items-center justify-center gap-2 py-4 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white text-sm font-medium shadow-md hover:shadow-lg transition-all"
|
||||
>
|
||||
<FileTextFilled size={18} className="text-white" />
|
||||
{imageStatus === 'error' ? '다시 시도' : '이미지 생성'}
|
||||
</button>
|
||||
)}
|
||||
{imageStatus === 'error' && (
|
||||
<p className="mt-3 text-sm text-[#7C3A4B] text-center">{imageError}</p>
|
||||
)}
|
||||
{imageStatus === 'done' && (
|
||||
<button
|
||||
onClick={() => { setImageStatus('idle'); setImageResult(null); }}
|
||||
className="w-full py-3 rounded-full bg-white border border-slate-200 text-slate-600 text-sm font-medium shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:bg-slate-50 transition-all"
|
||||
>
|
||||
새로 생성
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Image preview */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">프리뷰</h3>
|
||||
<div className="w-full aspect-video rounded-2xl overflow-hidden border border-slate-200 bg-slate-50 flex items-center justify-center relative">
|
||||
{imageStatus === 'idle' && (
|
||||
<div className="text-center px-6">
|
||||
<div className="w-16 h-16 rounded-2xl bg-[#F3F0FF] flex items-center justify-center mx-auto mb-4">
|
||||
<FileTextFilled size={28} className="text-[#9B8AD4]" />
|
||||
</div>
|
||||
<p className="text-sm text-slate-400">생성 버튼을 눌러주세요</p>
|
||||
</div>
|
||||
)}
|
||||
{imageStatus === 'generating' && (
|
||||
<div className="text-center">
|
||||
<div className="w-12 h-12 border-4 border-[#6C5CE7] border-t-transparent rounded-full animate-spin mx-auto mb-4" />
|
||||
<p className="text-sm text-slate-500">이미지 생성 중...</p>
|
||||
</div>
|
||||
)}
|
||||
{imageStatus === 'error' && (
|
||||
<p className="text-sm text-[#7C3A4B]">{imageError}</p>
|
||||
)}
|
||||
{imageStatus === 'done' && imageResult?.imageDataUrl && (
|
||||
<motion.img
|
||||
src={imageResult.imageDataUrl}
|
||||
alt="Blog header"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
className="absolute inset-0 w-full h-full object-cover"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{activeTab === 'text' && (
|
||||
<div>
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">블로그 편집기</h3>
|
||||
<p className="text-sm text-slate-500 mt-1">AI가 생성한 초안을 수정하세요 (Markdown 지원)</p>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<span className="px-3 py-1 rounded-full bg-[#F3F0FF] text-[#4A3A7C] text-xs font-medium border border-[#D5CDF5]">
|
||||
{blogText.length.toLocaleString()}자
|
||||
</span>
|
||||
<span className="px-3 py-1 rounded-full bg-[#EFF0FF] text-[#3A3F7C] text-xs font-medium border border-[#C5CBF5]">
|
||||
SEO 최적화
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<textarea
|
||||
value={blogText}
|
||||
onChange={(e) => setBlogText(e.target.value)}
|
||||
className="w-full min-h-[500px] p-6 rounded-2xl border border-slate-200 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] text-sm text-slate-700 leading-relaxed font-mono resize-y focus:outline-none focus:border-[#6C5CE7] focus:ring-1 focus:ring-[#6C5CE7]/20 transition-all"
|
||||
placeholder="블로그 콘텐츠를 입력하세요..."
|
||||
/>
|
||||
|
||||
<div className="flex gap-3 mt-6">
|
||||
<button className="flex-1 py-3 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white text-sm font-medium shadow-md hover:shadow-lg transition-all">
|
||||
저장
|
||||
</button>
|
||||
<button className="flex-1 py-3 rounded-full bg-white border border-slate-200 text-slate-600 text-sm font-medium shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:bg-slate-50 transition-all">
|
||||
AI 재생성
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SummaryRow({ label, value }: { label: string; value: string }) {
|
||||
return (
|
||||
<div className="flex items-center justify-between py-2 border-b border-slate-50 last:border-0">
|
||||
<span className="text-sm text-slate-500">{label}</span>
|
||||
<span className="text-sm font-medium text-[#0A1128]">{value}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
import { type ComponentType } from 'react';
|
||||
import {
|
||||
YoutubeFilled,
|
||||
InstagramFilled,
|
||||
FacebookFilled,
|
||||
GlobeFilled,
|
||||
TiktokFilled,
|
||||
} from '../icons/FilledIcons';
|
||||
import { CHANNEL_OPTIONS, type StudioChannel, type ContentFormat } from '../../types/studio';
|
||||
|
||||
interface Props {
|
||||
selectedChannel: StudioChannel | null;
|
||||
selectedFormat: ContentFormat | null;
|
||||
onChannelSelect: (ch: StudioChannel | null) => void;
|
||||
onFormatSelect: (fmt: ContentFormat | null) => void;
|
||||
}
|
||||
|
||||
const iconMap: Record<string, ComponentType<{ size?: number; className?: string }>> = {
|
||||
youtube: YoutubeFilled,
|
||||
instagram: InstagramFilled,
|
||||
facebook: FacebookFilled,
|
||||
globe: GlobeFilled,
|
||||
tiktok: TiktokFilled,
|
||||
};
|
||||
|
||||
export default function ChannelFormatStep({ selectedChannel, selectedFormat, onChannelSelect, onFormatSelect }: Props) {
|
||||
const activeChannel = CHANNEL_OPTIONS.find(c => c.channel === selectedChannel);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Channel Selection */}
|
||||
<div className="mb-10">
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">채널 선택</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">콘텐츠를 게시할 채널을 선택하세요</p>
|
||||
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4">
|
||||
{CHANNEL_OPTIONS.map(ch => {
|
||||
const Icon = iconMap[ch.icon] ?? GlobeFilled;
|
||||
const isSelected = selectedChannel === ch.channel;
|
||||
|
||||
return (
|
||||
<button
|
||||
key={ch.channel}
|
||||
onClick={() => {
|
||||
onChannelSelect(isSelected ? null : ch.channel);
|
||||
onFormatSelect(null);
|
||||
}}
|
||||
className={`relative flex flex-col items-center gap-3 p-6 rounded-2xl border-2 transition-all ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
{isSelected && (
|
||||
<div className="absolute top-3 right-3 w-5 h-5 rounded-full bg-[#6C5CE7] flex items-center justify-center">
|
||||
<svg width="10" height="10" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="white" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
<div className={`w-12 h-12 rounded-xl flex items-center justify-center ${
|
||||
isSelected ? 'bg-[#F3F0FF]' : 'bg-slate-50'
|
||||
}`}>
|
||||
<Icon size={24} className={isSelected ? 'text-[#6C5CE7]' : 'text-[#9B8AD4]'} />
|
||||
</div>
|
||||
<span className={`text-sm font-semibold ${
|
||||
isSelected ? 'text-[#0A1128]' : 'text-slate-600'
|
||||
}`}>
|
||||
{ch.label}
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Format Selection */}
|
||||
{activeChannel && (
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">포맷 선택</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">{activeChannel.label}에 적합한 콘텐츠 포맷을 선택하세요</p>
|
||||
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||
{activeChannel.formats.map(fmt => {
|
||||
const isSelected = selectedFormat === fmt.key;
|
||||
|
||||
return (
|
||||
<button
|
||||
key={fmt.key}
|
||||
onClick={() => onFormatSelect(isSelected ? null : fmt.key)}
|
||||
className={`relative flex flex-col items-center gap-3 p-5 rounded-2xl border-2 transition-all ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
{isSelected && (
|
||||
<div className="absolute top-3 right-3 w-5 h-5 rounded-full bg-[#6C5CE7] flex items-center justify-center">
|
||||
<svg width="10" height="10" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="white" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Aspect ratio preview */}
|
||||
<div className={`rounded-lg bg-slate-100 border border-slate-200 flex items-center justify-center ${
|
||||
fmt.aspectRatio === '9:16' ? 'w-10 h-16' :
|
||||
fmt.aspectRatio === '16:9' ? 'w-16 h-10' :
|
||||
fmt.aspectRatio === '4:5' ? 'w-12 h-14' :
|
||||
'w-12 h-12'
|
||||
}`}>
|
||||
<span className="text-xs text-slate-400 font-medium">{fmt.aspectRatio}</span>
|
||||
</div>
|
||||
|
||||
<span className={`text-sm font-semibold ${
|
||||
isSelected ? 'text-[#0A1128]' : 'text-slate-600'
|
||||
}`}>
|
||||
{fmt.label}
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
import { useState, useCallback, useRef } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { VideoFilled, FileTextFilled } from '../icons/FilledIcons';
|
||||
import { CHANNEL_OPTIONS, MUSIC_TRACKS, type StudioState, type GenerateOutputType } from '../../types/studio';
|
||||
import { generateImage, type GenerateResult } from '../../services/geminiImageGen';
|
||||
|
||||
interface Props {
|
||||
studioState: StudioState;
|
||||
outputType: GenerateOutputType;
|
||||
onOutputTypeChange: (type: GenerateOutputType) => void;
|
||||
}
|
||||
|
||||
type GenerateStatus = 'idle' | 'generating' | 'done' | 'error';
|
||||
|
||||
export default function GeneratePreviewStep({ studioState, outputType, onOutputTypeChange }: Props) {
|
||||
const [status, setStatus] = useState<GenerateStatus>('idle');
|
||||
const [result, setResult] = useState<GenerateResult | null>(null);
|
||||
const [errorMsg, setErrorMsg] = useState('');
|
||||
const downloadRef = useRef<HTMLAnchorElement>(null);
|
||||
|
||||
const activeChannel = CHANNEL_OPTIONS.find(c => c.channel === studioState.channel);
|
||||
const activeFormat = activeChannel?.formats.find(f => f.key === studioState.format);
|
||||
const activeTrack = MUSIC_TRACKS.find(t => t.id === studioState.sound.trackId);
|
||||
|
||||
const handleGenerate = useCallback(async () => {
|
||||
setStatus('generating');
|
||||
setErrorMsg('');
|
||||
setResult(null);
|
||||
|
||||
if (outputType === 'image') {
|
||||
try {
|
||||
const res = await generateImage(studioState);
|
||||
setResult(res);
|
||||
setStatus('done');
|
||||
} catch (err) {
|
||||
setErrorMsg(err instanceof Error ? err.message : 'Image generation failed');
|
||||
setStatus('error');
|
||||
}
|
||||
} else {
|
||||
// Video: placeholder (Creatomate integration needed)
|
||||
setTimeout(() => setStatus('done'), 4000);
|
||||
}
|
||||
}, [studioState, outputType]);
|
||||
|
||||
const handleReset = useCallback(() => {
|
||||
setStatus('idle');
|
||||
setResult(null);
|
||||
setErrorMsg('');
|
||||
}, []);
|
||||
|
||||
const handleDownload = useCallback(() => {
|
||||
if (!result?.imageDataUrl || !downloadRef.current) return;
|
||||
const link = downloadRef.current;
|
||||
link.href = result.imageDataUrl;
|
||||
link.download = `INFINITH_${activeChannel?.label ?? 'content'}_${activeFormat?.key ?? 'image'}.png`;
|
||||
link.click();
|
||||
}, [result, activeChannel, activeFormat]);
|
||||
|
||||
const aspectClass =
|
||||
activeFormat?.aspectRatio === '9:16' ? 'w-[240px] h-[426px]' :
|
||||
activeFormat?.aspectRatio === '1:1' ? 'w-[340px] h-[340px]' :
|
||||
activeFormat?.aspectRatio === '4:5' ? 'w-[300px] h-[375px]' :
|
||||
'w-[426px] h-[240px]';
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Hidden download anchor */}
|
||||
<a ref={downloadRef} className="hidden" />
|
||||
|
||||
{/* Output Type Tabs */}
|
||||
<div className="flex gap-2 mb-8">
|
||||
{([
|
||||
{ key: 'image' as const, label: '이미지 생성', Icon: FileTextFilled },
|
||||
{ key: 'video' as const, label: '영상 생성', Icon: VideoFilled },
|
||||
]).map(tab => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => { onOutputTypeChange(tab.key); handleReset(); }}
|
||||
className={`flex items-center gap-2 px-5 py-3 rounded-full text-sm font-medium transition-all ${
|
||||
outputType === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-md'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
<tab.Icon size={16} className={outputType === tab.key ? 'text-white' : 'text-[#9B8AD4]'} />
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
{/* Settings Summary */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4">설정 요약</h3>
|
||||
<div className="bg-white rounded-2xl border border-slate-100 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] p-6 space-y-4">
|
||||
<SummaryRow label="채널" value={activeChannel?.label ?? '-'} />
|
||||
<SummaryRow label="포맷" value={activeFormat?.label ?? '-'} />
|
||||
<SummaryRow label="비율" value={activeFormat?.aspectRatio ?? '-'} />
|
||||
<SummaryRow label="음악" value={activeTrack?.name ?? (studioState.sound.genre === 'none' ? '없음' : '미선택')} />
|
||||
<SummaryRow label="나레이션" value={studioState.sound.narrationEnabled
|
||||
? `${studioState.sound.narrationLanguage.toUpperCase()} / ${studioState.sound.narrationVoice === 'female' ? 'Female' : 'Male'}`
|
||||
: '없음'
|
||||
} />
|
||||
<SummaryRow label="자막" value={studioState.sound.subtitleEnabled ? 'ON' : 'OFF'} />
|
||||
<SummaryRow label="출력" value={outputType === 'image' ? '이미지' : '영상'} />
|
||||
</div>
|
||||
|
||||
{/* Generate Button */}
|
||||
{(status === 'idle' || status === 'error') && (
|
||||
<button
|
||||
onClick={handleGenerate}
|
||||
className="mt-6 w-full flex items-center justify-center gap-2 py-4 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white text-sm font-medium shadow-md hover:shadow-lg transition-all"
|
||||
>
|
||||
{outputType === 'image' ? (
|
||||
<FileTextFilled size={18} className="text-white" />
|
||||
) : (
|
||||
<VideoFilled size={18} className="text-white" />
|
||||
)}
|
||||
{status === 'error' ? '다시 시도' : outputType === 'image' ? '이미지 생성' : '영상 생성'}
|
||||
</button>
|
||||
)}
|
||||
|
||||
{status === 'error' && (
|
||||
<p className="mt-3 text-sm text-[#7C3A4B] text-center">{errorMsg}</p>
|
||||
)}
|
||||
|
||||
{status === 'done' && (
|
||||
<div className="mt-6 flex gap-3">
|
||||
{result?.imageDataUrl && (
|
||||
<button
|
||||
onClick={handleDownload}
|
||||
className="flex-1 py-3 rounded-full bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white text-sm font-medium shadow-md hover:shadow-lg transition-all"
|
||||
>
|
||||
다운로드
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="flex-1 py-3 rounded-full bg-white border border-slate-200 text-slate-600 text-sm font-medium shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:bg-slate-50 transition-all"
|
||||
>
|
||||
새로 생성
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Preview Area */}
|
||||
<div className="flex flex-col items-center">
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-4 self-start">프리뷰</h3>
|
||||
|
||||
<div className={`${aspectClass} rounded-2xl overflow-hidden border border-slate-200 bg-slate-50 flex items-center justify-center relative`}>
|
||||
{status === 'idle' && (
|
||||
<div className="text-center px-6">
|
||||
<div className="w-16 h-16 rounded-2xl bg-[#F3F0FF] flex items-center justify-center mx-auto mb-4">
|
||||
{outputType === 'image' ? (
|
||||
<FileTextFilled size={28} className="text-[#9B8AD4]" />
|
||||
) : (
|
||||
<VideoFilled size={28} className="text-[#9B8AD4]" />
|
||||
)}
|
||||
</div>
|
||||
<p className="text-sm text-slate-400">
|
||||
설정을 확인하고 생성 버튼을 눌러주세요
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{status === 'generating' && (
|
||||
<div className="text-center">
|
||||
<div className="w-12 h-12 border-4 border-[#6C5CE7] border-t-transparent rounded-full animate-spin mx-auto mb-4" />
|
||||
<p className="text-sm text-slate-500 mb-1">
|
||||
{outputType === 'image' ? '이미지' : '영상'} 생성 중...
|
||||
</p>
|
||||
<p className="text-xs text-slate-400">AI가 콘텐츠를 제작하고 있습니다</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{status === 'error' && (
|
||||
<div className="text-center px-6">
|
||||
<div className="w-14 h-14 rounded-full bg-[#FFF0F0] flex items-center justify-center mx-auto mb-4">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="12" cy="12" r="10" fill="#D4889A" opacity="0.3" />
|
||||
<path d="M12 8v4M12 16h.01" stroke="#7C3A4B" strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<p className="text-sm text-[#7C3A4B]">{errorMsg}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{status === 'done' && result?.imageDataUrl && (
|
||||
<motion.img
|
||||
src={result.imageDataUrl}
|
||||
alt="Generated content"
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
className="absolute inset-0 w-full h-full object-cover"
|
||||
/>
|
||||
)}
|
||||
|
||||
{status === 'done' && !result?.imageDataUrl && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.95 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
className="absolute inset-0 bg-gradient-to-br from-[#F3F0FF] via-white to-[#FFF6ED] flex flex-col items-center justify-center p-6"
|
||||
>
|
||||
<div className="w-14 h-14 rounded-full bg-[#6C5CE7] flex items-center justify-center mb-4">
|
||||
<svg width="24" height="24" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<p className="text-lg font-semibold text-[#0A1128] mb-1">생성 완료</p>
|
||||
<p className="text-sm text-slate-500 text-center">
|
||||
{activeChannel?.label} {activeFormat?.label}
|
||||
{outputType === 'image' ? ' 이미지' : ' 영상'}이 준비되었습니다
|
||||
</p>
|
||||
<div className="mt-4 px-4 py-2 rounded-full bg-[#F3F0FF] text-[#4A3A7C] text-xs font-medium border border-[#D5CDF5]">
|
||||
{activeFormat?.aspectRatio} | {outputType === 'image' ? 'PNG' : 'MP4'}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SummaryRow({ label, value }: { label: string; value: string }) {
|
||||
return (
|
||||
<div className="flex items-center justify-between py-2 border-b border-slate-50 last:border-0">
|
||||
<span className="text-sm text-slate-500">{label}</span>
|
||||
<span className="text-sm font-medium text-[#0A1128]">{value}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
import { MusicFilled, MessageFilled } from '../icons/FilledIcons';
|
||||
import { MUSIC_TRACKS, type SoundSettings, type MusicGenre, type NarrationLanguage, type NarrationVoice } from '../../types/studio';
|
||||
|
||||
interface Props {
|
||||
sound: SoundSettings;
|
||||
onGenreChange: (genre: MusicGenre) => void;
|
||||
onTrackChange: (trackId: string | null) => void;
|
||||
onNarrationToggle: (enabled: boolean) => void;
|
||||
onLanguageChange: (lang: NarrationLanguage) => void;
|
||||
onVoiceChange: (voice: NarrationVoice) => void;
|
||||
onSubtitleToggle: (enabled: boolean) => void;
|
||||
}
|
||||
|
||||
const GENRES: { key: MusicGenre; label: string }[] = [
|
||||
{ key: 'calm', label: 'Calm' },
|
||||
{ key: 'upbeat', label: 'Upbeat' },
|
||||
{ key: 'cinematic', label: 'Cinematic' },
|
||||
{ key: 'corporate', label: 'Corporate' },
|
||||
{ key: 'none', label: 'No Music' },
|
||||
];
|
||||
|
||||
const LANGUAGES: { key: NarrationLanguage; label: string }[] = [
|
||||
{ key: 'ko', label: '한국어' },
|
||||
{ key: 'en', label: 'English' },
|
||||
{ key: 'ja', label: '日本語' },
|
||||
{ key: 'zh', label: '中文' },
|
||||
];
|
||||
|
||||
export default function SoundStudioStep({ sound, onGenreChange, onTrackChange, onNarrationToggle, onLanguageChange, onVoiceChange, onSubtitleToggle }: Props) {
|
||||
const filteredTracks = MUSIC_TRACKS.filter(t => t.genre === sound.genre);
|
||||
|
||||
return (
|
||||
<div className="space-y-10">
|
||||
{/* Music Genre */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">배경 음악</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">콘텐츠에 어울리는 음악 장르를 선택하세요</p>
|
||||
|
||||
<div className="flex flex-wrap gap-2 mb-6">
|
||||
{GENRES.map(g => (
|
||||
<button
|
||||
key={g.key}
|
||||
onClick={() => onGenreChange(g.key)}
|
||||
className={`px-5 py-3 rounded-full text-sm font-medium transition-all ${
|
||||
sound.genre === g.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-md'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50 shadow-[2px_3px_6px_rgba(0,0,0,0.04)]'
|
||||
}`}
|
||||
>
|
||||
{g.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Track List */}
|
||||
{sound.genre !== 'none' && (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-3 gap-3">
|
||||
{filteredTracks.map(track => {
|
||||
const isSelected = sound.trackId === track.id;
|
||||
return (
|
||||
<button
|
||||
key={track.id}
|
||||
onClick={() => onTrackChange(isSelected ? null : track.id)}
|
||||
className={`flex items-center gap-3 p-4 rounded-2xl border-2 transition-all text-left ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-10 h-10 rounded-xl flex items-center justify-center shrink-0 ${
|
||||
isSelected ? 'bg-[#F3F0FF]' : 'bg-slate-50'
|
||||
}`}>
|
||||
<MusicFilled size={18} className={isSelected ? 'text-[#6C5CE7]' : 'text-[#9B8AD4]'} />
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<p className={`text-sm font-semibold truncate ${isSelected ? 'text-[#0A1128]' : 'text-slate-700'}`}>
|
||||
{track.name}
|
||||
</p>
|
||||
<p className="text-xs text-slate-400">{track.duration}</p>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Narration */}
|
||||
<div>
|
||||
<div className="flex items-center gap-4 mb-6">
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">나레이션</h3>
|
||||
<button
|
||||
onClick={() => onNarrationToggle(!sound.narrationEnabled)}
|
||||
className={`relative w-12 h-6 rounded-full transition-colors ${
|
||||
sound.narrationEnabled ? 'bg-[#6C5CE7]' : 'bg-slate-200'
|
||||
}`}
|
||||
>
|
||||
<div className={`absolute top-1 w-5 h-5 rounded-full bg-white shadow transition-transform ${
|
||||
sound.narrationEnabled ? 'translate-x-6' : 'translate-x-1'
|
||||
}`} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{sound.narrationEnabled && (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6">
|
||||
{/* Language */}
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-600 mb-3">언어</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{LANGUAGES.map(lang => (
|
||||
<button
|
||||
key={lang.key}
|
||||
onClick={() => onLanguageChange(lang.key)}
|
||||
className={`px-4 py-2 rounded-full text-sm font-medium transition-all ${
|
||||
sound.narrationLanguage === lang.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-md'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{lang.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Voice */}
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-600 mb-3">보이스</p>
|
||||
<div className="flex gap-3">
|
||||
{(['female', 'male'] as NarrationVoice[]).map(voice => (
|
||||
<button
|
||||
key={voice}
|
||||
onClick={() => onVoiceChange(voice)}
|
||||
className={`flex items-center gap-2 px-5 py-3 rounded-2xl border-2 transition-all ${
|
||||
sound.narrationVoice === voice
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
<MessageFilled size={18} className={sound.narrationVoice === voice ? 'text-[#6C5CE7]' : 'text-[#9B8AD4]'} />
|
||||
<span className="text-sm font-medium">{voice === 'female' ? 'Female' : 'Male'}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Subtitle */}
|
||||
<div>
|
||||
<div className="flex items-center gap-4">
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128]">자막</h3>
|
||||
<button
|
||||
onClick={() => onSubtitleToggle(!sound.subtitleEnabled)}
|
||||
className={`relative w-12 h-6 rounded-full transition-colors ${
|
||||
sound.subtitleEnabled ? 'bg-[#6C5CE7]' : 'bg-slate-200'
|
||||
}`}
|
||||
>
|
||||
<div className={`absolute top-1 w-5 h-5 rounded-full bg-white shadow transition-transform ${
|
||||
sound.subtitleEnabled ? 'translate-x-6' : 'translate-x-1'
|
||||
}`} />
|
||||
</button>
|
||||
<span className="text-sm text-slate-500">
|
||||
{sound.subtitleEnabled ? '자막이 영상에 포함됩니다' : '자막 없음'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
import type { AssetSourceType } from '../../types/studio';
|
||||
|
||||
interface Props {
|
||||
selectedPillar: string | null;
|
||||
selectedSources: AssetSourceType[];
|
||||
onPillarSelect: (id: string | null) => void;
|
||||
onSourceToggle: (source: AssetSourceType) => void;
|
||||
}
|
||||
|
||||
const PILLARS = [
|
||||
{ id: 'safety', title: '안전과 신뢰', description: '수술 안전 시스템, 21년 무사고, CCTV, 마취과 전문의 상주', color: '#6C5CE7' },
|
||||
{ id: 'expertise', title: '전문성과 기술력', description: '분야별 전문의, 최신 장비, 논문 실적, 학회 활동', color: '#7A84D4' },
|
||||
{ id: 'results', title: '자연스러운 결과', description: '비포/애프터, 환자 후기, 한번에 성공하는 성형', color: '#9B8AD4' },
|
||||
{ id: 'care', title: '환자 중심 케어', description: '상담 프로세스, 사후 관리, 1:1 맞춤 플랜', color: '#D4A872' },
|
||||
];
|
||||
|
||||
const SOURCES: { key: AssetSourceType; title: string; description: string }[] = [
|
||||
{ key: 'collected', title: '수집된 에셋', description: '홈페이지, 블로그, SNS에서 수집한 기존 에셋' },
|
||||
{ key: 'my_assets', title: 'My Assets', description: '직접 업로드한 이미지, 영상, 텍스트 파일' },
|
||||
{ key: 'ai_generated', title: 'AI 생성', description: 'AI가 새로 생성하는 이미지, 텍스트, 영상' },
|
||||
];
|
||||
|
||||
export default function StrategySourceStep({ selectedPillar, selectedSources, onPillarSelect, onSourceToggle }: Props) {
|
||||
return (
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-10">
|
||||
{/* Pillar Selection */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">콘텐츠 전략</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">콘텐츠의 핵심 메시지 필러를 선택하세요</p>
|
||||
|
||||
<div className="space-y-3">
|
||||
{PILLARS.map(pillar => {
|
||||
const isSelected = selectedPillar === pillar.id;
|
||||
return (
|
||||
<button
|
||||
key={pillar.id}
|
||||
onClick={() => onPillarSelect(isSelected ? null : pillar.id)}
|
||||
className={`w-full text-left relative p-5 rounded-2xl border-2 transition-all ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
{isSelected && (
|
||||
<div className="absolute top-4 right-4 w-5 h-5 rounded-full bg-[#6C5CE7] flex items-center justify-center">
|
||||
<svg width="10" height="10" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="white" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-start gap-3">
|
||||
<div
|
||||
className="w-1 h-10 rounded-full shrink-0 mt-1"
|
||||
style={{ backgroundColor: pillar.color }}
|
||||
/>
|
||||
<div>
|
||||
<h4 className="font-semibold text-[#0A1128] mb-1">{pillar.title}</h4>
|
||||
<p className="text-sm text-slate-500">{pillar.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Source Selection */}
|
||||
<div>
|
||||
<h3 className="font-serif font-bold text-2xl text-[#0A1128] mb-2">소스 선택</h3>
|
||||
<p className="text-sm text-slate-500 mb-6">콘텐츠에 사용할 에셋 소스를 선택하세요 (복수 선택)</p>
|
||||
|
||||
<div className="space-y-3">
|
||||
{SOURCES.map(source => {
|
||||
const isSelected = selectedSources.includes(source.key);
|
||||
return (
|
||||
<button
|
||||
key={source.key}
|
||||
onClick={() => onSourceToggle(source.key)}
|
||||
className={`w-full text-left relative p-5 rounded-2xl border-2 transition-all ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#F3F0FF]/30 shadow-[3px_4px_12px_rgba(108,92,231,0.12)]'
|
||||
: 'border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:border-[#D5CDF5]'
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className={`w-5 h-5 rounded border-2 flex items-center justify-center shrink-0 transition-all ${
|
||||
isSelected
|
||||
? 'border-[#6C5CE7] bg-[#6C5CE7]'
|
||||
: 'border-slate-300 bg-white'
|
||||
}`}>
|
||||
{isSelected && (
|
||||
<svg width="10" height="10" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="white" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="font-semibold text-[#0A1128] mb-1">{source.title}</h4>
|
||||
<p className="text-sm text-slate-500">{source.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
import { useState, useCallback, useMemo } from 'react';
|
||||
import { motion, AnimatePresence } from 'motion/react';
|
||||
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
||||
import type { StudioState, StudioChannel, ContentFormat, AssetSourceType, MusicGenre, NarrationLanguage, NarrationVoice, GenerateOutputType } from '../../types/studio';
|
||||
import { DEFAULT_SOUND } from '../../types/studio';
|
||||
import ChannelFormatStep from './ChannelFormatStep';
|
||||
import StrategySourceStep from './StrategySourceStep';
|
||||
import SoundStudioStep from './SoundStudioStep';
|
||||
import GeneratePreviewStep from './GeneratePreviewStep';
|
||||
import BlogEditorStep from './BlogEditorStep';
|
||||
|
||||
interface StepDef {
|
||||
key: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
const VIDEO_STEPS: StepDef[] = [
|
||||
{ key: 'channel', label: '채널 선택' },
|
||||
{ key: 'strategy', label: '전략 선택' },
|
||||
{ key: 'sound', label: '사운드' },
|
||||
{ key: 'generate', label: '생성' },
|
||||
];
|
||||
|
||||
const BLOG_STEPS: StepDef[] = [
|
||||
{ key: 'channel', label: '채널 선택' },
|
||||
{ key: 'strategy', label: '전략 선택' },
|
||||
{ key: 'blog', label: '콘텐츠 생성' },
|
||||
];
|
||||
|
||||
function isBlogChannel(channel: StudioChannel | null): boolean {
|
||||
return channel === 'naver_blog';
|
||||
}
|
||||
|
||||
export default function StudioWizard() {
|
||||
const [step, setStep] = useState(0);
|
||||
const [state, setState] = useState<StudioState>({
|
||||
channel: null,
|
||||
format: null,
|
||||
pillarId: null,
|
||||
assetSources: [],
|
||||
sound: DEFAULT_SOUND,
|
||||
outputType: 'video',
|
||||
});
|
||||
|
||||
const steps = useMemo(() => isBlogChannel(state.channel) ? BLOG_STEPS : VIDEO_STEPS, [state.channel]);
|
||||
|
||||
const setChannel = useCallback((channel: StudioChannel | null) => {
|
||||
setState(s => ({
|
||||
...s,
|
||||
channel,
|
||||
format: null,
|
||||
outputType: channel === 'naver_blog' ? 'image' : 'video',
|
||||
}));
|
||||
// Reset step if switching between blog/video flow
|
||||
setStep(0);
|
||||
}, []);
|
||||
|
||||
const setFormat = useCallback((format: ContentFormat | null) => {
|
||||
setState(s => ({ ...s, format }));
|
||||
}, []);
|
||||
|
||||
const setPillar = useCallback((pillarId: string | null) => {
|
||||
setState(s => ({ ...s, pillarId }));
|
||||
}, []);
|
||||
|
||||
const toggleAssetSource = useCallback((source: AssetSourceType) => {
|
||||
setState(s => ({
|
||||
...s,
|
||||
assetSources: s.assetSources.includes(source)
|
||||
? s.assetSources.filter(x => x !== source)
|
||||
: [...s.assetSources, source],
|
||||
}));
|
||||
}, []);
|
||||
|
||||
const setGenre = useCallback((genre: MusicGenre) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, genre, trackId: null } }));
|
||||
}, []);
|
||||
|
||||
const setTrack = useCallback((trackId: string | null) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, trackId } }));
|
||||
}, []);
|
||||
|
||||
const setNarration = useCallback((enabled: boolean) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, narrationEnabled: enabled } }));
|
||||
}, []);
|
||||
|
||||
const setNarrationLang = useCallback((lang: NarrationLanguage) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, narrationLanguage: lang } }));
|
||||
}, []);
|
||||
|
||||
const setNarrationVoice = useCallback((voice: NarrationVoice) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, narrationVoice: voice } }));
|
||||
}, []);
|
||||
|
||||
const setSubtitle = useCallback((enabled: boolean) => {
|
||||
setState(s => ({ ...s, sound: { ...s.sound, subtitleEnabled: enabled } }));
|
||||
}, []);
|
||||
|
||||
const setOutputType = useCallback((type: GenerateOutputType) => {
|
||||
setState(s => ({ ...s, outputType: type }));
|
||||
}, []);
|
||||
|
||||
const currentStepKey = steps[step]?.key;
|
||||
|
||||
const canProceed = (): boolean => {
|
||||
switch (currentStepKey) {
|
||||
case 'channel': return state.channel !== null && state.format !== null;
|
||||
case 'strategy': return state.pillarId !== null && state.assetSources.length > 0;
|
||||
case 'sound': return true;
|
||||
case 'generate': return true;
|
||||
case 'blog': return true;
|
||||
default: return false;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen pt-24 pb-32 px-6">
|
||||
<div className="max-w-5xl mx-auto">
|
||||
{/* Progress Bar */}
|
||||
<div className="flex items-center justify-center mb-12">
|
||||
{steps.map((s, i) => (
|
||||
<div key={s.key} className="flex items-center">
|
||||
<button
|
||||
onClick={() => i < step && setStep(i)}
|
||||
className={`flex items-center gap-2 transition-all ${i <= step ? 'cursor-pointer' : 'cursor-default'}`}
|
||||
>
|
||||
<div className={`w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-all ${
|
||||
i < step
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white'
|
||||
: i === step
|
||||
? 'border-2 border-[#6C5CE7] text-[#6C5CE7] bg-white'
|
||||
: 'border-2 border-slate-200 text-slate-400 bg-white'
|
||||
}`}>
|
||||
{i < step ? (
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 7L5.5 10.5L12 3.5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
) : (
|
||||
i + 1
|
||||
)}
|
||||
</div>
|
||||
<span className={`text-sm font-medium hidden md:inline ${
|
||||
i <= step ? 'text-[#0A1128]' : 'text-slate-400'
|
||||
}`}>
|
||||
{s.label}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
{i < steps.length - 1 && (
|
||||
<div className={`w-12 md:w-20 h-1 mx-2 transition-colors ${
|
||||
i < step ? 'bg-[#6C5CE7]' : 'bg-slate-200'
|
||||
}`} />
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Step Content */}
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div
|
||||
key={`${currentStepKey}-${step}`}
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
exit={{ opacity: 0, x: -20 }}
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
{currentStepKey === 'channel' && (
|
||||
<ChannelFormatStep
|
||||
selectedChannel={state.channel}
|
||||
selectedFormat={state.format}
|
||||
onChannelSelect={setChannel}
|
||||
onFormatSelect={setFormat}
|
||||
/>
|
||||
)}
|
||||
{currentStepKey === 'strategy' && (
|
||||
<StrategySourceStep
|
||||
selectedPillar={state.pillarId}
|
||||
selectedSources={state.assetSources}
|
||||
onPillarSelect={setPillar}
|
||||
onSourceToggle={toggleAssetSource}
|
||||
/>
|
||||
)}
|
||||
{currentStepKey === 'sound' && (
|
||||
<SoundStudioStep
|
||||
sound={state.sound}
|
||||
onGenreChange={setGenre}
|
||||
onTrackChange={setTrack}
|
||||
onNarrationToggle={setNarration}
|
||||
onLanguageChange={setNarrationLang}
|
||||
onVoiceChange={setNarrationVoice}
|
||||
onSubtitleToggle={setSubtitle}
|
||||
/>
|
||||
)}
|
||||
{currentStepKey === 'generate' && (
|
||||
<GeneratePreviewStep
|
||||
studioState={state}
|
||||
outputType={state.outputType}
|
||||
onOutputTypeChange={setOutputType}
|
||||
/>
|
||||
)}
|
||||
{currentStepKey === 'blog' && (
|
||||
<BlogEditorStep studioState={state} />
|
||||
)}
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
|
||||
{/* Bottom Navigation */}
|
||||
<div className="flex items-center justify-between mt-12">
|
||||
<button
|
||||
onClick={() => setStep(s => Math.max(0, s - 1))}
|
||||
disabled={step === 0}
|
||||
className="flex items-center gap-2 px-5 py-3 rounded-full text-sm font-medium text-slate-600 bg-white border border-slate-200 shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:bg-slate-50 transition-all disabled:opacity-30 disabled:cursor-not-allowed"
|
||||
>
|
||||
<ChevronLeft size={16} />
|
||||
이전
|
||||
</button>
|
||||
|
||||
{step < steps.length - 1 ? (
|
||||
<button
|
||||
onClick={() => setStep(s => Math.min(steps.length - 1, s + 1))}
|
||||
disabled={!canProceed()}
|
||||
className="flex items-center gap-2 px-6 py-3 rounded-full text-sm font-medium text-white bg-gradient-to-r from-[#4F1DA1] to-[#021341] shadow-md hover:shadow-lg transition-all disabled:opacity-40 disabled:cursor-not-allowed"
|
||||
>
|
||||
다음
|
||||
<ChevronRight size={16} />
|
||||
</button>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user