_navbar.scss 6.0 KB

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