_site-navbar.scss 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. // MENU
  2. .position-relative {
  3. position: relative;
  4. }
  5. .logo {
  6. font-size: 24px;
  7. color: $black;
  8. font-weight: 700;
  9. &:hover {
  10. color: $black;
  11. }
  12. }
  13. .site-nav {
  14. position: relative;
  15. }
  16. .site-nav {
  17. padding-top: 20px;
  18. padding-bottom: 20px;
  19. h1 {
  20. margin: 0;
  21. padding: 0;
  22. font-size: 24px;
  23. }
  24. .site-navigation {
  25. .site-menu {
  26. margin-bottom: 0;
  27. > li {
  28. display: inline-block;
  29. > a {
  30. font-size: 14px;
  31. padding: 10px 15px;
  32. color: $black;
  33. display: inline-block;
  34. text-decoration: none!important;
  35. color: $black;
  36. &:hover {
  37. color: $primary;
  38. }
  39. }
  40. &.cta-button {
  41. a {
  42. padding: 5px 22px;
  43. border: 1px solid rgba($black, .1);
  44. color: $black;
  45. border-radius: 30px;
  46. &:hover {
  47. color: $white;
  48. background: $primary;
  49. border-color: $primary;
  50. }
  51. }
  52. &.active {
  53. a {
  54. color: $white;
  55. background: $primary;
  56. border-color: $primary;
  57. }
  58. }
  59. }
  60. &.active {
  61. > a {
  62. color: $primary;
  63. }
  64. }
  65. }
  66. .has-children {
  67. position: relative;
  68. > a {
  69. position: relative;
  70. padding-right: 20px;
  71. &:before {
  72. position: absolute;
  73. content: "\e313";
  74. font-size: 14px;
  75. top: 50%;
  76. right: 0;
  77. transform: translateY(-50%);
  78. font-family: 'icomoon';
  79. }
  80. }
  81. .dropdown {
  82. visibility: hidden;
  83. opacity: 0;
  84. top: 100%;
  85. z-index: 999;
  86. position: absolute;
  87. text-align: left;
  88. box-shadow: 0 2px 10px -2px rgba(0,0,0,.1);
  89. padding: 20px 0;
  90. margin-top: 20px;
  91. margin-left: 0px;
  92. background: $white;
  93. transition: 0.2s 0s;
  94. &.arrow-top {
  95. position: absolute;
  96. &:before {
  97. display: none;
  98. bottom: 100%;
  99. left: 20%;
  100. border: solid transparent;
  101. content: " ";
  102. height: 0;
  103. width: 0;
  104. position: absolute;
  105. pointer-events: none;
  106. }
  107. &:before {
  108. display: none;
  109. border-color: rgba(136, 183, 213, 0);
  110. border-bottom-color: $white;
  111. border-width: 10px;
  112. margin-left: -10px;
  113. }
  114. }
  115. a {
  116. font-size: 14px;
  117. text-transform: none;
  118. letter-spacing: normal;
  119. transition: 0s all;
  120. color: $black;
  121. }
  122. .active {
  123. color: $primary!important;
  124. }
  125. > li {
  126. list-style: none;
  127. padding: 0;
  128. margin: 0;
  129. min-width: 180px;
  130. > a {
  131. padding: 5px 20px;
  132. display: block;
  133. &:hover {
  134. color: $primary;
  135. }
  136. }
  137. &.active {
  138. > a {
  139. color: $primary;
  140. }
  141. }
  142. &.has-children {
  143. > a {
  144. &:before {
  145. content: "\e315";
  146. right: 20px;
  147. }
  148. }
  149. > .dropdown, > ul {
  150. left: 100%;
  151. top: 0;
  152. li {
  153. a {
  154. &:hover {
  155. color: $primary;
  156. }
  157. }
  158. }
  159. }
  160. &:hover, &:active, &:focus {
  161. > a {
  162. color: $primary;
  163. // background: darken($light, 2%);
  164. }
  165. }
  166. }
  167. }
  168. }
  169. &:hover, &:focus, &:active {
  170. > a {
  171. color: $primary;
  172. }
  173. }
  174. &:hover, &:focus, &:active {
  175. cursor: pointer;
  176. > .dropdown {
  177. transition-delay: 0s;
  178. margin-top: 0px;
  179. visibility: visible;
  180. opacity: 1;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. .site-mobile-menu-close {
  188. display: block;
  189. position: relative;
  190. height: 30px;
  191. width: 30px;
  192. z-index: 99;
  193. cursor: pointer;
  194. top: -20px;
  195. > span {
  196. cursor: pointer;
  197. display: block;
  198. position: absolute;
  199. height: 30px;
  200. width: 30px;
  201. &:before, &:after {
  202. position: absolute;
  203. content: "";
  204. width: 2px;
  205. height: 30px;
  206. background: $black;
  207. }
  208. &:before {
  209. transform: rotate(45deg);
  210. }
  211. &:after {
  212. transform: rotate(-45deg);
  213. }
  214. }
  215. }
  216. // mobile menu
  217. .site-mobile-menu {
  218. width: 300px;
  219. position: fixed;
  220. right: 0;
  221. z-index: 2000;
  222. padding-top: 20px;
  223. background: $white;
  224. height: calc(100vh);
  225. transform: translateX(100%);
  226. transition: .8s all cubic-bezier(.23,1,.32,1);
  227. .offcanvas-menu & {
  228. box-shadow: -10px 0 20px -10px rgba(0,0,0,.1);
  229. transform: translateX(0%);
  230. }
  231. .site-mobile-menu-header {
  232. width: 100%;
  233. float: left;
  234. padding-left: 20px;
  235. padding-right: 20px;
  236. .site-mobile-menu-close {
  237. float: right;
  238. margin-top: 8px;
  239. span {
  240. font-size: 30px;
  241. display: inline-block;
  242. padding-left: 10px;
  243. padding-right: 0px;
  244. line-height: 1;
  245. cursor: pointer;
  246. transition: .3s all ease;
  247. &:hover {
  248. // color: $gray-1;
  249. }
  250. }
  251. }
  252. .site-mobile-menu-logo {
  253. float: left;
  254. margin-top: 10px;
  255. margin-left: 0px;
  256. a {
  257. display: inline-block;
  258. text-transform: uppercase;
  259. img {
  260. max-width: 70px;
  261. }
  262. &:hover {
  263. text-decoration: none;
  264. }
  265. }
  266. }
  267. }
  268. .site-mobile-menu-body {
  269. overflow-y: scroll;
  270. -webkit-overflow-scrolling: touch;
  271. position: relative;
  272. padding: 0 20px 20px 20px;
  273. height: calc(100vh - 52px);
  274. padding-bottom: 150px;
  275. }
  276. .site-nav-wrap {
  277. padding: 0;
  278. margin: 0;
  279. list-style: none;
  280. // float: left;
  281. // width: 100%;
  282. // height: 100%;
  283. position: relative;
  284. a {
  285. padding: 5px 20px;
  286. display: block;
  287. position: relative;
  288. // color: $gray-00;
  289. color: $black;
  290. &:hover {
  291. color: $primary;
  292. }
  293. }
  294. li {
  295. position: relative;
  296. display: block;
  297. &.active {
  298. > a {
  299. color: $primary;
  300. }
  301. }
  302. }
  303. .arrow-collapse {
  304. position: absolute;
  305. right: 0px;
  306. top: 0px;
  307. z-index: 20;
  308. width: 36px;
  309. height: 36px;
  310. text-align: center;
  311. cursor: pointer;
  312. border-radius: 50%;
  313. border: 1px solid $light;
  314. &:hover {
  315. // background: $gray-100;
  316. }
  317. &:before {
  318. font-size: 14px;
  319. z-index: 20;
  320. font-family: "icomoon";
  321. content: "\e313";
  322. position: absolute;
  323. top: 50%;
  324. left: 50%;
  325. transform: translate(-50%, -50%) rotate(-180deg);
  326. transition: .3s all ease;
  327. }
  328. &.collapsed {
  329. &:before {
  330. transform: translate(-50%, -50%);
  331. }
  332. }
  333. }
  334. > li {
  335. display: block;
  336. position: relative;
  337. float: left;
  338. width: 100%;
  339. > a {
  340. padding-left: 20px;
  341. font-size: 14px;
  342. }
  343. > ul {
  344. padding: 0;
  345. margin: 0;
  346. list-style: none;
  347. > li {
  348. display: block;
  349. > a {
  350. padding-left: 40px;
  351. font-size: 14px;
  352. }
  353. > ul {
  354. padding: 0;
  355. margin: 0;
  356. > li {
  357. display: block;
  358. > a {
  359. font-size: 14px;
  360. padding-left: 60px;
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. .sticky-wrapper {
  370. position: absolute;
  371. z-index: 100;
  372. width: 100%;
  373. .site-navbar {
  374. transition: .3s all ease;
  375. }
  376. .site-navbar {
  377. .site-menu-toggle {
  378. color: $black;
  379. }
  380. .site-logo {
  381. a {
  382. color: $black;
  383. }
  384. }
  385. .site-menu {
  386. > li {
  387. > a {
  388. color: rgba($black, .8)!important;
  389. &:hover, &.active {
  390. color: $black!important;
  391. }
  392. }
  393. }
  394. }
  395. }
  396. &.is-sticky {
  397. .burger:before, .burger span, .burger:after {
  398. background: $black;
  399. transition: .0s all ease;
  400. }
  401. .site-navbar {
  402. background: $black;
  403. border-bottom: 1px solid transparent;
  404. box-shadow: 4px 0 20px -5px rgba(0,0,0,.1);
  405. .site-logo {
  406. a {
  407. color: $black!important;
  408. }
  409. }
  410. .site-menu {
  411. > li {
  412. > a {
  413. color: $black!important;
  414. &:hover, &.active {
  415. color: $primary!important;
  416. }
  417. }
  418. &.active {
  419. a {
  420. color: $primary!important;
  421. }
  422. }
  423. }
  424. }
  425. }
  426. }
  427. .shrink {
  428. padding-top: 0px!important;
  429. padding-bottom: 0px!important;
  430. }
  431. }
  432. /* Burger */
  433. .burger {
  434. width: 28px;
  435. height: 32px;
  436. cursor: pointer;
  437. position: relative;
  438. &.light {
  439. &:before, span, &:after {
  440. background: $white;
  441. }
  442. }
  443. }
  444. .burger:before, .burger span, .burger:after {
  445. width: 100%;
  446. height: 2px;
  447. display: block;
  448. background: #000;
  449. border-radius: 2px;
  450. position: absolute;
  451. opacity: 1;
  452. }
  453. .burger:before, .burger:after {
  454. transition: top .35s cubic-bezier(.23,1,.32,1),transform .35s cubic-bezier(.23,1,.32,1),opacity .35s cubic-bezier(.23,1,.32,1),background-color 1.15s cubic-bezier(.86,0,.07,1);
  455. -webkit-transition: top .35s cubic-bezier(.23,1,.32,1),-webkit-transform .35s cubic-bezier(.23,1,.32,1),opacity .35s cubic-bezier(.23,1,.32,1),background-color 1.15s cubic-bezier(.86,0,.07,1);
  456. content: "";
  457. }
  458. .burger:before {
  459. top: 4px;
  460. }
  461. .burger span {
  462. top: 15px;
  463. }
  464. .burger:after {
  465. top: 26px;
  466. }
  467. /* Hover */
  468. .burger:hover:before {
  469. top: 7px;
  470. }
  471. .burger:hover:after {
  472. top: 23px;
  473. }
  474. /* Click */
  475. .burger.active span {
  476. opacity: 0;
  477. }
  478. .burger.active:before, .burger.active:after {
  479. top: 40%;
  480. }
  481. .burger.active:before {
  482. -webkit-transform: rotate(45deg);
  483. -moz-transform: rotate(45deg);
  484. filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=5); /*for IE*/
  485. }
  486. .burger.active:after {
  487. -webkit-transform: rotate(-45deg);
  488. -moz-transform: rotate(-45deg);
  489. filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=-5); /*for IE*/
  490. }
  491. .burger:focus {
  492. outline: none;
  493. }