260205_03_ENH: layout color gray + black으로 변경, excel버튼 아이콘으로 변경

This commit is contained in:
2026-02-05 12:22:18 +09:00
parent 5d3de68b05
commit 8de707f8d1
5 changed files with 82 additions and 36 deletions

View File

@@ -11,7 +11,7 @@ import {
type GroupedStackBarData,
} from "@/components/lge-dashboard";
import { useLayoutFilter } from "@/components/layout/LayoutFilterContext";
import { apiBrandByYearCategories, apiTrendCategories } from "@/config/sample.data";
import {apiBrandByYearCategories, apiOwnShareOfTotalPenetration, apiTrendCategories} from "@/config/sample.data";
import { Button } from "@/components/ui/button";
import {
BRAND_LIST,
@@ -22,7 +22,7 @@ import {
GRID_X_NOT_PADDING, PRODUCT_KEY_MAP, LAST_YEAR,
} from "@/const/lgConst";
import { formatRowLabel } from "@/lib/lg-dashboard";
import {buildHeader_ProductKeyMap, exportDashboardExcel} from "@/lib/lg-export-excel";
import {buildHeader_ProductKeyMap, exportDashboardExcel, Section} from "@/lib/lg-export-excel";
const PenetrationPage = () => {
const { filterValue, registerExcelExporter } = useLayoutFilter();
@@ -63,8 +63,7 @@ const PenetrationPage = () => {
BRAND_LIST.forEach((brand, bi) => {
PRODUCT_KEYS.forEach((k, ci) => {
const row = rowMap.get(`${year}__${brand}`);
const v = (row as any)?.[k];
values[yi][bi][ci] = typeof v === "number" ? v : 0;
values[yi][bi][ci] = (row as any)?.[k];
});
});
});
@@ -75,13 +74,24 @@ const PenetrationPage = () => {
useEffect(() => {
registerExcelExporter(async () => {
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
type AnyRow = Record<string, any>;
const sections: Section<AnyRow>[] = [
{ title: "전체 보급률", header: excelHeader, rows: apiTrendCategories, rowGap: 1 },
...YEARS.map((year) => (
{
title: `브랜드 별 점유율_${year}년`,
header: excelHeader,
rows: apiBrandByYearCategories.filter((row) => row.year === year) as AnyRow[],
rowGap: 1,
}
))
];
await exportDashboardExcel({
fileName: `20${LAST_YEAR}년도 가전 보급률 Dashboard(보급률).xlsx`,
sheetName: "전체 보급률",
sections: [
{ title: "전체 보급률", header: excelHeader, rows: apiTrendCategories, rowGap: 1 },
],
sections: sections,
});
});
return () => registerExcelExporter(null);

View File

@@ -89,7 +89,7 @@ const LoginPage = () => {
};
return (
<div className="min-h-screen flex items-center justify-center p-4 bg-lg-login">
<div className="min-h-screen flex items-center justify-center p-4 bg-lg-login-body">
<Card className="w-full max-w-md shadow-xl">
<CardHeader className="space-y-4">
<div className="flex justify-center">

View File

@@ -309,6 +309,8 @@
.border-border { border-color: var(--border); }
/* LG gray scale (Tailwind gray override 의도 유지) */
.bg-black { background-color: #111111 !important; }
.bg-gray-900 { background-color: hsl(var(--lg-gray-900)) !important; }
.bg-gray-800 { background-color: hsl(var(--lg-gray-800)) !important; }
.bg-gray-700 { background-color: hsl(var(--lg-gray-700)) !important; }
@@ -391,23 +393,57 @@
.placeholder-content-text-3xl::placeholder { font-size: calc(var(--content-font-size) * 1.875); }
.placeholder-content-text-4xl::placeholder { font-size: calc(var(--content-font-size) * 2.25); }
.bg-lg-login {
.bg-lg-login-body {
background-color: hsl(var(--background));
background-image: linear-gradient(
135deg,
hsl(var(--lg-red-600) / 0.16) 0%,
var(--background) 50%,
hsl(var(--lg-pink-600) / 0.14) 100%
hsl(var(--lg-gray-900) / 0.5) 0%,
var(--background) 30%,
var(--background) 70%,
hsl(var(--lg-gray-900) / 0.5) 100%
);
}
.text-header-color { color: #FFFFFF; }
.text-header-primary {
color: #FFFFFF;
font-weight: 600;
position: relative;
padding-bottom: 4px;
}
.text-header-primary::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3px;
background: linear-gradient(90deg, #A50034 0%, #E6004C 100%);
border-radius: 2px 2px 0 0;
}
/* 비활성 메뉴 스타일 */
.text-header-secondary-hover {
color: #C0C0C0;
transition: all 0.3s ease;
cursor: pointer;
}
/* 호버 효과 */
.text-header-secondary-hover:hover {
color: rgba(255, 255, 255, 0.9) !important;
}
.bg-lg-main-body {
background-color: hsl(var(--background));
background-image: linear-gradient(
135deg,
hsl(var(--lg-red-500) / 0.12) 0%,
var(--background) 50%,
hsl(var(--lg-pink-500) / 0.10) 100%
hsl(var(--lg-gray-900) / 0.2) 0%,
var(--background) 30%,
var(--background) 70%,
hsl(var(--lg-gray-900) / 0.2) 100%
);
}
}

View File

@@ -2,18 +2,24 @@
import { Button } from "@/components/ui/button";
import { useLayoutFilter } from "./LayoutFilterContext";
import Image from "next/image";
const ExcelDownloadButton = () => {
const { requestExcelExport } = useLayoutFilter();
return (
<Button
variant="excel"
className="h-8 px-3 text-sm font-semibold content-text-sm"
onClick={requestExcelExport}
>
Excel 다운로드
</Button>
<div className={"mr-2 pb-1 cursor-pointer"}>
<Image
src="/icon-excel.png"
alt="excel export"
width={27}
height={27}
className="object-contain"
onClick={requestExcelExport}
priority
/>
</div>
);
};

View File

@@ -30,13 +30,13 @@ const Header = ({
}, [auth.user])
return (
<header className="bg-white border-b border-gray-200 sticky top-0 z-40">
<header className="bg-black border-b border-gray-200 sticky top-0 z-40">
<div className="flex items-center justify-between px-4 h-16">
<div className="flex items-center gap-4">
{/* 로고 */}
<div className="flex items-center gap-2 cursor-pointer w-30 h-15 justify-center">
<Image
src="/logo.png" // public/logo.png
src="/logo_transparent.png" // public/logo.png
alt="브랜드 로고"
width={200}
height={80}
@@ -56,32 +56,26 @@ const Header = ({
type="button"
onClick={() => onNavigate(m.path)}
className={cn(
"relative h-10 inline-flex items-center font-semibold transition-colors cursor-pointer",
"content-text-base bg-transparent px-1",
"relative h-8 inline-flex items-center font-bold transition-colors cursor-pointer",
"content-text-lg bg-transparent px-1",
active
? "text-primary"
: "text-secondary-hover"
? "text-header-primary"
: "text-header-secondary-hover"
)}
>
{m.label}
{/* 선택 표시(밑줄) */}
{active && (
<span className="absolute left-0 right-0 -bottom-[2px] h-[2px] bg-primary" />
)}
</button>
);
})}
</nav>
</div>
<div className="flex justify-between items-center">
<h1 className="font-bold content-text-2xl">{DASHBOARD_YEAR}년도 가전보급률 Dashboard</h1>
<h1 className="font-bold content-text-2xl text-header-color">{DASHBOARD_YEAR}년도 가전보급률 Dashboard</h1>
</div>
{/* 우측 컨트롤 */}
<div className="flex items-center gap-4">
<span className="text-sm text-gray-600 hidden sm:inline font-bold">{userInfo?.userName || ""}</span>
<span className="content-text-base text-header-color hidden sm:inline font-bold">{userInfo?.userName || ""}</span>
<Button
variant="ghost"
size="sm"
className="gap-2"
onClick={() => onNavigate("/logout")}