common.module.scss 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. .container {
  2. display: grid;
  3. height: 100vh;
  4. grid-template-rows: minmax(auto, 50px) 2fr auto;
  5. // PC (aside 없을 때 기본 2열)
  6. @media (min-width: 1124px) {
  7. grid-template-areas: "header header" "main chatAside" "footer chatAside";
  8. grid-template-columns: 1fr minmax(200px, 400px);
  9. }
  10. // PC (aside 있을 때 3열)
  11. @media (min-width: 1124px) {
  12. &:has(> .aside) {
  13. grid-template-areas: "header header header" "aside main chatAside" "aside footer chatAside";
  14. grid-template-columns: minmax(200px, 280px) 1fr minmax(200px, 400px);
  15. }
  16. }
  17. // 모바일/태블릿
  18. @media (max-width: 1125px) {
  19. grid-template-areas: "header" "main" "footer";
  20. grid-template-columns: 1fr;
  21. }
  22. // aside가 없을 때 햄버거 숨기기 (모바일 코인 목록 뷰)
  23. &:not(:has(> .aside)) {
  24. > .header .hamburger {
  25. @media (max-width: 1125px) {
  26. display: none !important;
  27. }
  28. }
  29. }
  30. > .header {
  31. grid-area: header;
  32. height: 56px;
  33. background: var(--bg-subtle);
  34. border-bottom: 1px solid var(--border-default);
  35. // 햄버거 메뉴 (모바일 전용)
  36. .hamburger {
  37. display: none;
  38. align-items: center;
  39. justify-content: center;
  40. width: 40px;
  41. height: 40px;
  42. border: none;
  43. background: transparent;
  44. cursor: pointer;
  45. font-size: 1.25rem;
  46. color: var(--text-primary);
  47. flex-shrink: 0;
  48. &:hover {
  49. color: #000;
  50. }
  51. @media (max-width: 1125px) {
  52. display: flex;
  53. position: absolute;
  54. left: 8px;
  55. }
  56. }
  57. // 로고
  58. .logo {
  59. flex-basis: 137px;
  60. font-size: inherit;
  61. padding-right: 20px;
  62. flex-shrink: 0;
  63. }
  64. // PC 네비게이션 (모바일에서 숨김)
  65. .pcNav {
  66. display: flex;
  67. flex-grow: 1;
  68. align-items: center;
  69. justify-content: space-between;
  70. font-weight: 500;
  71. ul {
  72. display: flex;
  73. gap: 1rem;
  74. li {
  75. a, button {
  76. &:hover {
  77. font-weight: 700;
  78. text-decoration: underline;
  79. }
  80. }
  81. }
  82. }
  83. @media (max-width: 1125px) {
  84. display: none;
  85. }
  86. }
  87. // 채팅 토글 버튼 (모바일 전용)
  88. .chatToggle {
  89. display: none;
  90. align-items: center;
  91. justify-content: center;
  92. width: 40px;
  93. height: 40px;
  94. border: none;
  95. background: transparent;
  96. cursor: pointer;
  97. font-size: 1.25rem;
  98. color: var(--text-primary);
  99. flex-shrink: 0;
  100. &:hover {
  101. color: #000;
  102. }
  103. @media (max-width: 1125px) {
  104. display: flex;
  105. position: absolute;
  106. right: 8px;
  107. }
  108. }
  109. .clock {
  110. background: #434343;
  111. color: #fff;
  112. padding: 5px;
  113. }
  114. // 모바일: 로고 가운데 정렬
  115. @media (max-width: 1125px) {
  116. position: relative;
  117. justify-content: center;
  118. }
  119. }
  120. // 좌측 사이드바 (코인 목록)
  121. > .aside {
  122. grid-area: aside;
  123. overflow-y: auto;
  124. transition: transform 0.3s ease;
  125. background: var(--bg-page);
  126. @media (min-width: 1124px) {
  127. position: relative;
  128. transform: translateX(0);
  129. border-right: 1px solid var(--border-default);
  130. }
  131. // 모바일: 왼쪽에서 슬라이드
  132. @media (max-width: 1125px) {
  133. position: fixed;
  134. top: 56px;
  135. left: 0;
  136. width: min(320px, 85vw);
  137. height: calc(100vh - 56px);
  138. z-index: 1000;
  139. transform: translateX(-100%);
  140. border-right: 1px solid var(--border-default);
  141. box-shadow: none;
  142. }
  143. }
  144. // 사이드바 열림 상태
  145. &.sidebarOpen {
  146. > .aside {
  147. @media (max-width: 1125px) {
  148. transform: translateX(0);
  149. box-shadow: 4px 0 12px var(--shadow-color);
  150. }
  151. }
  152. > .overlay {
  153. @media (max-width: 1125px) {
  154. display: block;
  155. }
  156. }
  157. }
  158. // 메인 내용
  159. > .main {
  160. position: relative;
  161. grid-area: main;
  162. overflow-y: auto;
  163. border-bottom: 1px solid var(--border-default);
  164. }
  165. // 우측 사이드바 (채팅)
  166. > .chatAside {
  167. grid-area: chatAside;
  168. transition: transform 0.3s ease;
  169. background: var(--bg-page);
  170. @media (min-width: 1124px) {
  171. position: relative;
  172. transform: translateX(0);
  173. border-left: 1px solid var(--border-default);
  174. }
  175. // 모바일: 우측에서 슬라이드
  176. @media (max-width: 1125px) {
  177. position: fixed;
  178. top: 56px;
  179. right: 0;
  180. width: min(400px, 100vw);
  181. height: calc(100vh - 56px - 56px);
  182. z-index: 1000;
  183. transform: translateX(100%);
  184. }
  185. }
  186. // 채팅 열림 상태
  187. &.chatOpen {
  188. > .chatAside {
  189. @media (max-width: 1125px) {
  190. transform: translateX(0);
  191. box-shadow: -4px 0 12px var(--shadow-color);
  192. }
  193. }
  194. > .overlay {
  195. @media (max-width: 1125px) {
  196. display: block;
  197. }
  198. }
  199. }
  200. // 오버레이 (모바일)
  201. > .overlay {
  202. display: none;
  203. @media (max-width: 1125px) {
  204. position: fixed;
  205. top: 56px;
  206. left: 0;
  207. right: 0;
  208. bottom: 0;
  209. background: var(--overlay-color);
  210. z-index: 999;
  211. }
  212. }
  213. // 하단 내용
  214. > .footer {
  215. grid-area: footer;
  216. font-size: 0.688rem;
  217. padding: 4px;
  218. @media (max-width: 1125px) {
  219. padding-bottom: 56px;
  220. }
  221. @media (max-width: 576px) {
  222. > ol {
  223. padding: 0 0 2px 0;
  224. }
  225. }
  226. ol {
  227. display: flex;
  228. flex-flow: row;
  229. justify-content: space-between;
  230. li {
  231. // 이용약관
  232. // 개인정보처리방침
  233. &:nth-of-type(1),
  234. &:nth-of-type(2) {
  235. padding: 0 5px;
  236. &:hover {
  237. text-decoration: underline;
  238. font-weight: 600;
  239. }
  240. }
  241. &:nth-of-type(3) { // Copyright
  242. flex-grow: 0;
  243. margin-left: auto;
  244. }
  245. }
  246. }
  247. }
  248. // 모바일 하단 탭바
  249. > .bottomTab {
  250. display: none;
  251. @media (max-width: 1125px) {
  252. display: flex;
  253. position: fixed;
  254. bottom: 0;
  255. left: 0;
  256. right: 0;
  257. height: 56px;
  258. background: var(--bg-page);
  259. border-top: 1px solid var(--border-default);
  260. z-index: 1001;
  261. justify-content: space-around;
  262. align-items: center;
  263. button, a {
  264. display: flex;
  265. flex-direction: column;
  266. align-items: center;
  267. justify-content: center;
  268. gap: 2px;
  269. font-size: 0.625rem;
  270. color: var(--text-muted);
  271. text-decoration: none;
  272. flex: 1;
  273. height: 100%;
  274. border: none;
  275. background: transparent;
  276. cursor: pointer;
  277. svg {
  278. font-size: 1.25rem;
  279. }
  280. &:hover {
  281. color: var(--text-secondary);
  282. }
  283. }
  284. button.active, a.active {
  285. color: var(--text-primary);
  286. font-weight: 600;
  287. }
  288. }
  289. }
  290. // 페이지네이션
  291. #pagination {
  292. display: flex;
  293. flex-direction: row;
  294. flex-wrap: nowrap;
  295. justify-content: center;
  296. align-items: center;
  297. padding: 0.938rem 0 1.25rem 0;
  298. button {
  299. margin: 0 0.125rem;
  300. padding: 0.25rem 0.625rem;
  301. border-radius: 3px;
  302. &:hover {
  303. background: var(--bg-subtle);
  304. outline: 1px solid var(--border-default);
  305. }
  306. &.active {
  307. background: var(--bg-subtle);
  308. outline: 1px solid #b3b3b3;
  309. pointer-events: none;
  310. }
  311. }
  312. }
  313. }