navbar.scss 5.6 KB

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