diff --git a/frontend/src/components/pc/admin/layout/Layout.jsx b/frontend/src/components/pc/admin/layout/Layout.jsx index 63059b5..fd64ef1 100644 --- a/frontend/src/components/pc/admin/layout/Layout.jsx +++ b/frontend/src/components/pc/admin/layout/Layout.jsx @@ -4,9 +4,14 @@ * 헤더 고정 + 본문 스크롤 구조 */ import { useLocation } from 'react-router-dom'; +import { OverlayScrollbarsComponent } from 'overlayscrollbars-react'; import { useAuthStore } from '@/stores'; import Header from './Header'; +const OS_OPTIONS = { + scrollbars: { theme: 'os-theme-fromis', autoHide: 'leave', autoHideDelay: 600 }, +}; + function AdminLayout({ user, children }) { const location = useLocation(); const { token } = useAuthStore(); @@ -22,9 +27,20 @@ function AdminLayout({ user, children }) { return (
-
- {children} -
+ {isSchedulePage ? ( +
+
{children}
+
+ ) : ( + +
{children}
+
+ )}
); } diff --git a/frontend/src/components/pc/public/layout/Layout.jsx b/frontend/src/components/pc/public/layout/Layout.jsx index f8d102d..d3d51fc 100644 --- a/frontend/src/components/pc/public/layout/Layout.jsx +++ b/frontend/src/components/pc/public/layout/Layout.jsx @@ -1,8 +1,14 @@ import { useLocation } from 'react-router-dom'; +import { OverlayScrollbarsComponent } from 'overlayscrollbars-react'; import Header from './Header'; import Footer from './Footer'; import '@/pc.css'; +// 페이지(main) 오버레이 스크롤바 옵션 — 화면을 밀지 않고 뷰포트 끝에 고정 +const OS_OPTIONS = { + scrollbars: { theme: 'os-theme-fromis', autoHide: 'leave', autoHideDelay: 600 }, +}; + /** * PC 레이아웃 컴포넌트 */ @@ -22,14 +28,26 @@ function Layout({ children }) { return (
-
-
{children}
- {!hideFooter &&
} -
+ {isSchedulePage ? ( + // 일정 페이지: 자체 내부 스크롤 (페이지 스크롤 없음) +
+
{children}
+
+ ) : ( + // 그 외: 오버레이 스크롤바. min-width는 콘텐츠에 둬서 1440 미만이면 + // 가로 스크롤이 생기고 세로 스크롤바는 뷰포트 끝에 항상 보임. + +
+
{children}
+ {!hideFooter &&
+
+ )}
); } diff --git a/frontend/src/index.css b/frontend/src/index.css index 8e58216..f1d82ba 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,7 +1,18 @@ +@import "overlayscrollbars/overlayscrollbars.css"; @tailwind base; @tailwind components; @tailwind utilities; +/* OverlayScrollbars 페이지(main) 스크롤바 테마 — primary green */ +.os-theme-fromis { + --os-handle-bg: rgba(84, 131, 96, 0.5); + --os-handle-bg-hover: rgba(84, 131, 96, 0.78); + --os-handle-bg-active: rgba(69, 110, 80, 0.9); + --os-size: 11px; + --os-padding-perpendicular: 2px; + --os-padding-axis: 2px; +} + /* 기본 스타일 */ body { background-color: #fafafa; diff --git a/frontend/src/pc.css b/frontend/src/pc.css index 3d217c9..f59fb31 100644 --- a/frontend/src/pc.css +++ b/frontend/src/pc.css @@ -7,8 +7,8 @@ body.is-pc { overflow: hidden; } -/* PC 최소 너비 설정 */ +/* PC: #root는 뷰포트 너비를 유지하고, 최소 너비(1440)는 스크롤 컨테이너 + 내부 콘텐츠에 적용 → 1440 미만이면 가로 스크롤 + 세로 스크롤바는 뷰포트 끝에 고정 */ body.is-pc #root { - min-width: 1440px; height: 100%; }