sidebar.less 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /*
  2. * Component: Sidebar
  3. * ------------------
  4. */
  5. //Main Sidebar
  6. // ``` .left-side has been deprecated as of 2.0.0 in favor of .main-sidebar ```
  7. .main-sidebar,
  8. .left-side {
  9. position: absolute;
  10. top: 0;
  11. left: 0;
  12. padding-top: 50px;
  13. min-height: 100%;
  14. width: @sidebar-width;
  15. z-index: 810;
  16. //Using disposable variable to join statements with a comma
  17. @transition-rule: @transition-speed @transition-fn,
  18. width @transition-speed @transition-fn;
  19. .transition-transform(@transition-rule);
  20. @media (max-width: @screen-header-collapse) {
  21. padding-top: 100px;
  22. }
  23. @media (max-width: @screen-xs-max) {
  24. .translate(-@sidebar-width, 0);
  25. }
  26. .sidebar-collapse & {
  27. @media (min-width: @screen-sm) {
  28. .translate(-@sidebar-width, 0);
  29. }
  30. }
  31. .sidebar-open & {
  32. @media (max-width: @screen-xs-max) {
  33. .translate(0, 0);
  34. }
  35. }
  36. }
  37. .sidebar {
  38. padding-bottom: 10px;
  39. }
  40. // remove border from form
  41. .sidebar-form {
  42. input:focus {
  43. border-color: transparent;
  44. }
  45. }
  46. //Sidebar user panel
  47. .user-panel {
  48. position: relative;
  49. width: 100%;
  50. padding: 10px;
  51. overflow: hidden;
  52. .clearfix();
  53. > .image > img {
  54. width: 100%;
  55. max-width: 45px;
  56. height: auto;
  57. }
  58. > .info {
  59. padding: 5px 5px 5px 15px;
  60. line-height: 1;
  61. position: absolute;
  62. left: 55px;
  63. > p {
  64. font-weight: 600;
  65. margin-bottom: 9px;
  66. }
  67. > a {
  68. text-decoration: none;
  69. padding-right: 5px;
  70. margin-top: 3px;
  71. font-size: 11px;
  72. > .fa,
  73. > .ion,
  74. > .glyphicon {
  75. margin-right: 3px;
  76. }
  77. }
  78. }
  79. }
  80. // Sidebar menu
  81. .sidebar-menu {
  82. list-style: none;
  83. margin: 0;
  84. padding: 0;
  85. //First Level
  86. > li {
  87. position: relative;
  88. margin: 5px 0;
  89. padding: 0;
  90. > a {
  91. padding: 12px 5px 12px 15px;
  92. display: block;
  93. > .fa,
  94. > .glyphicon,
  95. > .ion {
  96. width: 20px;
  97. }
  98. }
  99. .label,
  100. .badge {
  101. margin-right: 5px;
  102. }
  103. .badge {
  104. margin-top: 3px;
  105. }
  106. }
  107. li.header {
  108. padding: 10px 25px 10px 15px;
  109. font-size: 12px;
  110. }
  111. li > a > .fa-angle-left,
  112. li > a > .pull-right-container > .fa-angle-left {
  113. width: auto;
  114. height: auto;
  115. padding: 0;
  116. margin-right: 10px;
  117. }
  118. li.active {
  119. > a > .fa-angle-left,
  120. > a > .pull-right-container > .fa-angle-left {
  121. .rotate(-90deg);
  122. }
  123. > .treeview-menu {
  124. display: block;
  125. }
  126. }
  127. // Tree view menu
  128. .treeview-menu {
  129. display: none;
  130. list-style: none;
  131. padding: 0px 0;
  132. margin: 0;
  133. padding-left: 5px;
  134. .treeview-menu {
  135. padding-left: 20px;
  136. }
  137. &:before,&:after{
  138. content: "";
  139. display: table;
  140. }
  141. &.menu-open {
  142. display: block;
  143. }
  144. > li {
  145. margin: 0;
  146. > a {
  147. padding: 12px 5px 12px 15px;
  148. display: block;
  149. > .fa,
  150. > .glyphicon,
  151. > .ion {
  152. width: 20px;
  153. }
  154. > .pull-right-container > .fa-angle-left,
  155. > .pull-right-container > .fa-angle-down,
  156. > .fa-angle-left,
  157. > .fa-angle-down {
  158. width: auto;
  159. }
  160. }
  161. }
  162. }
  163. }