layout.module.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. // ── 헤더 (Layout + Studio 공용) ──
  2. .header {
  3. background: var(--bg-head);
  4. border-bottom: 1px solid var(--border-default);
  5. // 1줄: 로고 + PC네비 + 우측 아이콘
  6. .headerRow1 {
  7. display: flex;
  8. align-items: center;
  9. height: 56px;
  10. padding: 0 16px;
  11. }
  12. // 햄버거 메뉴 (모바일 전용)
  13. .hamburger {
  14. display: none;
  15. align-items: center;
  16. justify-content: center;
  17. width: 36px;
  18. height: 36px;
  19. border: none;
  20. background: transparent;
  21. cursor: pointer;
  22. font-size: 1.25rem;
  23. color: var(--text-primary);
  24. flex-shrink: 0;
  25. &:hover {
  26. color: var(--fg-default);
  27. }
  28. @media (max-width: 1125px) {
  29. display: flex;
  30. }
  31. }
  32. // 로고
  33. .logo {
  34. flex-basis: 137px;
  35. font-size: inherit;
  36. padding-right: 20px;
  37. flex-shrink: 0;
  38. }
  39. // PC 네비게이션 (모바일에서 숨김)
  40. .pcNav {
  41. display: flex;
  42. flex-grow: 1;
  43. align-items: center;
  44. font-weight: 500;
  45. ul {
  46. display: flex;
  47. gap: 1rem;
  48. li {
  49. a, button {
  50. color: var(--text-head);
  51. &:hover {
  52. font-weight: 700;
  53. text-decoration: underline;
  54. }
  55. }
  56. }
  57. }
  58. @media (max-width: 1125px) {
  59. display: none;
  60. }
  61. }
  62. // 우측 아이콘 영역
  63. .headerActions {
  64. display: flex;
  65. align-items: center;
  66. gap: 8px;
  67. margin-left: auto;
  68. }
  69. .chargeBtn {
  70. display: inline-flex;
  71. align-items: center;
  72. justify-content: center;
  73. padding: 6px;
  74. border-radius: 16px;
  75. background: transparent;
  76. font-size: 0.75rem;
  77. font-weight: 700;
  78. cursor: pointer;
  79. color: var(--text-head);
  80. white-space: nowrap;
  81. &:hover {
  82. outline: 1px solid var(--outline-default);
  83. background: var(--bg-icon);
  84. }
  85. }
  86. .authLink {
  87. font-size: 0.875rem;
  88. font-weight: 500;
  89. &:hover {
  90. text-decoration: underline;
  91. }
  92. }
  93. // 2줄: 모바일 가로 스크롤 탭
  94. .headerRow2 {
  95. display: none;
  96. @media (max-width: 1125px) {
  97. display: block;
  98. border-top: 1px solid var(--border-default);
  99. }
  100. }
  101. .mobileTabScroll {
  102. display: flex;
  103. overflow-x: auto;
  104. -webkit-overflow-scrolling: touch;
  105. scrollbar-width: none;
  106. cursor: grab;
  107. padding: 0 8px;
  108. gap: 4px;
  109. &::-webkit-scrollbar {
  110. display: none;
  111. }
  112. }
  113. .mobileTab {
  114. display: inline-flex;
  115. align-items: center;
  116. justify-content: center;
  117. padding: 8px 12px;
  118. font-size: 0.8125rem;
  119. font-weight: 500;
  120. white-space: nowrap;
  121. border-radius: 8px;
  122. color: var(--text-muted);
  123. text-decoration: none;
  124. flex-shrink: 0;
  125. transition: background 0.15s, color 0.15s;
  126. &:hover {
  127. background: var(--bg-subtle-hover);
  128. }
  129. }
  130. .mobileTabActive {
  131. background: var(--fg-default);
  132. color: var(--bg-page);
  133. }
  134. // 모바일 헤더 패딩 조정
  135. @media (max-width: 1125px) {
  136. .headerRow1 {
  137. padding: 0 8px;
  138. }
  139. .logo {
  140. flex-basis: auto;
  141. padding-right: 0;
  142. }
  143. }
  144. }
  145. // ── 메인 레이아웃 컨테이너 ──
  146. .container {
  147. display: grid;
  148. height: 100vh;
  149. grid-template-rows: auto 1fr auto;
  150. // PC: 좌측 채널 사이드바 + 메인 (2열)
  151. @media (min-width: 1124px) {
  152. grid-template-areas: "header header" "aside main" "aside footer";
  153. grid-template-columns: 220px 1fr;
  154. }
  155. // 모바일/태블릿
  156. @media (max-width: 1125px) {
  157. grid-template-areas: "header" "main" "footer";
  158. grid-template-columns: 1fr;
  159. }
  160. > .header {
  161. grid-area: header;
  162. }
  163. // 좌측 사이드바
  164. > .aside {
  165. grid-area: aside;
  166. overflow-y: auto;
  167. transition: transform 0.3s ease;
  168. background: var(--bg-page);
  169. @media (min-width: 1124px) {
  170. position: relative;
  171. transform: translateX(0);
  172. border-right: 1px solid var(--border-default);
  173. }
  174. // 모바일: 왼쪽에서 슬라이드
  175. @media (max-width: 1125px) {
  176. position: fixed;
  177. top: 56px;
  178. left: 0;
  179. width: min(320px, 85vw);
  180. height: calc(100vh - 56px);
  181. z-index: 1000;
  182. transform: translateX(-100%);
  183. border-right: 1px solid var(--border-default);
  184. box-shadow: none;
  185. }
  186. }
  187. // 사이드바 열림 상태
  188. &.sidebarOpen {
  189. > .aside {
  190. @media (max-width: 1125px) {
  191. transform: translateX(0);
  192. box-shadow: 4px 0 12px var(--shadow-color);
  193. }
  194. }
  195. > .overlay {
  196. @media (max-width: 1125px) {
  197. display: block;
  198. }
  199. }
  200. }
  201. // 메인 내용
  202. > .main {
  203. position: relative;
  204. grid-area: main;
  205. overflow-y: auto;
  206. border-bottom: 1px solid var(--border-default);
  207. }
  208. // 오버레이 (모바일)
  209. > .overlay {
  210. display: none;
  211. @media (max-width: 1125px) {
  212. position: fixed;
  213. top: 56px;
  214. left: 0;
  215. right: 0;
  216. bottom: 0;
  217. background: var(--overlay-color);
  218. z-index: 999;
  219. }
  220. }
  221. // 하단 내용
  222. > .footer {
  223. grid-area: footer;
  224. font-size: 0.688rem;
  225. padding: 4px;
  226. @media (max-width: 576px) {
  227. > ol {
  228. padding: 0 0 2px 0;
  229. }
  230. }
  231. ol {
  232. display: flex;
  233. flex-flow: row;
  234. justify-content: space-between;
  235. li {
  236. &:not(:last-of-type) {
  237. padding: 0 5px;
  238. &:hover {
  239. text-decoration: underline;
  240. font-weight: 600;
  241. }
  242. }
  243. &:last-of-type {
  244. flex-grow: 0;
  245. margin-left: auto;
  246. }
  247. }
  248. }
  249. }
  250. }