_nav.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. .nav {
  2. border-bottom: 1px solid var(--divider-light);
  3. background: var(--bg-nav);
  4. backdrop-filter: saturate(0.5) blur(5px);
  5. position: fixed;
  6. width: 100vw;
  7. z-index: 101;
  8. .desktop {
  9. display: flex;
  10. align-items: center;
  11. gap: var(--small);
  12. @media(max-width: 850px) {
  13. display: none !important;
  14. }
  15. }
  16. .mobile {
  17. display: none;
  18. padding: var(--micro) 0;
  19. a:not(.btn) {
  20. padding: var(--nano) 0;
  21. border-bottom: 1px solid var(--divider-light) !important;
  22. }
  23. .btn {
  24. margin-top: var(--milli);
  25. }
  26. .active {
  27. font-weight: bold;
  28. }
  29. @media(max-width: 850px) {
  30. height: calc(100vh - var(--nav-height));
  31. .row {
  32. display: flex;
  33. flex-direction: column;
  34. }
  35. }
  36. }
  37. &-container {
  38. display: flex;
  39. justify-content: space-between;
  40. flex: 0 0 100%;
  41. align-items: center;
  42. height: var(--nav-height);
  43. }
  44. a:not([class*="btn"]) {
  45. text-decoration: none;
  46. border-bottom: 1px solid transparent;
  47. &:hover,
  48. &:focus,
  49. &.active {
  50. text-decoration: none;
  51. color: var(--important);
  52. border-color: var(--important);
  53. }
  54. }
  55. &-logo {
  56. display: flex;
  57. align-items: center;
  58. font-weight: 600;
  59. font-size: rem(1.8);
  60. color: var(--important);
  61. a {
  62. display: flex;
  63. border-bottom: none !important;
  64. }
  65. svg {
  66. margin-right: rem(1.5);
  67. }
  68. }
  69. }
  70. .toggle {
  71. display: none;
  72. transform: translateX(rem(.8));
  73. @media(max-width: 850px) {
  74. display: initial;
  75. }
  76. div {
  77. display: flex;
  78. flex-direction: column;
  79. justify-content: center;
  80. align-items: center;
  81. height: rem(4.8);
  82. width: rem(4.8);
  83. border-radius: 12px;
  84. transition: all .2s cubic-bezier(0, 0, 0.2, 1);
  85. span,
  86. &::before,
  87. &::after {
  88. background: var(--sub);
  89. height: rem(.2);
  90. width: rem(2.4);
  91. transition: all .2s cubic-bezier(0, 0, 0.2, 1);
  92. }
  93. &::before,
  94. &::after {
  95. content: '';
  96. }
  97. &::before {
  98. margin-bottom: rem(.6);
  99. }
  100. &::after {
  101. margin-top: rem(.6);
  102. }
  103. }
  104. &.open {
  105. div {
  106. &::before,
  107. &::after {
  108. background: var(--important);
  109. }
  110. span {
  111. opacity: 0;
  112. }
  113. &:before {
  114. transform: rotate(-135deg);
  115. margin-bottom: -10px;
  116. }
  117. &::after {
  118. transform: rotate(135deg);
  119. }
  120. }
  121. }
  122. }
  123. button.show-topics {
  124. display: none;
  125. margin: 0 0 var(--small) !important;
  126. text-align: left;
  127. font-weight: 300;
  128. font-size: var(--base);
  129. color: var(--sub);
  130. @media(max-width: 850px) {
  131. display: flex;
  132. }
  133. svg {
  134. height: 20px;
  135. margin-right: var(--micro);
  136. stroke: var(--important);
  137. }
  138. }
  139. button.close-topics {
  140. display: none;
  141. position: absolute;
  142. justify-content: center;
  143. align-items: center;
  144. top: 0;
  145. right: 0;
  146. transform: translateX(50%) translateY(50%);
  147. background: var(--bg);
  148. height: rem(4.8);
  149. width: rem(4.8);
  150. border: 1px solid var(--divider-light);
  151. border-radius: 100%;
  152. box-shadow: var(--shadow-default);
  153. transition: all .2s ease-out;
  154. svg {
  155. height: 30px;
  156. width: 30px;
  157. path {
  158. stroke: var(--important);
  159. }
  160. }
  161. @media(max-width: 850px) {
  162. display: flex;
  163. }
  164. }
  165. body.light {
  166. .logo-link {
  167. path {
  168. fill: var(--black);
  169. }
  170. }
  171. }