skin 및 레이아웃 작업
This commit is contained in:
@@ -36,6 +36,18 @@ const appConfig = getConfig();
|
||||
const userId = getCookie(appConfig.AUTH_USER_ID ?? "");
|
||||
const isLoggedIn = !!userId;
|
||||
|
||||
/** 1뎁스 메뉴 아이콘 영역: 아이콘 글리프 폭과 무관하게 동일한 너비로 고정해 아이콘·메뉴명 좌측 라인을 맞춤 */
|
||||
const TOP_MENU_ICON_CLASS = "inline-flex w-[2rem] shrink-0 items-center justify-center";
|
||||
|
||||
/**
|
||||
* 메뉴 롤오버: 하위 메뉴 유무와 관계없이 동일하게 테마 주 색상(--primary) 계열로 표시
|
||||
* - white: 연한 파랑 배경 + 파랑 글자 / red: 연한 빨강 + 빨강 / black: 어두운 배경 위 주 색상
|
||||
* - blue·green 은 sidebar.css 의 테마 전용 규칙(!important)이 우선 적용됨
|
||||
*/
|
||||
const MENU_HOVER_CLASS = "group/menu-button hover:bg-primary-transparent";
|
||||
/** 롤오버 시 아이콘·메뉴명 색상 (버튼 hover 를 group 으로 받아 자식 요소에 적용) */
|
||||
const MENU_HOVER_TEXT_CLASS = "group-hover/menu-button:text-primary";
|
||||
|
||||
export function LNB({
|
||||
viewOnly,
|
||||
currentPath,
|
||||
@@ -251,7 +263,9 @@ export function LNB({
|
||||
onClick: handleClick,
|
||||
};
|
||||
const menuClassName = cn(
|
||||
"h-auto cursor-pointer py-4 text-[1.4rem] text-label transition-colors hover:bg-accent focus-visible:ring-inset",
|
||||
"h-auto cursor-pointer py-4 text-[1.4rem] text-label transition-colors focus-visible:ring-inset",
|
||||
MENU_HOVER_CLASS,
|
||||
!isMatched && "hover:text-primary",
|
||||
isMatched && "bg-accent !text-primary",
|
||||
!isSidebarOpen && "justify-center",
|
||||
);
|
||||
@@ -285,17 +299,16 @@ export function LNB({
|
||||
<i
|
||||
className={cn(
|
||||
"diveicon",
|
||||
TOP_MENU_ICON_CLASS,
|
||||
`di-${item.iconNm}`,
|
||||
isMatched ? "text-primary" : "text-label",
|
||||
isMatched ? "text-primary" : cn("text-label", MENU_HOVER_TEXT_CLASS),
|
||||
!hideLabel && "ml-2",
|
||||
)}
|
||||
/>
|
||||
<span
|
||||
className={cn(
|
||||
"whitespace-nowrap",
|
||||
isMatched
|
||||
? "text-primary"
|
||||
: "text-label group-hover/menu-button:text-foreground",
|
||||
isMatched ? "text-primary" : cn("text-label", MENU_HOVER_TEXT_CLASS),
|
||||
hideLabel && "hidden",
|
||||
)}
|
||||
>
|
||||
@@ -335,6 +348,7 @@ export function LNB({
|
||||
<SidebarMenuButton
|
||||
className={cn(
|
||||
"flex h-auto items-center py-4 pr-2 text-[1.4rem] focus-visible:ring-inset",
|
||||
MENU_HOVER_CLASS,
|
||||
isOpen && "bg-transparent",
|
||||
!isSidebarOpen && "justify-center",
|
||||
)}
|
||||
@@ -345,13 +359,16 @@ export function LNB({
|
||||
<i
|
||||
className={cn(
|
||||
"diveicon text-label",
|
||||
MENU_HOVER_TEXT_CLASS,
|
||||
TOP_MENU_ICON_CLASS,
|
||||
`di-${item.iconNm}`,
|
||||
!hideLabel && "ml-2",
|
||||
)}
|
||||
/>
|
||||
<span
|
||||
className={cn(
|
||||
"whitespace-nowrap text-label group-hover/menu-button:text-foreground",
|
||||
"whitespace-nowrap text-label",
|
||||
MENU_HOVER_TEXT_CLASS,
|
||||
hideLabel && "hidden",
|
||||
)}
|
||||
>
|
||||
@@ -364,6 +381,7 @@ export function LNB({
|
||||
<ChevronRight
|
||||
className={cn(
|
||||
"ml-auto !size-6 text-label transition-transform",
|
||||
MENU_HOVER_TEXT_CLASS,
|
||||
isOpen && "rotate-90",
|
||||
hideLabel && "hidden",
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user