_navbar.scss 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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('navbar-menu-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('navbar-logo-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. &[data-bgimg="true"] {
  150. // color
  151. }
  152. &[data-bgimg="false"] {
  153. color: themed('body-color');
  154. }
  155. }
  156. }
  157. }
  158. &__long {
  159. &--link {
  160. width: 100%;
  161. height: 100%;
  162. padding: 0.6rem 0.2rem;
  163. margin: auto 0.25rem;
  164. @include flex-shrink(0);
  165. }
  166. }
  167. &__icons {
  168. height: 100%;
  169. @include flexbox();
  170. @include align-items(center);
  171. &--icon {
  172. width: 50px;
  173. height: $grid-nav-height;
  174. color: inherit;
  175. background-color: transparent;
  176. outline: none;
  177. border: none;
  178. cursor: pointer;
  179. @include flex-shrink(0);
  180. @include flexbox();
  181. @include align-items(center);
  182. @include justify-content(center);
  183. @include themify($themes) {
  184. color: themed('navbar-icon-color');
  185. @include on-event {
  186. color: themed('body-color');
  187. background-color: themed('dropdown-hover-background-color');
  188. }
  189. & > a {
  190. height: 100%;
  191. color: inherit;
  192. @include flexbox();
  193. @include align-items(center);
  194. @include justify-content(center);
  195. }
  196. }
  197. }
  198. }
  199. &__dropdown {
  200. height: 30px;
  201. font-size: 17.2px;
  202. @include flexbox();
  203. @include align-items(center);
  204. &--content {
  205. padding: 0.25rem 0;
  206. min-width: 120px;
  207. @include box-shadow(0, 1px, 3px, 0, rgba(0, 0, 0, 0.4));
  208. @include themify($themes) {
  209. background-color: themed('dropdown-background-color');
  210. }
  211. }
  212. &--title {
  213. font-size: 16.8px;
  214. font-family: $title-font;
  215. border: none;
  216. outline: none;
  217. height: $grid-nav-height;
  218. cursor: pointer;
  219. &[data-dir="rtl"] {
  220. margin-right: 1rem;
  221. }
  222. &[data-dir="ltr"] {
  223. margin-left: 1rem;
  224. }
  225. @include flexbox();
  226. @include align-items(center);
  227. @include themify($themes) {
  228. color: themed('body-color');
  229. background-color: themed('navbar-background-color');
  230. }
  231. }
  232. }
  233. &__collapse {
  234. width: 100%;
  235. position: absolute;
  236. top: $grid-nav-height;
  237. left: 0;
  238. max-height: 0;
  239. overflow: hidden;
  240. @include transition(all, 0.15s, ease-out);
  241. @include themify($themes) {
  242. background-color: themed('navbar-background-color');
  243. &[data-open="true"] {
  244. border-bottom: 2px solid themed('border-line-color');
  245. }
  246. &[data-open="false"] {
  247. border-bottom: none;
  248. }
  249. }
  250. }
  251. }