import React, { useState } from "react"; import { clsx } from "clsx"; interface PortfolioItem { id: string; title: string; description: string; category: string; image: string; technologies?: string[]; projectUrl?: string; githubUrl?: string; date?: string; client?: string; } interface StandardPortfolioProps { title?: string; description?: string; portfolioItems?: PortfolioItem[]; categories?: string[]; showFilters?: boolean; showTechnologies?: boolean; layout?: "grid" | "masonry"; itemsPerPage?: number; className?: string; theme?: { primaryColor?: string; secondaryColor?: string; accentColor?: string; fontFamily?: string; }; } const defaultPortfolioItems: PortfolioItem[] = [ { id: "1", title: "E-커머스 플랫폼", description: "React와 Node.js를 활용한 풀스택 전자상거래 솔루션", category: "웹 개발", image: "/images/portfolio/ecommerce-platform.jpg", technologies: ["React", "Node.js", "PostgreSQL", "Redis"], projectUrl: "https://example-ecommerce.com", githubUrl: "https://github.com/example/ecommerce", date: "2024-01-15", client: "온라인몰 스타트업", }, { id: "2", title: "모바일 앱 디자인", description: "사용자 친화적인 헬스케어 모바일 앱 UI/UX 디자인", category: "디자인", image: "/images/portfolio/mobile-app-design.jpg", technologies: ["Figma", "Sketch", "Adobe XD"], date: "2024-01-10", client: "헬스케어 스타트업", }, { id: "3", title: "데이터 분석 대시보드", description: "실시간 비즈니스 인텔리전스 대시보드 구축", category: "데이터 분석", image: "/images/portfolio/analytics-dashboard.jpg", technologies: ["Python", "React", "D3.js", "MongoDB"], projectUrl: "https://example-dashboard.com", date: "2023-12-20", client: "제조업체", }, { id: "4", title: "브랜드 아이덴티티", description: "스타트업을 위한 완전한 브랜드 아이덴티티 시스템", category: "디자인", image: "/images/portfolio/brand-identity.jpg", technologies: ["Adobe Illustrator", "Adobe Photoshop"], date: "2023-12-01", client: "테크 스타트업", }, { id: "5", title: "AI 챗봇 시스템", description: "자연어 처리 기반 고객 서비스 챗봇", category: "AI/ML", image: "/images/portfolio/ai-chatbot.jpg", technologies: ["Python", "TensorFlow", "FastAPI", "Docker"], githubUrl: "https://github.com/example/ai-chatbot", date: "2023-11-15", client: "금융 서비스", }, { id: "6", title: "클라우드 인프라", description: "AWS 기반 확장 가능한 마이크로서비스 아키텍처", category: "클라우드", image: "/images/portfolio/cloud-infrastructure.jpg", technologies: ["AWS", "Docker", "Kubernetes", "Terraform"], date: "2023-10-30", client: "대기업", }, ]; const defaultCategories = [ "전체", "웹 개발", "디자인", "데이터 분석", "AI/ML", "클라우드", ]; export function StandardPortfolio({ title = "포트폴리오", description = "저희가 수행한 다양한 프로젝트들을 확인해보세요.", portfolioItems = defaultPortfolioItems, categories = defaultCategories, showFilters = true, showTechnologies = true, layout = "grid", itemsPerPage = 6, className, theme = {}, }: StandardPortfolioProps) { const [selectedCategory, setSelectedCategory] = useState("전체"); const [selectedItem, setSelectedItem] = useState(null); const [showModal, setShowModal] = useState(false); const filteredItems = selectedCategory === "전체" ? portfolioItems : portfolioItems.filter((item) => item.category === selectedCategory); const openModal = (item: PortfolioItem) => { setSelectedItem(item); setShowModal(true); }; const closeModal = () => { setSelectedItem(null); setShowModal(false); }; const renderPortfolioItem = (item: PortfolioItem) => (
openModal(item)} >
{item.title}
{item.category} {item.date && ( {new Date(item.date).toLocaleDateString("ko-KR")} )}

{item.title}

{item.description}

{showTechnologies && item.technologies && item.technologies.length > 0 && (
{item.technologies.slice(0, 3).map((tech) => ( {tech} ))} {item.technologies.length > 3 && ( +{item.technologies.length - 3} )}
)}
); return ( <>
{/* Header */}

{title}

{description}

{/* Filters */} {showFilters && (
{categories.map((category) => ( ))}
)} {/* Portfolio Grid */}
{filteredItems.map(renderPortfolioItem)}
{/* Modal */} {showModal && selectedItem && (

{selectedItem.title}

{selectedItem.title}

프로젝트 설명

{selectedItem.description}

{selectedItem.client && (

클라이언트

{selectedItem.client}

)} {selectedItem.date && (

완료일

{new Date(selectedItem.date).toLocaleDateString( "ko-KR" )}

)}
{selectedItem.technologies && selectedItem.technologies.length > 0 && (

사용 기술

{selectedItem.technologies.map((tech) => ( {tech} ))}
)}
{selectedItem.projectUrl && ( 프로젝트 보기 )} {selectedItem.githubUrl && ( GitHub )}
)} ); }