_navigation.scss 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*=========================================================================================
  2. File Name: navigation.scss
  3. Description: Common mixin for menus, contain dark and light version scss.
  4. ----------------------------------------------------------------------------------------
  5. Item Name: Vuexy - Vuejs, React, Angular, HTML & Laravel Admin Dashboard Template
  6. Author: PIXINVENT
  7. Author URL: http://www.themeforest.net/user/pixinvent
  8. ==========================================================================================*/
  9. // Import first main menu mixin
  10. @import '../mixins/main-menu-mixin';
  11. // Main menu base
  12. //==============
  13. .main-menu {
  14. z-index: 1031;
  15. position: absolute;
  16. display: table-cell;
  17. height: 100%;
  18. overflow: hidden;
  19. &.menu-light {
  20. @include menu-theme($body-color, $white);
  21. }
  22. &.menu-dark {
  23. @include menu-theme($menu-dark-color, $menu-dark-bg-color);
  24. }
  25. &.menu-fixed {
  26. position: fixed;
  27. }
  28. &.menu-static {
  29. height: 100%;
  30. padding-bottom: calc(100% - 20rem);
  31. .main-menu-content {
  32. height: unset !important;
  33. }
  34. }
  35. &.menu-shadow {
  36. box-shadow: 0 0 15px 0 rgba($black, 0.05);
  37. }
  38. &.menu-border {
  39. border-right: 1px solid $border-color;
  40. }
  41. // menu scroll shadow
  42. .shadow-bottom {
  43. display: none;
  44. position: absolute;
  45. z-index: 2;
  46. height: 50px;
  47. width: 100%;
  48. pointer-events: none;
  49. margin-top: -0.7rem;
  50. filter: blur(5px);
  51. background: linear-gradient(#fff 41%, hsla(0, 0%, 100%, 0.11) 95%, hsla(0, 0%, 100%, 0));
  52. .bordered-layout & {
  53. background: linear-gradient($body-bg 41%, hsla(0, 0%, 100%, 0.11) 95%, hsla(0, 0%, 100%, 0));
  54. }
  55. }
  56. // Native Scrollbar (.menu-native-scroll)
  57. &.menu-native-scroll {
  58. .main-menu-content {
  59. overflow-y: scroll !important;
  60. }
  61. }
  62. .navbar-header {
  63. height: 100%;
  64. width: $menu-expanded-width;
  65. height: $navbar-height;
  66. position: relative;
  67. padding: 0.35rem 1rem 0.3rem 1.64rem;
  68. transition: 300ms ease all, background 0s;
  69. .navbar-brand {
  70. display: flex;
  71. align-items: center;
  72. margin-top: 1.35rem;
  73. font-size: inherit;
  74. .brand-logo img {
  75. max-width: 36px;
  76. }
  77. .brand-text {
  78. color: $primary;
  79. padding-left: 1rem;
  80. margin-bottom: 0;
  81. font-weight: 600;
  82. letter-spacing: 0.01rem;
  83. font-size: 1.45rem;
  84. animation: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) 0s normal forwards 1 fadein;
  85. }
  86. }
  87. .modern-nav-toggle {
  88. animation: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) 0s normal forwards 1 fadein;
  89. }
  90. }
  91. .main-menu-content {
  92. height: calc(100% - #{$navbar-height}) !important;
  93. position: relative;
  94. .ps__rail-y {
  95. z-index: 3;
  96. }
  97. }
  98. ul {
  99. list-style: none;
  100. margin: 0;
  101. padding: 0;
  102. &.navigation-main {
  103. overflow-x: hidden;
  104. padding-bottom: 0.75rem;
  105. > li:first-child {
  106. margin-top: 0.5rem;
  107. }
  108. }
  109. }
  110. a {
  111. outline: none;
  112. &:hover,
  113. &:focus {
  114. text-decoration: none;
  115. }
  116. }
  117. }
  118. // Main Navigation
  119. .navigation {
  120. font-size: 1.1rem;
  121. font-family: $font-family-monospace;
  122. font-weight: 400;
  123. overflow-y: hidden;
  124. padding-bottom: 20px;
  125. .navigation-header {
  126. font-family: $font-family-monospace;
  127. font-weight: $headings-font-weight;
  128. line-height: $headings-line-height;
  129. padding: 12px 22px;
  130. font-size: 0.9rem;
  131. text-transform: uppercase;
  132. }
  133. li {
  134. position: relative;
  135. white-space: nowrap;
  136. outline: none;
  137. a {
  138. display: block;
  139. text-overflow: ellipsis;
  140. overflow: hidden;
  141. i,
  142. svg {
  143. height: 11px;
  144. width: 11px;
  145. font-size: 11px;
  146. margin-right: 1.38rem;
  147. }
  148. }
  149. &.menu-item-animating {
  150. transition: height 0.25s ease-in-out;
  151. }
  152. &.disabled {
  153. a {
  154. cursor: not-allowed;
  155. opacity: 0.65;
  156. pointer-events: none;
  157. }
  158. }
  159. }
  160. }
  161. // Media queries for small screen devices
  162. // =========================================
  163. @include media-breakpoint-down(sm) {
  164. // menu hide/open animation
  165. .menu-hide .main-menu,
  166. .menu-open .main-menu {
  167. transition: transform 0.25s, top 0.35s, height 0.35s;
  168. }
  169. .main-menu {
  170. transform: translate3d(-240px, 0, 0);
  171. backface-visibility: hidden;
  172. perspective: 1000;
  173. }
  174. .menu-open .main-menu {
  175. transform: translate3d(0, 0, 0);
  176. }
  177. }
  178. @include media-breakpoint-up(md) {
  179. .drag-target {
  180. z-index: 0;
  181. }
  182. }