_nav.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /*--------------------------------------------------------------
  2. # Navigation Menu
  3. --------------------------------------------------------------*/
  4. /**
  5. * Desktop Navigation
  6. */
  7. .navbar {
  8. padding: 0;
  9. ul {
  10. margin: 0;
  11. padding: 0;
  12. display: flex;
  13. list-style: none;
  14. align-items: center;
  15. }
  16. li {
  17. position: relative;
  18. }
  19. a, a:focus {
  20. display: flex;
  21. align-items: center;
  22. justify-content: space-between;
  23. padding: 8px 16px;
  24. margin-left: 10px;
  25. font-family: $font-primary;
  26. font-size: 16px;
  27. font-weight: 700;
  28. color: #fff;
  29. white-space: nowrap;
  30. transition: 0.3s;
  31. i {
  32. font-size: 12px;
  33. line-height: 0;
  34. margin-left: 5px;
  35. }
  36. }
  37. a:hover, .active, .active:focus, li:hover > a {
  38. background: rgba(#fff, .2);
  39. }
  40. .dropdown {
  41. ul {
  42. display: block;
  43. position: absolute;
  44. left: 10px;
  45. top: calc(100% + 30px);
  46. margin: 0;
  47. padding: 10px 0;
  48. z-index: 99;
  49. opacity: 0;
  50. visibility: hidden;
  51. background: #fff;
  52. box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
  53. transition: 0.3s;
  54. li {
  55. min-width: 200px;
  56. }
  57. a {
  58. padding: 10px 20px;
  59. font-size: 15px;
  60. text-transform: none;
  61. font-weight: 600;
  62. color: $secondary;
  63. i {
  64. font-size: 12px;
  65. }
  66. }
  67. a:hover, .active:hover, li:hover > a {
  68. color: $primary;
  69. }
  70. }
  71. &:hover > ul {
  72. opacity: 1;
  73. top: 100%;
  74. visibility: visible;
  75. }
  76. }
  77. .dropdown .dropdown {
  78. ul {
  79. top: 0;
  80. left: calc(100% - 30px);
  81. visibility: hidden;
  82. }
  83. &:hover > ul {
  84. opacity: 1;
  85. top: 0;
  86. left: 100%;
  87. visibility: visible;
  88. }
  89. @media (max-width: 1366px) {
  90. ul {
  91. left: -90%;
  92. }
  93. &:hover > ul {
  94. left: -100%;
  95. }
  96. }
  97. }
  98. }
  99. /**
  100. * Mobile Navigation
  101. */
  102. .mobile-nav-toggle {
  103. color: #fff;
  104. font-size: 28px;
  105. cursor: pointer;
  106. display: none;
  107. line-height: 0;
  108. transition: 0.5s;
  109. }
  110. @media (max-width: 991px) {
  111. .mobile-nav-toggle {
  112. display: block;
  113. }
  114. .navbar ul {
  115. display: none;
  116. }
  117. }
  118. .navbar-mobile {
  119. position: fixed;
  120. overflow: hidden;
  121. top: 0;
  122. right: 0;
  123. left: 0;
  124. bottom: 0;
  125. background: rgba(darken($primary, 25), 0.9);
  126. transition: 0.3s;
  127. .mobile-nav-toggle {
  128. position: absolute;
  129. top: 15px;
  130. right: 15px;
  131. }
  132. ul {
  133. display: block;
  134. position: absolute;
  135. top: 55px;
  136. right: 15px;
  137. bottom: 15px;
  138. left: 15px;
  139. padding: 10px 0;
  140. background-color: #fff;
  141. overflow-y: auto;
  142. transition: 0.3s;
  143. }
  144. a {
  145. padding: 10px 20px;
  146. font-size: 15px;
  147. color: $secondary;
  148. }
  149. a:hover, .active, li:hover > a {
  150. color: $primary;
  151. }
  152. .getstarted {
  153. margin: 15px;
  154. }
  155. .dropdown {
  156. ul {
  157. position: static;
  158. display: none;
  159. margin: 10px 20px;
  160. padding: 10px 0;
  161. z-index: 99;
  162. opacity: 1;
  163. visibility: visible;
  164. background: #fff;
  165. box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
  166. li {
  167. min-width: 200px;
  168. }
  169. a {
  170. padding: 10px 20px;
  171. i {
  172. font-size: 12px;
  173. }
  174. }
  175. a:hover, .active:hover, li:hover > a {
  176. color: $primary;
  177. }
  178. }
  179. > .dropdown-active {
  180. display: block;
  181. }
  182. }
  183. }