navbar.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. @mixin nav-item-hover-effect($theme: 'light') {
  2. color: get-light-color('accent-color') !important;
  3. border-bottom: 2px solid get-light-color('accent-color') !important;
  4. background: rgba(get-light-color('accent-color'), 0.1);
  5. @include transition();
  6. @if $theme == 'dark' {
  7. color: get-dark-color('accent-color') !important;
  8. border-bottom: 2px solid get-dark-color('accent-color') !important;
  9. background: rgba(get-dark-color('accent-color'), 0.1);
  10. }
  11. }
  12. .top-navbar {
  13. position: fixed;
  14. left: 0;
  15. top: 0;
  16. width: 100%;
  17. height: 50px;
  18. z-index: 99999;
  19. margin: 0px;
  20. padding-top: 0.4rem;
  21. color: get-light-color('heading-color');
  22. text-align: center;
  23. background-color: get-light-color('bg-primary');
  24. @include transition();
  25. .navbar-brand {
  26. color: get-light-color('heading-color');
  27. font-weight: 600;
  28. img {
  29. width: 42px;
  30. padding: 5px;
  31. margin-left: -10px;
  32. }
  33. }
  34. img {
  35. display: inline-block;
  36. }
  37. .sidebar-icon {
  38. width: 32px;
  39. height: 32px;
  40. filter: invert(0.5);
  41. }
  42. li {
  43. a {
  44. color: get-light-color('heading-color');
  45. text-decoration: none !important;
  46. font-weight: 500;
  47. @include transition();
  48. border-bottom: 2px solid transparent;
  49. &:hover {
  50. @include nav-item-hover-effect();
  51. }
  52. }
  53. }
  54. .navbar-nav .active {
  55. @include nav-item-hover-effect();
  56. }
  57. #top-navbar-divider {
  58. margin-top: 10px;
  59. background-color: get-light-color('muted-text-color');
  60. height: 20px;
  61. width: 2px;
  62. }
  63. .dropdown-menu {
  64. box-shadow: $box-shadow;
  65. border: 1px solid rgba(get-light-color('accent-color'), 0.1);
  66. max-height: 0vh;
  67. overflow: hidden;
  68. display: block;
  69. visibility: hidden;
  70. @include transition();
  71. &.show {
  72. max-height: 100vh;
  73. visibility: visible;
  74. @include transition();
  75. a {
  76. color: get-light-color('heading-color') !important;
  77. &:hover {
  78. @include nav-item-hover-effect();
  79. }
  80. }
  81. }
  82. }
  83. .navbar-collapse {
  84. margin-top: -5px;
  85. &.show,
  86. &.collapsing {
  87. background-color: get-light-color('bg-primary');
  88. padding-left: 1rem;
  89. li {
  90. a {
  91. color: get-light-color('heading-color');
  92. font-weight: 500;
  93. @include transition();
  94. }
  95. }
  96. .navbar-nav {
  97. .active {
  98. color: get-light-color('accent-color');
  99. }
  100. a:hover {
  101. color: get-light-color('accent-color');
  102. }
  103. }
  104. }
  105. }
  106. &.transparent-navbar {
  107. background-color: transparent !important;
  108. .navbar-brand {
  109. color: get-light-color('inverse-text-color');
  110. font-weight: 600;
  111. }
  112. li {
  113. a {
  114. color: get-light-color('inverse-text-color');
  115. }
  116. }
  117. .feather-menu {
  118. stroke: get-light-color('inverse-text-color');
  119. }
  120. }
  121. #themeMenu {
  122. width: 25px;
  123. min-width: 3rem;
  124. img.theme-icon {
  125. display: block !important;
  126. margin-left: auto !important;
  127. margin-right: auto !important;
  128. }
  129. }
  130. @include media('<very-large') {
  131. height: -moz-fit-content;
  132. height: fit-content;
  133. padding-bottom: 0px;
  134. padding-top: 0px;
  135. .container {
  136. max-width: 100%;
  137. }
  138. &.transparent-navbar {
  139. .navbar-nav .active,
  140. li a:hover {
  141. color: get-light-color('accent-color');
  142. @include transition();
  143. }
  144. }
  145. #top-navbar-divider {
  146. height: auto;
  147. width: auto;
  148. margin-right: 15px;
  149. border-top: 1px solid #c0ccda;
  150. }
  151. .dropdown-menu {
  152. text-align: center;
  153. margin-right: 1rem;
  154. @include transition();
  155. }
  156. .languageSelector {
  157. position: fixed;
  158. right: 0.5rem;
  159. bottom: 1rem;
  160. z-index: 10000000;
  161. background-color: get-light-color('bg-primary');
  162. box-shadow: $box-shadow;
  163. }
  164. #themeMenu {
  165. width: 100%;
  166. }
  167. }
  168. @include media('<=small') {
  169. .dropdown-menu {
  170. margin-left: -1rem;
  171. margin-right: 0rem;
  172. }
  173. }
  174. }
  175. .feather-sidebar,
  176. .feather-menu {
  177. width: 1.5rem;
  178. height: 1.5rem;
  179. stroke: get-light-color('text-color');
  180. }
  181. html[data-theme='dark'] {
  182. .top-navbar {
  183. color: get-dark-color('heading-color');
  184. background-color: get-dark-color('bg-primary');
  185. .navbar-brand {
  186. color: get-dark-color('heading-color');
  187. }
  188. .sidebar-icon {
  189. filter: invert(0.5);
  190. }
  191. li {
  192. a {
  193. color: get-dark-color('heading-color');
  194. }
  195. }
  196. #top-navbar-divider {
  197. background-color: get-dark-color('muted-text-color');
  198. }
  199. .dropdown-menu {
  200. box-shadow: $box-shadow;
  201. background-color: get-dark-color('bg-card');
  202. border: 1px solid rgba(get-dark-color('accent-color'), 0.1);
  203. &.show {
  204. a {
  205. color: get-dark-color('heading-color') !important;
  206. }
  207. }
  208. }
  209. .navbar-collapse {
  210. &.show,
  211. &.collapsing {
  212. background-color: get-dark-color('bg-primary');
  213. li {
  214. a {
  215. color: get-dark-color('heading-color');
  216. }
  217. }
  218. .navbar-nav {
  219. .active {
  220. color: get-dark-color('accent-color');
  221. }
  222. a:hover {
  223. color: get-dark-color('accent-color');
  224. }
  225. }
  226. }
  227. }
  228. &.transparent-navbar {
  229. .navbar-brand {
  230. color: get-dark-color('text-color');
  231. }
  232. li {
  233. a {
  234. color: get-dark-color('text-color');
  235. }
  236. }
  237. .feather-menu {
  238. stroke: get-dark-color('text-color');
  239. }
  240. }
  241. }
  242. img.theme-icon {
  243. filter: invert(1);
  244. }
  245. .feather-sidebar,
  246. .feather-menu {
  247. stroke: get-dark-color('text-color');
  248. }
  249. }