common.module.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .container {
  2. display: grid;
  3. height: 100vh;
  4. grid-template-rows: minmax(auto, 50px) 2fr auto;
  5. // PC
  6. @media (min-width: 1124px) {
  7. grid-template-areas: "header header" "main aside" "footer aside";
  8. grid-template-columns: 1fr minmax(200px, 400px);
  9. }
  10. // Table
  11. @media (max-width: 1125px) {
  12. grid-template-areas: "header" "main" "footer";
  13. grid-template-columns: 1fr;
  14. }
  15. > .header {
  16. grid-area: header;
  17. height: 56px;
  18. background: #f4f4f4;
  19. border-bottom: 1px solid #dedede;
  20. // 로고
  21. > a {
  22. flex-basis: 137px;
  23. font-size: inherit;
  24. padding-right: 20px;
  25. }
  26. // 메뉴
  27. nav {
  28. font-weight: 500;
  29. ul {
  30. li {
  31. a, button {
  32. &:hover {
  33. font-weight: 700;
  34. text-decoration: underline;
  35. }
  36. }
  37. }
  38. }
  39. }
  40. }
  41. // 좌측 내용
  42. > .main {
  43. position: relative;
  44. grid-area: main;
  45. overflow-y: auto;
  46. border-bottom: 1px solid #dedede;
  47. }
  48. // 우측 내용
  49. > .aside {
  50. grid-area: aside;
  51. transition: transform 0.3s ease;
  52. @media (min-width: 1124px) {
  53. position: relative;
  54. transform: translateX(0);
  55. border-left: 1px solid #dedede;
  56. }
  57. // 테블릿일 때
  58. @media (max-width: 1125px) {
  59. position: fixed;
  60. top: 56px;
  61. right: 0;
  62. width: min(400px, 100vw);
  63. height: 100vh;
  64. z-index: 1000;
  65. transform: translateX(100%);
  66. }
  67. }
  68. // 하단 내용
  69. > .footer {
  70. grid-area: footer;
  71. font-size: 0.688rem;
  72. padding: 4px;
  73. ol {
  74. display: flex;
  75. flex-flow: row;
  76. justify-content: space-between;
  77. li {
  78. &:nth-of-type(1) { // 최근 게시글
  79. flex-grow: 1;
  80. }
  81. &:nth-of-type(2) { // 공지사항
  82. flex-grow: 1;
  83. }
  84. &:nth-of-type(3) { // Copyright
  85. flex-grow: 0;
  86. }
  87. }
  88. }
  89. }
  90. // 페이지네이션
  91. #pagination {
  92. display: flex;
  93. flex-direction: row;
  94. flex-wrap: nowrap;
  95. justify-content: center;
  96. align-items: center;
  97. padding: 0.938rem 0 1.25rem 0;
  98. button {
  99. margin: 0 0.125rem;
  100. padding: 0.25rem 0.625rem;
  101. border-radius: 3px;
  102. &:hover {
  103. background: #f0f0f0;
  104. outline: 1px solid #dedede;
  105. }
  106. &.active {
  107. background: #f0f0f0;
  108. outline: 1px solid #b3b3b3;
  109. pointer-events: none;
  110. }
  111. }
  112. }
  113. }