diff --git a/src/app/components/HeroBanner.tsx b/src/app/components/HeroBanner.tsx index acfc9a8..a717106 100644 --- a/src/app/components/HeroBanner.tsx +++ b/src/app/components/HeroBanner.tsx @@ -78,7 +78,7 @@ export function HeroBanner({ subItems, activeSubId }: { subItems?: SubItem[]; ac
{/* 분리된 하단 블랙 바: 높이 58px, 중앙 서브카테고리 (스켈레톤 상태에서도 동일 레이아웃 유지) */} -
+
{Array.isArray(subItems) && subItems.length > 0 && (
{subItems.map((s) => ( @@ -151,7 +151,7 @@ export function HeroBanner({ subItems, activeSubId }: { subItems?: SubItem[]; ac
{/* 분리된 하단 블랙 바: 높이 58px, 중앙 서브카테고리 */} -
+
{Array.isArray(subItems) && subItems.length > 0 && (
{subItems.map((s) => ( diff --git a/src/app/components/SinglePageLogo.tsx b/src/app/components/SinglePageLogo.tsx index cd30733..55e34e7 100644 --- a/src/app/components/SinglePageLogo.tsx +++ b/src/app/components/SinglePageLogo.tsx @@ -1,22 +1,20 @@ "use client"; import React from "react"; -export function SinglePageLogo({ width = 120, height = 28, className }: { width?: number; height?: number; className?: string }) { - // 원본 SVG는 512x512 정사각형입니다. 주어진 width/height 중 높이를 기준으로 정사각형 로고를 맞추고, - // 가로 폭은 전달받은 width 박스 안에서 가운데 정렬합니다. - const squareSize = height; // 로고 자체는 정사각형 +export function SinglePageLogo({ width = 132, height = 32, className }: { width?: number; height?: number; className?: string }) { return (
- - - - - - + + + + + + + - - + + diff --git a/src/app/page.tsx b/src/app/page.tsx index 45b7b4a..48468b0 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -67,6 +67,72 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s }) : []; const isTextMain = board.mainTypeKey === "main_text"; + const isSpecialRank = board.mainTypeKey === "main_special_rank"; + + // 특수 랭킹 타입 처리 + if (isSpecialRank) { + const topUsers = await prisma.user.findMany({ + select: { userId: true, nickname: true, points: true, profileImage: true }, + where: { status: "active" }, + orderBy: { points: "desc" }, + take: 3, + }); + + return ( +
+
+
+
+ {topUsers.map((user, idx) => { + const rank = idx + 1; + return ( +
+
+ {user.nickname +
+
+ 뱃지 +
+
+
+
+
+
+
+ {/* 순위 배지 아이콘 자리 - 피그마 디자인에 맞게 이미지로 대체 필요 */} +
+ +
+
+
+ {rank}위 +
+
+
+ {user.nickname || "익명"} +
+
+
+ + + + {user.points.toLocaleString()} +
+
+
+ ); + })} +
+
+
+
+ ); + } + if (!isTextMain) { return (
@@ -105,7 +171,7 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s where: { boardId: board.id, status: "published" }, select: { id: true, title: true, createdAt: true, stat: { select: { recommendCount: true } } }, orderBy: { createdAt: "desc" }, - take: 8, + take: 7, }); return ( @@ -195,9 +261,9 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s {/* 1행: 프로필 + 선택된 보드 2개 (최대 2개) */} {(firstTwo.length > 0) && ( -
-
-
+
+
+
@@ -263,7 +329,7 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s
{(await Promise.all(firstTwo.map((b) => renderBoardPanel(b)))).map((panel, idx) => ( -
+
{panel}
))} @@ -277,7 +343,7 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ s {Array.from({ length: Math.ceil(restBoards.length / 2) }).map(async (_, i) => { const pair = restBoards.slice(i * 2, i * 2 + 2); return ( -
+
{(await Promise.all(pair.map((b) => renderBoardPanel(b)))).map((panel, idx) => (
diff --git a/src/fonts/Jalnan2TTF.ttf b/src/fonts/Jalnan2TTF.ttf new file mode 100644 index 0000000..8357acc Binary files /dev/null and b/src/fonts/Jalnan2TTF.ttf differ