Skip to content

Commit 85c0e24

Browse files
author
ksh277
committed
Apply recent changes
1 parent f9f079c commit 85c0e24

File tree

6 files changed

+96
-101
lines changed

6 files changed

+96
-101
lines changed

src/app/stationery-goods/page.tsx

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -136,54 +136,6 @@ export default function StationeryGoodsPage() {
136136
<StripBannerProvider>
137137
<div className="min-h-screen bg-slate-50 dark:bg-slate-900">
138138

139-
{/* Hero Section */}
140-
<section className="relative overflow-hidden bg-gradient-to-br from-indigo-50 via-white to-cyan-50 dark:from-slate-800 dark:via-slate-900 dark:to-slate-800">
141-
<div className="container mx-auto px-4 py-16 md:py-24">
142-
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
143-
<div className="text-center lg:text-left">
144-
<h1 className="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 dark:text-white mb-6">
145-
{copy.title}
146-
</h1>
147-
<p className="text-xl md:text-2xl text-gray-600 dark:text-gray-300 mb-4">
148-
{copy.subtitle}
149-
</p>
150-
<p className="text-lg text-gray-500 dark:text-gray-400 mb-8">
151-
{copy.description}
152-
</p>
153-
154-
{/* USP Cards */}
155-
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
156-
{copy.usp.map((item, index) => (
157-
<div key={index} className="bg-white/80 dark:bg-slate-800/80 p-4 rounded-lg shadow-sm">
158-
<div className="text-2xl mb-2">{item.icon}</div>
159-
<h3 className="font-semibold text-gray-900 dark:text-white mb-1">{item.title}</h3>
160-
<p className="text-sm text-gray-600 dark:text-gray-400">{item.desc}</p>
161-
</div>
162-
))}
163-
</div>
164-
165-
{/* CTA Buttons */}
166-
<div className="flex flex-col sm:flex-row gap-4">
167-
<Button size="lg" className="bg-indigo-600 hover:bg-indigo-700">
168-
{copy.cta.primary}
169-
</Button>
170-
</div>
171-
</div>
172-
173-
<div className="relative">
174-
<div className="relative h-[400px] md:h-[500px] w-full">
175-
<Image
176-
src="/components/img/placeholder-product.jpg"
177-
alt="문구/오피스 굿즈 모음"
178-
fill
179-
className="object-contain"
180-
priority
181-
/>
182-
</div>
183-
</div>
184-
</div>
185-
</div>
186-
</section>
187139

188140
{/* Products Grid */}
189141
<section className="py-16 md:py-24">

src/components/WeeklyRankingCards.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default function WeeklyRankingCards({
124124
<div className="flex justify-between items-center">
125125
<h2 className="text-xl font-bold">주간 랭킹 - {getSellerTypeLabel(sellerType)}</h2>
126126
</div>
127-
<div className="md:grid md:grid-cols-[repeat(auto-fit,minmax(350px,1fr))] md:gap-4 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-4 md:px-0">
127+
<div className="md:grid md:grid-cols-[repeat(auto-fit,minmax(420px,1fr))] md:gap-2 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-4 md:px-0">
128128
{Array.from({ length: limit }).map((_, index) => (
129129
<div key={index} className="bg-white rounded-xl border p-3 md:p-4 animate-pulse w-[calc(100vw-3rem)] max-w-[300px] md:w-auto flex-shrink-0 md:flex-shrink">
130130
<div className="w-full h-64 md:h-80 bg-gray-300 rounded-lg mb-3 md:mb-4"></div>
@@ -172,7 +172,7 @@ export default function WeeklyRankingCards({
172172
</div>
173173

174174
{/* Mobile: Horizontal scroll, Desktop: Flex */}
175-
<div className="md:grid md:grid-cols-[repeat(auto-fit,minmax(350px,1fr))] md:gap-4 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-4 md:px-0">
175+
<div className="md:grid md:grid-cols-[repeat(auto-fit,minmax(420px,1fr))] md:gap-2 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-4 md:px-0">
176176
{rankings.map((product, index) => (
177177
<Link
178178
key={product.product_id}

src/components/header.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export function Header() {
2020
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
2121
const [activeCategory, setActiveCategory] = useState<string>('all');
2222
const [scrolled, setScrolled] = useState(false);
23+
const [searchQuery, setSearchQuery] = useState('');
2324
useEffect(() => {
2425
const onScroll = () => setScrolled(window.scrollY > 4);
2526
onScroll();
@@ -66,6 +67,19 @@ export function Header() {
6667
const subNavToShow = mainNavItems.find(item => item.id === activeSubNav)?.subnav;
6768
const closeMobileMenu = () => setIsMobileMenuOpen(false);
6869

70+
const handleSearch = (e?: React.FormEvent) => {
71+
e?.preventDefault();
72+
if (searchQuery.trim()) {
73+
router.push(`/search?q=${encodeURIComponent(searchQuery.trim())}`);
74+
}
75+
};
76+
77+
const handleSearchKeyPress = (e: React.KeyboardEvent) => {
78+
if (e.key === 'Enter') {
79+
handleSearch();
80+
}
81+
};
82+
6983

7084

7185
return (
@@ -194,13 +208,16 @@ export function Header() {
194208
</ul>
195209

196210
<div className="flex-shrink-0 w-[600px] max-w-[600px] mr-8">
197-
<div className="relative">
211+
<form onSubmit={handleSearch} className="relative">
198212
<Search className="absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground" />
199213
<Input
214+
value={searchQuery}
215+
onChange={(e) => setSearchQuery(e.target.value)}
216+
onKeyPress={handleSearchKeyPress}
200217
placeholder="2,000여개의 커스텀 상품을 쉽게 찾아 보세요."
201218
className="w-full rounded-full border-2 border-primary bg-background py-2 pl-10 pr-4 text-base"
202219
/>
203-
</div>
220+
</form>
204221
</div>
205222
</div>
206223
</div>

src/components/shared/CategoryPageTemplate.tsx

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -65,56 +65,56 @@ export default function CategoryPageTemplate({
6565
}: CategoryPageTemplateProps) {
6666
const isServicePage = mapping.type === 'service';
6767
const isBoardPage = mapping.type === 'board';
68+
const displayProducts = mapping.sampleProducts || products;
6869

6970
return (
7071
<StripBannerProvider>
7172
<div className="min-h-screen bg-slate-50 dark:bg-slate-900">
72-
73-
{/* Products Grid - Only for category pages */}
74-
{!isServicePage && !isBoardPage && (
75-
<section className="py-8">
76-
<div className="max-w-7xl mx-auto px-6">
77-
78-
<div className="grid grid-cols-2 gap-x-6 gap-y-10 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-4">
79-
{products.slice(0, 8).map((product) => (
80-
<Card key={product.id} className="group overflow-hidden hover:shadow-lg transition-shadow">
81-
<div className="relative aspect-square overflow-hidden bg-gray-100">
82-
<Image
83-
src={product.image}
84-
alt={product.name}
85-
fill
86-
className="object-cover group-hover:scale-105 transition-transform duration-300"
87-
sizes="(max-width: 640px) 50vw, (max-width: 1024px) 25vw, 20vw"
88-
/>
73+
74+
{/* Products Grid */}
75+
<section className="py-16">
76+
<div className="max-w-7xl mx-auto px-6">
77+
<h2 className="text-3xl font-bold text-center text-gray-900 dark:text-white mb-12">
78+
{mapping.categoryKo}
79+
</h2>
80+
<div className="grid grid-cols-2 gap-x-6 gap-y-10 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-4">
81+
{displayProducts.slice(0, 8).map((product) => (
82+
<Card key={product.id} className="group overflow-hidden hover:shadow-lg transition-shadow">
83+
<div className="relative aspect-square overflow-hidden bg-gray-100">
84+
<Image
85+
src={product.image}
86+
alt={product.name}
87+
fill
88+
className="object-cover group-hover:scale-105 transition-transform duration-300"
89+
sizes="(max-width: 640px) 50vw, (max-width: 1024px) 25vw, 20vw"
90+
/>
91+
</div>
92+
<CardContent className="p-5">
93+
<h3 className="text-base font-semibold text-gray-900 dark:text-white mb-3 line-clamp-2">
94+
{product.name}
95+
</h3>
96+
<div className="flex flex-wrap gap-1 mb-3">
97+
{product.tags.map((tag) => (
98+
<Badge key={tag} variant="secondary" className="text-xs">
99+
{tag}
100+
</Badge>
101+
))}
102+
</div>
103+
<div className="flex items-center justify-between">
104+
<span className="text-lg font-bold text-blue-600">
105+
{product.price.toLocaleString()}원~
106+
</span>
107+
<Link href={`/product/${product.id}`} className="text-sm text-gray-500 hover:text-gray-700 flex items-center">
108+
자세히 보기
109+
<ChevronRight className="w-4 h-4 ml-1" />
110+
</Link>
89111
</div>
90-
<CardContent className="p-5">
91-
<h3 className="text-base font-semibold text-gray-900 dark:text-white mb-3 line-clamp-2">
92-
{product.name}
93-
</h3>
94-
<div className="flex flex-wrap gap-1 mb-3">
95-
{product.tags.map((tag) => (
96-
<Badge key={tag} variant="secondary" className="text-xs">
97-
{tag}
98-
</Badge>
99-
))}
100-
</div>
101-
<div className="flex items-center justify-between">
102-
<span className="text-lg font-bold text-blue-600">
103-
{product.price.toLocaleString()}원~
104-
</span>
105-
<Link href={`/product/${product.id}`} className="text-sm text-gray-500 hover:text-gray-700 flex items-center">
106-
자세히 보기
107-
<ChevronRight className="w-4 h-4 ml-1" />
108-
</Link>
109-
</div>
110-
</CardContent>
111-
</Card>
112-
))}
113-
</div>
112+
</CardContent>
113+
</Card>
114+
))}
114115
</div>
115-
</section>
116-
)}
117-
116+
</div>
117+
</section>
118118

119119
</div>
120120
</StripBannerProvider>

src/lib/category-mappings.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,44 @@ export const categoryMappings: Record<string, CategoryMapping> = {
6060
'ip-goods-dev': {
6161
slug: 'ip-goods-dev',
6262
categoryKo: 'IP굿즈 상품개발',
63-
type: 'service',
63+
type: 'category',
6464
subtitle: '지적재산권 기반 굿즈 개발',
6565
description: '캐릭터, 브랜드 IP를 활용한 라이선스 굿즈 개발 서비스를 제공합니다.',
6666
usp: [
6767
{ icon: '©️', title: 'IP 라이선스', desc: '정식 라이선스 굿즈 개발' },
6868
{ icon: '🎭', title: '캐릭터 굿즈', desc: '인기 캐릭터 기반 제품' },
6969
{ icon: '💼', title: '상품기획', desc: '전문 기획팀의 상품 개발' }
7070
],
71-
heroImagePath: '/components/img/placeholder-product.jpg',
71+
heroImagePath: '/components/img/placeholder-product.jpg',
72+
sampleProducts: [
73+
{ id: 'ip-1', name: '캐릭터 아크릴 스탠드', tags: ['아크릴', 'IP'], price: 15000, image: '/components/img/placeholder-product.jpg' },
74+
{ id: 'ip-2', name: '브랜드 굿즈 세트', tags: ['세트', '브랜드'], price: 35000, image: '/components/img/placeholder-product.jpg' },
75+
{ id: 'ip-3', name: 'IP 라이선스 티셔츠', tags: ['의류', 'IP'], price: 25000, image: '/components/img/placeholder-product.jpg' },
76+
{ id: 'ip-4', name: '캐릭터 키링', tags: ['키링', '캐릭터'], price: 8000, image: '/components/img/placeholder-product.jpg' },
77+
{ id: 'ip-5', name: 'IP 굿즈 머그컵', tags: ['머그컵', 'IP'], price: 12000, image: '/components/img/placeholder-product.jpg' },
78+
{ id: 'ip-6', name: '브랜드 노트북', tags: ['문구', '브랜드'], price: 18000, image: '/components/img/placeholder-product.jpg' }
79+
]
7280
},
7381
'brand-request': {
7482
slug: 'brand-request',
75-
categoryKo: '브랜드의뢰',
76-
type: 'service',
83+
categoryKo: '기업/웰컴 키트',
84+
type: 'category',
7785
subtitle: '브랜드 맞춤 굿즈 제작 의뢰',
7886
description: '브랜드 아이덴티티에 맞는 전문적인 굿즈 제작을 의뢰하세요.',
7987
usp: [
8088
{ icon: '🏆', title: '브랜드 맞춤', desc: 'BI에 최적화된 굿즈 제작' },
8189
{ icon: '👥', title: '전담팀', desc: '브랜드 전담 프로젝트 팀' },
8290
{ icon: '📋', title: '체계적 관리', desc: '프로젝트 전과정 관리' }
8391
],
84-
heroImagePath: '/components/img/placeholder-product.jpg',
92+
heroImagePath: '/components/img/placeholder-product.jpg',
93+
sampleProducts: [
94+
{ id: 'brand-1', name: '기업 웰컴 키트 세트', tags: ['세트', '기업'], price: 45000, image: '/components/img/placeholder-product.jpg' },
95+
{ id: 'brand-2', name: '브랜드 텀블러', tags: ['텀블러', '브랜드'], price: 18000, image: '/components/img/placeholder-product.jpg' },
96+
{ id: 'brand-3', name: '회사 기념품 세트', tags: ['기념품', '세트'], price: 28000, image: '/components/img/placeholder-product.jpg' },
97+
{ id: 'brand-4', name: '브랜드 에코백', tags: ['에코백', '브랜드'], price: 15000, image: '/components/img/placeholder-product.jpg' },
98+
{ id: 'brand-5', name: '기업 문구 세트', tags: ['문구', '기업'], price: 22000, image: '/components/img/placeholder-product.jpg' },
99+
{ id: 'brand-6', name: '웰컴 키트 박스', tags: ['박스', '웰컴'], price: 35000, image: '/components/img/placeholder-product.jpg' }
100+
]
85101
},
86102
'reviews': {
87103
slug: 'reviews',

src/lib/data.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ const MOCK_PRODUCTS_RAW = [
4848
{ id: '54', category_ko: '아크릴', subCategory_ko: 'holder', name_ko: '포카홀더 키링', price: 2800, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },
4949
{ id: '55', category_ko: '아크릴', subCategory_ko: 'holder', name_ko: '홀더 부착형 증사홀더', price: 2000, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },
5050
{ id: '56', category_ko: '아크릴', subCategory_ko: 'holder', name_ko: '포토액자 하프미러 아크릴', price: 2300, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },
51+
52+
// Weekly ranking products (ID 1001~1008)
53+
{ id: '1001', category_ko: '아크릴', subCategory_ko: 'keyring', name_ko: '커스텀 아크릴 키링', price: 8500, reviews: 12, likes: 45, image: 'https://placehold.co/600x600/FFB6C1/333?text=🔑' },
54+
{ id: '1002', category_ko: '아크릴', subCategory_ko: 'stand', name_ko: '개인맞춤 아크릴 스탠드', price: 12000, reviews: 8, likes: 38, image: 'https://placehold.co/600x600/87CEEB/333?text=🖼️' },
55+
{ id: '1003', category_ko: '핸드폰케이스', subCategory_ko: 'case', name_ko: '나만의 휴대폰 케이스', price: 15000, reviews: 15, likes: 32, image: 'https://placehold.co/600x600/98FB98/333?text=📱' },
56+
{ id: '1004', category_ko: '아크릴', subCategory_ko: 'coaster', name_ko: '커스텀 코스터', price: 6500, reviews: 5, likes: 28, image: 'https://placehold.co/600x600/DDA0DD/333?text=☕' },
57+
{ id: '1005', category_ko: '배지', subCategory_ko: 'badge', name_ko: '개인맞춤 배지', price: 4500, reviews: 9, likes: 24, image: 'https://placehold.co/600x600/FFE4B5/333?text=🏷️' },
58+
{ id: '1006', category_ko: '아크릴', subCategory_ko: 'smarttok', name_ko: '맞춤형 스마트톡', price: 9000, reviews: 6, likes: 21, image: 'https://placehold.co/600x600/F0E68C/333?text=📲' },
59+
{ id: '1007', category_ko: '파우치', subCategory_ko: 'pouch', name_ko: '개인 굿즈 파우치', price: 11500, reviews: 7, likes: 18, image: 'https://placehold.co/600x600/F5DEB3/333?text=👛' },
60+
{ id: '1008', category_ko: '문구', subCategory_ko: 'stationery', name_ko: '맞춤 문구용품', price: 7500, reviews: 4, likes: 15, image: 'https://placehold.co/600x600/E6E6FA/333?text=✏️' },
5161
{ id: '57', category_ko: '아크릴', subCategory_ko: 'holder', name_ko: '포카홀더 고정형 템플릿', price: 3000, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },
5262
{ id: '58', category_ko: '아크릴', subCategory_ko: 'holder', name_ko: '포토액자 투명아크릴', price: 1500, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },
5363
{ id: '61', category_ko: '아크릴', subCategory_ko: 'shaker', name_ko: 'DIY 오픈 스냅 리벳 키링', price: 2900, reviews: 0, likes: 0, image: '/images/sample-banner1.svg' },

0 commit comments

Comments
 (0)