navbar.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. .top-navbar {
  2. position: fixed;
  3. left: 0;
  4. top: 0;
  5. width: 100%;
  6. height: 50px;
  7. z-index: 99999;
  8. transition: all 0.4s ease-out;
  9. margin: 0px;
  10. padding-top: 0.4rem;
  11. text-align: center;
  12. /* --- initial state start ------ */
  13. &.initial-navbar {
  14. background-color: transparent;
  15. }
  16. &.initial-navbar .navbar-brand {
  17. color: #c0ccda;
  18. font-weight: 600;
  19. }
  20. &.initial-navbar li a {
  21. color: #c0ccda;
  22. }
  23. &.initial-navbar .navbar-nav .active,
  24. &.initial-navbar li a:hover {
  25. color: #f9fafc;
  26. transition: all 0.3s ease-out;
  27. transform: translateY(-2px);
  28. }
  29. .navbar-collapse {
  30. margin-top: -5px;
  31. }
  32. .navbar-collapse.show,
  33. .navbar-collapse.collapsing {
  34. background-color: #f9fafc;
  35. padding-left: 1rem;
  36. }
  37. /* --- initial state end ------ */
  38. /* --- state after scroll start --- */
  39. &.final-navbar {
  40. background-color: #f9fafc;
  41. color: #1c2d41;
  42. transition: all 0.3s ease-out;
  43. }
  44. &.final-navbar .navbar-brand {
  45. color: #1c2d41;
  46. font-weight: 600;
  47. }
  48. &.final-navbar li a {
  49. color: #1c2d41;
  50. font-weight: 500;
  51. transition: all 0.3s ease-out;
  52. border-bottom: 2px solid#F9FAFC;
  53. }
  54. &.final-navbar .navbar-nav .active,
  55. &.final-navbar li a:hover {
  56. color: #2098d1;
  57. transition: all 0.3s ease-out;
  58. border-bottom: 2px solid #2098d1;
  59. background: rgb(2, 0, 36);
  60. background: linear-gradient(
  61. 90deg,
  62. rgba(2, 0, 36, 1) 0%,
  63. rgba(34, 136, 168, 0.1) 0%
  64. );
  65. }
  66. .navbar-collapse.show li a,
  67. .navbar-collapse.collapsing li a {
  68. color: #1c2d41;
  69. font-weight: 500;
  70. transition: all 0.3s ease-out;
  71. }
  72. .navbar-collapse.show .navbar-nav .active,
  73. .navbar-collapse.show .navbar-nav a:hover {
  74. color: #2098d1;
  75. }
  76. #top-navbar-divider {
  77. margin-top: 10px;
  78. }
  79. /* --- state after scroll end --- */
  80. #top-navbar-divider {
  81. background: rgba(192, 204, 218, 0.8);
  82. height: 20px;
  83. width: 2px;
  84. }
  85. &.final-navbar #top-navbar-divider {
  86. background: rgba(0, 0, 0, 0.6);
  87. }
  88. #top-navbar-divider {
  89. height: 20px;
  90. width: 2px;
  91. }
  92. .navbar-brand img {
  93. width: 42px;
  94. padding: 5px;
  95. margin-left: -10px;
  96. }
  97. .dropdown-menu {
  98. box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
  99. border: 1px solid #fff;
  100. max-height: 0vh;
  101. overflow: hidden;
  102. display: block;
  103. visibility: hidden;
  104. transition: all 0.3s ease-out;
  105. }
  106. .dropdown-menu.show {
  107. max-height: 100vh;
  108. visibility: visible;
  109. transition: all 0.3s ease-in;
  110. }
  111. .dropdown-menu a {
  112. color: #1c2d41;
  113. border-bottom: none;
  114. }
  115. .dropdown-menu a:hover {
  116. color: #2098d1;
  117. transition: all 0.3s ease-out;
  118. border-bottom: none;
  119. background: rgb(2, 0, 36);
  120. background: linear-gradient(
  121. 90deg,
  122. rgba(2, 0, 36, 1) 0%,
  123. rgba(34, 136, 168, 0.2) 0%
  124. );
  125. }
  126. /* ============= Device specific fixes ======= */
  127. /* Large screens such as TV */
  128. @media only screen and (min-width: 1824px) {
  129. }
  130. /* Extra large devices (large desktops, 1200px and up) */
  131. @media (max-width: 1400px) {
  132. }
  133. @media (max-width: 1200px) {
  134. }
  135. /* IPad Pro */
  136. @media (max-width: 1024px) {
  137. height: -moz-fit-content;
  138. height: fit-content;
  139. padding-bottom: 0px;
  140. padding-top: 0px;
  141. .container {
  142. max-width: 100%;
  143. }
  144. &.initial-navbar .navbar-nav .active,
  145. &.initial-navbar li a:hover {
  146. color: #2098d1;
  147. transition: all 0.3s ease-out;
  148. }
  149. &.final-navbar .navbar-nav .active,
  150. &.final-navbar li a:hover {
  151. color: #2098d1;
  152. transition: none;
  153. border-bottom: none;
  154. background: transparent;
  155. }
  156. &.final-navbar li a {
  157. border-bottom: none;
  158. }
  159. .dropdown-divider {
  160. border-top: 1px solid #c0ccda;
  161. }
  162. #top-navbar-divider {
  163. background: rgba(0, 0, 0, 0.6);
  164. height: auto;
  165. width: auto;
  166. margin-right: 15px;
  167. }
  168. .dropdown-menu {
  169. text-align: center;
  170. margin-bottom: 0.5rem;
  171. margin-right: 1rem;
  172. transition: all 0.3s ease-out;
  173. }
  174. }
  175. /* Large devices (desktops, 992px and up) */
  176. @media (max-width: 992px) {
  177. &.initial-navbar .navbar-nav .active,
  178. &.initial-navbar li a:hover {
  179. color: #2098d1;
  180. transition: all 0.3s ease-out;
  181. }
  182. &.final-navbar .navbar-nav .active,
  183. &.final-navbar li a:hover {
  184. color: #2098d1;
  185. transition: none;
  186. border-bottom: none;
  187. background: transparent;
  188. }
  189. &.final-navbar li a {
  190. border-bottom: none;
  191. }
  192. .dropdown-divider {
  193. border-top: 1px solid #c0ccda;
  194. }
  195. #top-navbar-divider {
  196. background: rgba(0, 0, 0, 0.6);
  197. height: auto;
  198. width: auto;
  199. margin-right: 15px;
  200. }
  201. }
  202. /* Medium devices (tablets, 768px and up) */
  203. @media only screen and (max-width: 768px) {
  204. &.initial-navbar .navbar-nav .active,
  205. &.initial-navbar li a:hover {
  206. color: #2098d1;
  207. transition: all 0.3s ease-out;
  208. }
  209. &.final-navbar .navbar-nav .active,
  210. &.final-navbar li a:hover {
  211. color: #2098d1;
  212. transition: none;
  213. border-bottom: none;
  214. background: transparent;
  215. }
  216. &.final-navbar li a {
  217. border-bottom: none;
  218. }
  219. .dropdown-divider {
  220. border-top: 1px solid #c0ccda;
  221. }
  222. #top-navbar-divider {
  223. background: rgba(0, 0, 0, 0.6);
  224. height: auto;
  225. width: auto;
  226. margin-right: 15px;
  227. }
  228. }
  229. /* Small devices (landscape phones, 576px and up) */
  230. @media only screen and (max-width: 576px) {
  231. .dropdown-menu {
  232. margin-left: -1rem;
  233. margin-right: 0rem;
  234. }
  235. }
  236. /* iPhoneX, iPhone 6,7,8 */
  237. @media only screen and (max-width: 375px) {
  238. }
  239. /* Galaxy S5, Moto G4 */
  240. @media only screen and (max-width: 360px) {
  241. }
  242. /* iPhone 5 or before */
  243. @media only screen and (max-width: 320px) {
  244. }
  245. }