_content.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. // ================================================================================================
  2. // File Name: content.scss
  3. // Description: Page content level SCSS for different screen size, layout and device.
  4. // ----------------------------------------------------------------------------------------------
  5. // Item Name: Vuexy - Vuejs, React, Angular, HTML & Laravel Admin Dashboard Template
  6. // Author: PIXINVENT
  7. // Authuseror URL: http://www.themeforest.net//pixinvent
  8. // ================================================================================================
  9. // Contest margin left for expanded & collapsed stats width & margin left
  10. // ================================================================================================
  11. @import '../mixins/main-menu-mixin';
  12. html {
  13. font-size: $base-font-size;
  14. height: 100%;
  15. letter-spacing: 0.01rem;
  16. body {
  17. height: 100%;
  18. background-color: $body-bg;
  19. direction: $body-direction;
  20. // paragraph line-height
  21. p {
  22. line-height: 1.5rem;
  23. }
  24. }
  25. .content {
  26. padding: 0;
  27. position: relative;
  28. transition: 300ms ease all;
  29. backface-visibility: hidden;
  30. min-height: calc(100% - #{$footer-height});
  31. margin-left: $menu-expanded-width;
  32. &.app-content {
  33. padding: calc(#{$content-padding} + #{$navbar-height} + #{$floating-nav-margin}) #{$content-padding} 0;
  34. &.show-overlay {
  35. .content-overlay {
  36. z-index: 10;
  37. opacity: 1;
  38. ~ .header-navbar-shadow {
  39. display: none;
  40. }
  41. }
  42. }
  43. .content-overlay {
  44. position: fixed;
  45. opacity: 0;
  46. width: 100%;
  47. height: 100%;
  48. top: 0;
  49. left: 0;
  50. right: 0;
  51. bottom: 0;
  52. background-color: rgba($black, 0.5);
  53. cursor: pointer;
  54. transition: all 0.7s, z-index 0s;
  55. z-index: -1;
  56. }
  57. .content-area-wrapper {
  58. display: flex;
  59. position: relative;
  60. overflow: hidden; // Required in apps
  61. .content-wrapper,
  62. .content-body {
  63. height: 100%;
  64. }
  65. }
  66. }
  67. .body-content-overlay {
  68. top: 0;
  69. left: 0;
  70. right: 0;
  71. bottom: 0;
  72. position: absolute;
  73. display: block;
  74. z-index: 4;
  75. visibility: hidden;
  76. opacity: 0;
  77. transition: all 0.3s ease;
  78. &.show {
  79. visibility: visible;
  80. transition: all 0.3s ease;
  81. opacity: 1;
  82. background-color: rgba($black, 0.2);
  83. border-radius: $border-radius/2;
  84. }
  85. }
  86. .content-wrapper {
  87. .content-header-title {
  88. font-weight: 500;
  89. color: $gray-400;
  90. padding-right: $spacer;
  91. border-right: 1px solid lighten($gray-600, 10%);
  92. }
  93. .content-header-right {
  94. .dropdown-toggle {
  95. &::after {
  96. display: none;
  97. }
  98. i,
  99. svg {
  100. margin-right: 0;
  101. }
  102. }
  103. .btn-icon {
  104. padding: 0.8rem;
  105. i,
  106. svg {
  107. height: $font-size-base;
  108. width: $font-size-base;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. // kanban app uses kanban-wrapper class as not having content-layout so added this class with all the options
  115. // For floating navbar
  116. .navbar-floating {
  117. &.footer-static {
  118. .app-content {
  119. .content-area-wrapper,
  120. .kanban-wrapper {
  121. @include content-area-wrapper-height(
  122. #{$content-padding},
  123. #{$navbar-height},
  124. #{$footer-height},
  125. #{$floating-nav-margin}
  126. );
  127. }
  128. }
  129. }
  130. &.footer-hidden {
  131. .app-content {
  132. .content-area-wrapper,
  133. .kanban-wrapper {
  134. @include content-area-wrapper-height(
  135. #{$content-padding},
  136. #{$navbar-height},
  137. 0rem,
  138. #{$floating-nav-margin},
  139. 0rem,
  140. 2
  141. );
  142. }
  143. }
  144. }
  145. &.footer-fixed {
  146. .app-content {
  147. .content-area-wrapper,
  148. .kanban-wrapper {
  149. @include content-area-wrapper-height(
  150. #{$content-padding},
  151. #{$navbar-height},
  152. #{$footer-height},
  153. #{$floating-nav-margin},
  154. 0rem,
  155. 2
  156. );
  157. }
  158. }
  159. }
  160. }
  161. //for navbar hidden
  162. .navbar-hidden {
  163. .app-content {
  164. padding: #{$content-padding} #{$content-padding} 0 #{$content-padding} !important;
  165. }
  166. &.footer-static {
  167. .app-content {
  168. .content-area-wrapper,
  169. .kanban-wrapper {
  170. @include content-area-wrapper-height(#{$content-padding}, 0rem, #{$footer-height});
  171. }
  172. }
  173. }
  174. &.footer-hidden {
  175. .app-content {
  176. .content-area-wrapper,
  177. .kanban-wrapper {
  178. @include content-area-wrapper-height(#{$content-padding}, 0rem, 0rem, 0rem, 0rem, 2);
  179. }
  180. }
  181. }
  182. &.footer-fixed {
  183. .app-content {
  184. .content-area-wrapper,
  185. .kanban-wrapper {
  186. @include content-area-wrapper-height(#{$content-padding}, 0rem, #{$footer-height}, 0rem, 0rem, 2);
  187. }
  188. }
  189. }
  190. }
  191. // for static navbar
  192. .navbar-static {
  193. .main-menu {
  194. top: 0;
  195. }
  196. .content {
  197. min-height: calc(100% - calc(#{$navbar-height} + #{$footer-height}));
  198. }
  199. .app-content {
  200. padding: #{$content-padding} #{$content-padding} 0 #{$content-padding};
  201. }
  202. &.footer-static {
  203. .app-content {
  204. .content-area-wrapper,
  205. .kanban-wrapper {
  206. @include content-area-wrapper-height(#{$content-padding}, #{$navbar-height}, #{$footer-height});
  207. }
  208. }
  209. }
  210. &.footer-hidden {
  211. .app-content {
  212. .content-area-wrapper,
  213. .kanban-wrapper {
  214. @include content-area-wrapper-height(#{$content-padding}, #{$navbar-height}, 0rem, 0rem, 0rem, 2);
  215. }
  216. }
  217. }
  218. &.footer-fixed {
  219. .app-content {
  220. .content-area-wrapper,
  221. .kanban-wrapper {
  222. @include content-area-wrapper-height(
  223. #{$content-padding},
  224. #{$navbar-height},
  225. #{$footer-height},
  226. 0rem,
  227. 0rem,
  228. 2
  229. );
  230. }
  231. }
  232. }
  233. }
  234. // for sticky navbar
  235. .navbar-sticky {
  236. .app-content {
  237. padding: calc(#{$content-padding} + #{$navbar-height}) #{$content-padding} 0 #{$content-padding};
  238. }
  239. &.footer-static {
  240. .app-content {
  241. .content-area-wrapper,
  242. .kanban-wrapper {
  243. @include content-area-wrapper-height(#{$content-padding}, #{$navbar-height}, #{$footer-height});
  244. }
  245. }
  246. }
  247. &.footer-hidden {
  248. .app-content {
  249. .content-area-wrapper,
  250. .kanban-wrapper {
  251. @include content-area-wrapper-height(#{$content-padding}, #{$navbar-height}, 0rem, 0rem, 0rem, 2);
  252. }
  253. }
  254. }
  255. &.footer-fixed {
  256. .app-content {
  257. .content-area-wrapper,
  258. .kanban-wrapper {
  259. @include content-area-wrapper-height(
  260. #{$content-padding},
  261. #{$navbar-height},
  262. #{$footer-height},
  263. 0rem,
  264. 0rem,
  265. 2
  266. );
  267. }
  268. }
  269. }
  270. }
  271. // navbar search width for sticky and static navbar
  272. .navbar-static,
  273. .navbar-sticky {
  274. .nav.header-navbar {
  275. .navbar-container {
  276. padding-left: 1.6rem;
  277. padding-right: 1.6rem;
  278. .search-input {
  279. .search-list {
  280. &.show {
  281. width: 98%;
  282. left: 1%;
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }
  289. // Fixed layout
  290. .footer-fixed {
  291. .content {
  292. &.app-content {
  293. padding-bottom: $footer-height !important; // ? Added extra padding bottom due to fixed footer height
  294. }
  295. }
  296. }
  297. //Remove left margin for 1 column layout
  298. [data-col='1-column'] {
  299. .header-navbar {
  300. // Custom width for floating nav
  301. &.floating-nav {
  302. width: calc(
  303. 100vw - (100vw - 100%) - calc(#{$content-padding} * 2)
  304. ) !important; // ? override all navbar type width
  305. }
  306. width: 100%; // Full width for other nav options
  307. left: 0 !important;
  308. }
  309. .content,
  310. .footer {
  311. margin-left: 0px !important;
  312. }
  313. // horizontal layout
  314. &.horizontal-layout {
  315. .header-navbar {
  316. width: 100% !important;
  317. }
  318. .app-content {
  319. padding: calc(#{$content-padding} + #{$navbar-height} + #{$floating-nav-margin}) #{$content-padding} 0 #{$content-padding} !important; // ? need to check all navbar types case
  320. }
  321. &.footer-fixed {
  322. .app-content {
  323. padding: calc(#{$content-padding} + #{$navbar-height} + #{$floating-nav-margin}) #{$content-padding} #{$footer-height}
  324. #{$content-padding} !important; // ? need to check all navbar types case
  325. }
  326. }
  327. }
  328. }
  329. /*
  330. * Blank page
  331. */
  332. .blank-page {
  333. .content {
  334. margin-left: 0; // not using in both cases
  335. // overflow-x hidden, overflow for y in sm screen issue resolved default
  336. &.app-content {
  337. overflow: overlay;
  338. overflow-x: hidden;
  339. padding: 0 !important;
  340. transition: none;
  341. // remove white space on top by header-navbar-shadow class
  342. .header-navbar-shadow {
  343. display: none;
  344. }
  345. }
  346. }
  347. // blank page content-wrapper
  348. .content-wrapper {
  349. padding: 0 !important;
  350. // content to be in center horizontally and vertically
  351. .flexbox-container {
  352. display: flex;
  353. align-items: center;
  354. height: 100vh;
  355. height: calc(var(--vh, 1vh) * 100);
  356. justify-content: center;
  357. }
  358. }
  359. }
  360. .pace {
  361. .pace-progress {
  362. background: $primary;
  363. }
  364. }
  365. }
  366. .app-content.center-layout {
  367. overflow: hidden;
  368. }
  369. /*
  370. * Col 3 layout for detached and general type
  371. */
  372. @include media-breakpoint-up(lg) {
  373. body {
  374. // Normal sidebar
  375. .content-right {
  376. width: calc(100vw - (100vw - 100%) - #{$sidebar-width});
  377. float: right;
  378. }
  379. .content-left {
  380. width: calc(100vw - (100vw - 100%) - #{$sidebar-width});
  381. float: left;
  382. }
  383. // Detached sidebar
  384. .content-detached {
  385. width: 100%;
  386. &.content-right {
  387. float: right;
  388. margin-left: -$sidebar-width;
  389. .content-body {
  390. margin-left: calc(#{$sidebar-width} + #{$content-padding});
  391. }
  392. }
  393. &.content-left {
  394. float: left;
  395. margin-right: -$sidebar-width;
  396. .content-body {
  397. margin-right: calc(#{$sidebar-width} + #{$content-padding});
  398. }
  399. }
  400. }
  401. }
  402. .sidebar-right.sidebar-sticky {
  403. float: right !important;
  404. margin-left: -$sidebar-width;
  405. width: $sidebar-width !important;
  406. margin-top: $navbar-height + 1.25;
  407. }
  408. }
  409. @include media-breakpoint-down(xs) {
  410. html body .app-content {
  411. padding: calc(#{$content-padding} - 0.8rem + #{$navbar-height} + #{$floating-nav-margin})
  412. calc(#{$content-padding} - 0.8rem) 0 calc(#{$content-padding} - 0.8rem) !important; // - 0.8rem to reduce padding in small screen
  413. }
  414. // For static navbar
  415. html body.navbar-static .app-content {
  416. padding: calc(#{$content-padding} - 0.8rem) calc(#{$content-padding} - 0.8rem) 0 calc(#{$content-padding} - 0.8rem) !important; // - 0.8rem to reduce padding in small screen
  417. }
  418. // For sticky navbar
  419. html body.navbar-sticky .app-content {
  420. padding: calc(#{$content-padding} - 0.8rem + #{$navbar-height}) calc(#{$content-padding} - 0.8rem) 0
  421. calc(#{$content-padding} - 0.8rem) !important; // - 0.8rem to reduce padding in small screen
  422. }
  423. // For Hidden navbar
  424. html body.navbar-hidden .app-content {
  425. padding: calc(#{$content-padding} - 0.8rem) calc(#{$content-padding} - 0.8rem) 0 calc(#{$content-padding} - 0.8rem) !important; // - 0.8rem to reduce padding in small screen
  426. }
  427. }
  428. @include media-breakpoint-down(xs) {
  429. .navbar-static,
  430. .navbar-sticky {
  431. .app-content {
  432. .header-navbar {
  433. .navbar-container {
  434. padding-left: 1rem;
  435. padding-right: 0.5rem;
  436. }
  437. }
  438. }
  439. }
  440. }
  441. // For Fullscreen IE
  442. @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  443. html.full-screen {
  444. width: 100%;
  445. .content.app-content {
  446. height: 100%;
  447. overflow: scroll;
  448. overflow-x: hidden;
  449. }
  450. }
  451. }