물 재이용 대민서비스 lnb 고정(본문 스크롤 시 lnb 고정되도록 수정)

This commit is contained in:
LGS
2026-02-26 13:47:14 +09:00
parent a85fb848f7
commit 9cd3ce9f63
2 changed files with 21 additions and 8 deletions
@@ -29,7 +29,15 @@ export default function Lnb({ title, items }: { title: string; items: LnbItem[]
const [openLabel, setOpenLabel] = useState<string | null>(defaultOpenLabel);
return (
<aside className="w-[260px] min-w-[260px] shrink-0">
<aside
className={[
"fixed left-0 top-[83px]", // ✅ 화면 고정 + TopNav 아래로
"w-[260px] min-w-[260px] shrink-0",
"h-[calc(100vh-83px)]", // ✅ 남은 높이만큼
"overflow-y-auto", // ✅ LNB 내부 스크롤
"bg-white z-50", // ✅ 겹침 방지
].join(" ")}
>
{/* 타이틀 */}
<div
className="h-[120px] flex items-center justify-center
+12 -7
View File
@@ -1,15 +1,20 @@
// apps/dm/app/(landing)/reuse/layout.tsx
"use client";
import "./reuse.module.css";
// import type { ReactNode } from "react";
import TopNav from "./_components/TopNav";
import { usePathname } from "next/navigation";
export default function ReuseLayout({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
const hasLnb = pathname !== "/reuse"; // 예: 메인만 제외
export default function ReuseLandingLayout({ children }: { children: React.ReactNode }) {
return (
<>
<div className="min-w-[1800px] overflow-x-auto">
<TopNav />
<div className="pt-[83px]">{children}</div> {/* TopNav 높이만큼 */}
</div>
</>
<div className="pt-[83px]">
{hasLnb && <TopNav />}
<main className={hasLnb ? "ml-[260px]" : ""}>{children}</main>
</div>
);
}