sidebar.less 2.4 KB

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