_navbar.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. .nav {
  2. position: relative;
  3. }
  4. .navbar {
  5. padding: 0 0.75rem;
  6. height: 100%;
  7. position: relative;
  8. @include flexbox();
  9. @include align-items(center);
  10. &__wrapper {
  11. width: 100%;
  12. height: $grid-nav-height;
  13. position: fixed;
  14. left: 0;
  15. right: 0;
  16. top: 0;
  17. z-index: z('navbar');
  18. box-shadow: 0 1px 0 rgba(12,13,14,0.1), 0 1px 6px rgba(60,65,70,0.1);
  19. @include flexbox();
  20. @include align-items(center);
  21. @include justify-content(center);
  22. @include themify($themes) {
  23. color: inherit;
  24. background-color: themed('navbar-background-color');
  25. }
  26. }
  27. &__menu {
  28. height: 100%;
  29. padding: 0 0.75rem;
  30. @include flexbox();
  31. &--wrapper {
  32. height: 100%;
  33. @include flexbox();
  34. @include align-items(center);
  35. }
  36. &--item {
  37. height: $grid-nav-height;
  38. padding: 0rem 0.75rem;
  39. & > a {
  40. height: 100%;
  41. font-family: $title-font;
  42. font-size: 16.8px;
  43. color: inherit;
  44. text-decoration: none !important;
  45. @include flexbox();
  46. @include align-items(center);
  47. @include justify-content(center);
  48. }
  49. @include themify($themes) {
  50. color: themed('body-color');
  51. &.active {
  52. font-weight: bold;
  53. color: themed('active-font-color');
  54. }
  55. }
  56. }
  57. &--mobile-item {
  58. width: 100%;
  59. @include flexbox();
  60. @include align-items(center);
  61. @include justify-content(flex-start);
  62. @include on-event {
  63. @include themify($themes) {
  64. background-color: themed('dropdown-hover-background-color');
  65. }
  66. }
  67. & > a {
  68. width: 100%;
  69. font-size: 18px;
  70. padding: 0.5rem 1rem;
  71. @include themify($themes) {
  72. color: themed('body-color');
  73. @include on-event {
  74. text-decoration: none;
  75. color: themed('link-hover');
  76. }
  77. &.active {
  78. font-weight: bold;
  79. color: themed('active-font-color');
  80. background-color: themed('dropdown-item-active-background-color');
  81. }
  82. }
  83. }
  84. }
  85. &--btn {
  86. height: $grid-nav-height;
  87. font-size: 20px;
  88. margin-left: 0.4rem;
  89. margin-right: 0.5rem;
  90. white-space: nowrap;
  91. cursor: pointer;
  92. border: none;
  93. @include flexbox();
  94. @include align-items(flex-end);
  95. @include themify($themes) {
  96. color: themed('body-color');
  97. background: transparent;
  98. @include on-event {
  99. color: themed('active-font-color');
  100. }
  101. }
  102. }
  103. }
  104. &__logo {
  105. width: 100%;
  106. height: 100%;
  107. margin: 0 0.25rem;
  108. &--wrapper {
  109. height: 100%;
  110. @include flexbox();
  111. @include align-items(center);
  112. @include justify-content(flex-start);
  113. @include themify($themes) {
  114. color: themed('body-color');
  115. @include on-event {
  116. color: themed('active-font-color');
  117. }
  118. }
  119. a {
  120. color: inherit;
  121. @include on-event {
  122. color: inherit;
  123. text-decoration: none;
  124. }
  125. }
  126. }
  127. &--link {
  128. width: 32.5px;
  129. height: 32.5px;
  130. @include flexbox();
  131. @include align-items(center);
  132. @include justify-content(center);
  133. @include flex-shrink(0);
  134. }
  135. &--text {
  136. font-size: 20px;
  137. margin-left: 0.5rem;
  138. margin-right: 1rem;
  139. white-space: nowrap;
  140. cursor: pointer;
  141. @include flexbox();
  142. @include align-items(flex-end);
  143. @include themify($themes) {
  144. color: themed('body-color');
  145. }
  146. }
  147. }
  148. &__long {
  149. &--link {
  150. width: 100%;
  151. height: 100%;
  152. padding: 0.6rem 0.2rem;
  153. margin: auto 0.25rem;
  154. @include flex-shrink(0);
  155. }
  156. }
  157. &__icons {
  158. height: 100%;
  159. @include flexbox();
  160. @include align-items(center);
  161. &--icon {
  162. width: 50px;
  163. height: $grid-nav-height;
  164. color: inherit;
  165. background-color: transparent;
  166. outline: none;
  167. border: none;
  168. cursor: pointer;
  169. @include flex-shrink(0);
  170. @include flexbox();
  171. @include align-items(center);
  172. @include justify-content(center);
  173. @include themify($themes) {
  174. color: themed('landing-button-default');
  175. @include on-event {
  176. color: themed('body-color');
  177. background-color: themed('dropdown-hover-background-color');
  178. }
  179. & > a {
  180. height: 100%;
  181. color: inherit;
  182. @include flexbox();
  183. @include align-items(center);
  184. @include justify-content(center);
  185. }
  186. }
  187. }
  188. }
  189. &__dropdown {
  190. height: 30px;
  191. font-size: 17.2px;
  192. @include flexbox();
  193. @include align-items(center);
  194. &--content {
  195. padding: 0.25rem 0;
  196. min-width: 120px;
  197. @include box-shadow(0, 1px, 3px, 0, rgba(0, 0, 0, 0.4));
  198. @include themify($themes) {
  199. background-color: themed('dropdown-background-color');
  200. }
  201. }
  202. &--title {
  203. font-size: 16.8px;
  204. font-family: $title-font;
  205. border: none;
  206. outline: none;
  207. margin-left: 1rem;
  208. height: $grid-nav-height;
  209. cursor: pointer;
  210. @include flexbox();
  211. @include align-items(center);
  212. @include themify($themes) {
  213. color: themed('body-color');
  214. background-color: themed('navbar-background-color');
  215. }
  216. }
  217. }
  218. &__collapse {
  219. width: 100%;
  220. position: absolute;
  221. top: $grid-nav-height;
  222. left: 0;
  223. max-height: 0;
  224. overflow: hidden;
  225. @include transition(all, 0.15s, ease-out);
  226. @include themify($themes) {
  227. background-color: themed('navbar-background-color');
  228. &[data-open="true"] {
  229. border-bottom: 2px solid themed('border-line-color');
  230. }
  231. &[data-open="false"] {
  232. border-bottom: none;
  233. }
  234. }
  235. }
  236. }