_sidebar.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. /* Sidebar */
  2. .sidebar {
  3. min-height: calc(100vh - #{$navbar-height});
  4. background: $sidebar-light-bg;
  5. font-family: $type1-regular;
  6. padding: 0;
  7. width: $sidebar-width-lg;
  8. z-index: 11;
  9. transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  10. -webkit-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  11. -moz-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  12. -ms-transition: width $action-transition-duration $action-transition-timing-function, background $action-transition-duration $action-transition-timing-function;
  13. .nav {
  14. overflow: hidden;
  15. flex-wrap: nowrap;
  16. flex-direction: column;
  17. margin-bottom: 60px;
  18. .nav-item {
  19. padding:0 $sidebar-menu-padding-x;
  20. @include transition-duration(0.25s);
  21. transition-property: background;
  22. -webkit-transition-property: background;
  23. .collapse {
  24. z-index: 999;
  25. }
  26. .nav-link {
  27. @include display-flex;
  28. @include align-items(center);
  29. white-space: nowrap;
  30. padding:$sidebar-menu-padding-y 0 $sidebar-menu-padding-y 0;
  31. color: $sidebar-light-menu-color;
  32. @include transition-duration(0.45s);
  33. transition-property: color;
  34. -webkit-transition-property: color;
  35. i {
  36. color: inherit;
  37. &.menu-icon {
  38. font-size: $sidebar-icon-font-size;
  39. line-height: 1;
  40. margin-left: auto;
  41. color: $sidebar-light-menu-icon-color;
  42. &:before {
  43. vertical-align: middle;
  44. }
  45. }
  46. &.menu-arrow {
  47. font: normal normal normal 24px/1 "Material Design Icons";
  48. line-height: 1;
  49. font-size: $sidebar-icon-font-size;
  50. margin-left: auto;
  51. color: $sidebar-light-menu-arrow-color;
  52. &:before{
  53. content: "\f141";
  54. font-size: inherit;
  55. color: inherit;
  56. }
  57. + .menu-icon {
  58. margin-left: .25rem;
  59. }
  60. }
  61. }
  62. .menu-title {
  63. color: inherit;
  64. display: inline-block;
  65. font-size: $sidebar-menu-font-size;
  66. line-height: 1;
  67. vertical-align: middle;
  68. }
  69. .badge {
  70. margin-right: auto;
  71. margin-left: 1rem;
  72. }
  73. &[aria-expanded="true"]{
  74. .menu-arrow{
  75. &:before{
  76. content: "\f140";
  77. }
  78. }
  79. }
  80. }
  81. &.active {
  82. background: $sidebar-light-menu-active-bg;
  83. > .nav-link {
  84. .menu-title {
  85. color: $sidebar-light-menu-active-color;
  86. font-family: $type1-medium;
  87. }
  88. i {
  89. color: theme-color(primary);
  90. }
  91. }
  92. }
  93. &:hover{
  94. background: $sidebar-light-menu-hover-bg;
  95. }
  96. &.nav-profile {
  97. .nav-link {
  98. height: auto;
  99. line-height: 1;
  100. border-top: 0;
  101. padding: 1.25rem 0;
  102. .nav-profile-image {
  103. width: 44px;
  104. height: 44px;
  105. img {
  106. width: 44px;
  107. height: 44px;
  108. border-radius: 100%;
  109. }
  110. }
  111. .nav-profile-text {
  112. margin-left: 1rem;
  113. }
  114. .nav-profile-badge {
  115. font-size: 1.125rem;
  116. margin-left: auto;
  117. }
  118. }
  119. }
  120. &.sidebar-actions {
  121. margin-top: 1rem;
  122. .nav-link {
  123. border-top: 0;
  124. display: block;
  125. height: auto;
  126. }
  127. &:hover {
  128. background: initial;
  129. .nav-link {
  130. color: initial;
  131. }
  132. }
  133. }
  134. }
  135. &:not(.sub-menu) {
  136. > .nav-item {
  137. &:hover {
  138. &:not(.nav-category):not(.nav-profile) {
  139. > .nav-link {
  140. color: $sidebar-light-menu-hover-color;
  141. }
  142. }
  143. }
  144. }
  145. }
  146. &.sub-menu {
  147. margin-bottom: 20px;
  148. margin-top:0;
  149. list-style: none;
  150. .nav-item {
  151. padding: 0;
  152. .nav-link {
  153. color: $sidebar-light-submenu-color;
  154. padding: $sidebar-submenu-item-padding;
  155. position: relative;
  156. font-size: $sidebar-submenu-font-size;
  157. line-height: 1;
  158. height: auto;
  159. border-top: 0;
  160. &:before {
  161. content: "\F054";
  162. font-family: "Material Design Icons";
  163. display: block;
  164. position: absolute;
  165. left:0px;
  166. top:50%;
  167. @include transform(translateY(-50%));
  168. color: lighten($sidebar-light-submenu-color, 10%);
  169. font-size: .75rem;
  170. }
  171. &.active {
  172. color: $sidebar-light-menu-active-color;
  173. background: transparent;
  174. }
  175. &:hover {
  176. color: $sidebar-light-submenu-hover-color;
  177. }
  178. }
  179. &:hover {
  180. background: transparent;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. /* style for off-canvas menu*/
  187. @media screen and (max-width: 991px) {
  188. .sidebar-offcanvas {
  189. position: fixed;
  190. max-height: calc(100vh - #{$navbar-height});
  191. top: $navbar-height;
  192. bottom: 0;
  193. overflow: auto;
  194. right: -$sidebar-width-lg;
  195. -webkit-transition: all 0.25s ease-out;
  196. -o-transition: all 0.25s ease-out;
  197. transition: all 0.25s ease-out;
  198. &.active {
  199. right: 0;
  200. }
  201. }
  202. }