_layout.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /*
  2. * Core: Layout
  3. * ------------
  4. */
  5. html,
  6. body,
  7. .wrapper {
  8. min-height: 100%;
  9. overflow-x: hidden;
  10. }
  11. .wrapper {
  12. overflow: hidden;
  13. position: relative;
  14. & .content-wrapper {
  15. min-height: calc(100vh - 112px);
  16. }
  17. .layout-boxed & {
  18. @include box-shadow(0 0 10px rgba($black, .3));
  19. &,
  20. &::before {
  21. margin: 0 auto;
  22. max-width: $boxed-layout-max-width;
  23. }
  24. & .main-sidebar {
  25. left: inherit;
  26. }
  27. }
  28. .layout-navbar-fixed & {
  29. .content-wrapper {
  30. margin-top: 57px;
  31. }
  32. .main-header {
  33. left: 0;
  34. position: fixed;
  35. right: 0;
  36. top: 0;
  37. z-index: $zindex-main-sidebar - 1;
  38. }
  39. }
  40. .layout-footer-fixed & {
  41. .main-footer {
  42. bottom: 0;
  43. left: 0;
  44. position: fixed;
  45. right: 0;
  46. z-index: $zindex-main-sidebar - 1;
  47. }
  48. }
  49. .layout-top-nav & {
  50. margin-left: 0;
  51. & .main-sidebar {
  52. bottom: inherit;
  53. height: inherit;
  54. }
  55. .brand-image {
  56. height: 33px;
  57. }
  58. & .main-sidebar {
  59. display: none;
  60. }
  61. & .content-wrapper,
  62. & .main-header,
  63. & .main-footer {
  64. margin-left: 0;
  65. }
  66. }
  67. }
  68. .content-wrapper,
  69. .main-footer,
  70. .main-header {
  71. @include media-breakpoint-up(sm) {
  72. @include transition(margin-left $transition-speed $transition-fn);
  73. margin-left: $sidebar-width;
  74. z-index: 3000;
  75. .sidebar-collapse & {
  76. margin-left: 0;
  77. }
  78. }
  79. @include media-breakpoint-down(sm) {
  80. &,
  81. &::before {
  82. margin-left: 0;
  83. }
  84. }
  85. }
  86. .content-wrapper {
  87. background: $main-bg;
  88. > .content {
  89. padding: $content-padding-y $content-padding-x;
  90. }
  91. }
  92. .main-sidebar {
  93. &,
  94. &::before {
  95. $local-sidebar-transition: margin-left $transition-speed $transition-fn, width $transition-speed $transition-fn;
  96. @include transition($local-sidebar-transition);
  97. width: $sidebar-width;
  98. }
  99. .sidebar-collapse & {
  100. &,
  101. &::before {
  102. margin-left: -$sidebar-width;
  103. }
  104. }
  105. @include media-breakpoint-down(sm) {
  106. &,
  107. &::before {
  108. box-shadow: none !important;
  109. margin-left: -$sidebar-width;
  110. }
  111. .sidebar-open & {
  112. &,
  113. &::before {
  114. margin-left: 0;
  115. }
  116. }
  117. }
  118. }
  119. :not(.layout-fixed) {
  120. .main-sidebar {
  121. height: inherit;
  122. min-height: 100%;
  123. position: absolute;
  124. top: 0;
  125. }
  126. }
  127. .layout-navbar-fixed {
  128. &.sidebar-collapse {
  129. .brand-link {
  130. height: 57px;
  131. transition: width $transition-speed $transition-fn;
  132. width: $sidebar-mini-width;
  133. }
  134. .main-sidebar:hover {
  135. .brand-link {
  136. transition: width $transition-speed $transition-fn;
  137. width: $sidebar-width;
  138. }
  139. }
  140. }
  141. .sidebar {
  142. margin-top: 57px;
  143. }
  144. .brand-link {
  145. overflow: hidden;
  146. position: fixed;
  147. top: 0;
  148. transition: width $transition-speed $transition-fn;
  149. width: $sidebar-width;
  150. z-index: $zindex-main-sidebar + 1;
  151. }
  152. // Sidebar variants
  153. @each $name, $color in $theme-colors {
  154. .sidebar-dark-#{$name} .brand-link {
  155. background-color: $sidebar-dark-bg;
  156. }
  157. .sidebar-light-#{$name} .brand-link {
  158. background-color: $sidebar-light-bg;
  159. }
  160. }
  161. }
  162. .layout-fixed {
  163. .main-sidebar {
  164. bottom: 0;
  165. float: none;
  166. height: 100vh;
  167. left: 0;
  168. position: fixed;
  169. top: 0;
  170. }
  171. }
  172. .main-footer {
  173. background: $main-footer-bg;
  174. border-top: $main-footer-border-top;
  175. color: lighten($gray-700, 25%);
  176. padding: $main-footer-padding;
  177. }
  178. .content-header {
  179. padding: 15px $content-padding-x;
  180. h1 {
  181. font-size: 1.8rem;
  182. margin: 0;
  183. }
  184. .breadcrumb {
  185. background: transparent;
  186. line-height: 1.8rem;
  187. margin-bottom: 0;
  188. padding: 0;
  189. }
  190. }
  191. .hold-transition {
  192. .content-wrapper,
  193. .main-header,
  194. .main-footer {
  195. transition: none !important;
  196. }
  197. }