app.layout.less 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. /*layout*/
  2. html, body{
  3. width: 100%;
  4. height: 100%;
  5. }
  6. body{
  7. overflow-x: hidden;
  8. }
  9. .app{
  10. height: auto;
  11. min-height: 100%;
  12. width: 100%;
  13. position: relative;
  14. &:before{
  15. content: "";
  16. position: absolute;
  17. width: inherit;
  18. top: 0;
  19. bottom: 0;
  20. z-index: -1;
  21. background-color: @body-bg;
  22. border: inherit;
  23. display: block;
  24. }
  25. }
  26. .app-header-fixed{
  27. padding-top: @app-header-height;
  28. .app-header{
  29. position: fixed;
  30. top: 0;
  31. width: 100%;
  32. }
  33. }
  34. .app-header{
  35. z-index: 1025;
  36. border-radius: 0;
  37. }
  38. // menu
  39. .app-aside{
  40. float: left;
  41. &:before{
  42. content: "";
  43. position: absolute;
  44. width: inherit;
  45. top: 0;
  46. bottom: 0;
  47. z-index: -1;
  48. background-color: inherit;
  49. border: inherit;
  50. }
  51. }
  52. .app-aside-footer{
  53. position: absolute;
  54. bottom: 0;
  55. width: 100%;
  56. z-index: 1000;
  57. max-width: @app-aside-width;
  58. .app-aside-folded & {
  59. max-width: @app-aside-folded-width;
  60. }
  61. ~ div{
  62. padding-bottom: 50px;
  63. }
  64. }
  65. .app-aside-right{
  66. padding-bottom: @app-header-height;
  67. }
  68. // content
  69. .app-content{
  70. height: 100%;
  71. .clearfix();
  72. }
  73. .app-content-full{
  74. position: absolute;
  75. top: @app-header-height;
  76. bottom: @app-header-height;
  77. height: auto;
  78. width: auto !important;
  79. padding: 0 !important;
  80. overflow-y: auto;
  81. -webkit-overflow-scrolling: touch;
  82. &.h-full{
  83. bottom: 0;
  84. height: auto;
  85. }
  86. }
  87. .app-content-body{
  88. padding-bottom: @app-header-height;
  89. float: left;
  90. width: 100%;
  91. }
  92. // footer
  93. .app-footer{
  94. position: absolute;
  95. bottom: 0;
  96. left: 0;
  97. right: 0;
  98. z-index: 1005;
  99. &.app-footer-fixed{
  100. position: fixed;
  101. }
  102. }
  103. .hbox{
  104. display: table;
  105. table-layout: fixed;
  106. border-spacing: 0;
  107. width: 100%;
  108. height: 100%;
  109. .col{
  110. display: table-cell;
  111. vertical-align: top;
  112. height: 100%;
  113. float: none;
  114. }
  115. }
  116. .v-middle{vertical-align: middle !important;}
  117. .v-top{vertical-align: top !important;}
  118. .v-bottom{vertical-align: bottom !important;}
  119. .vbox{
  120. display: table;
  121. border-spacing:0;
  122. position: relative;
  123. width: 100%;
  124. height: 100%;
  125. min-height: 240px;
  126. .row-row {
  127. display: table-row;
  128. height: 100%;
  129. .cell {
  130. position: relative;
  131. height: 100%;
  132. width: 100%;
  133. -webkit-overflow-scrolling:touch;
  134. overflow: auto;
  135. .ie & {
  136. display: table-cell;
  137. }
  138. .cell-inner {
  139. position: absolute;
  140. top: 0;
  141. bottom: 0;
  142. left: 0;
  143. right: 0;
  144. }
  145. }
  146. }
  147. }
  148. // navbar
  149. .navbar{
  150. .navbar-form-sm{
  151. margin-top: 10px;
  152. margin-bottom: 10px;
  153. }
  154. border-width: 0;
  155. border-radius: 0;
  156. margin: 0;
  157. }
  158. .navbar-md{
  159. min-height: @app-header-md-height;
  160. .navbar-btn{
  161. margin-top: 13px;
  162. }
  163. .navbar-form{
  164. margin-top: 15px;
  165. }
  166. .navbar-nav > li > a{
  167. padding-top: 20px;
  168. padding-bottom: 20px;
  169. }
  170. .navbar-brand{
  171. line-height: 60px;
  172. }
  173. }
  174. .navbar-header{
  175. > button{
  176. text-decoration: none;
  177. line-height: 30px;
  178. font-size: 16px;
  179. padding: 10px 17px;
  180. border: none;
  181. background-color: transparent;
  182. }
  183. }
  184. .navbar-brand{
  185. float: none;
  186. text-align: center;
  187. font-size: 20px;
  188. font-weight: 700;
  189. height: auto;
  190. line-height: @app-header-height;
  191. display: inline-block;
  192. padding: 0 20px;
  193. &:hover{
  194. text-decoration: none;
  195. }
  196. img{
  197. max-height: 20px;
  198. margin-top: -4px;
  199. vertical-align: middle;
  200. }
  201. }
  202. @media (min-width: 768px) {
  203. .app-aside,
  204. .navbar-header {
  205. width: @app-aside-width;
  206. }
  207. .navbar-collapse,
  208. .app-content,
  209. .app-footer{
  210. margin-left: @app-aside-width;
  211. }
  212. .app-aside-right{
  213. position: absolute;
  214. top: @app-header-height;
  215. bottom: 0;
  216. right: 0;
  217. z-index: 1000;
  218. &.pos-fix{
  219. z-index: 1010;
  220. }
  221. }
  222. .visible-folded{display: none;}
  223. .app-aside-folded{
  224. .hidden-folded{
  225. display: none !important;
  226. }
  227. .visible-folded{
  228. display: inherit;
  229. }
  230. .text-center-folded{
  231. text-align: center;
  232. }
  233. .pull-none-folded{
  234. float: none !important;
  235. }
  236. .w-auto-folded{
  237. width: auto;
  238. }
  239. .app-aside,
  240. .navbar-header {
  241. width: @app-aside-folded-width;
  242. }
  243. .navbar-collapse,
  244. .app-content,
  245. .app-footer{
  246. margin-left: @app-aside-folded-width;
  247. }
  248. .app-header{
  249. .navbar-brand{
  250. display: block;
  251. padding: 0;
  252. }
  253. }
  254. }
  255. .app-aside-fixed{
  256. .app-header{
  257. .navbar-header{
  258. position: fixed;
  259. }
  260. }
  261. .aside-wrap{
  262. position: fixed;
  263. overflow: hidden;
  264. top: @app-header-height;
  265. bottom: 0;
  266. left: 0;
  267. width: @app-aside-width;
  268. z-index: 1000;
  269. .navi-wrap{
  270. width: @app-aside-width + @scroll-bar-width;
  271. position: relative;
  272. height: 100%;
  273. overflow-x:hidden;
  274. overflow-y: scroll;
  275. -webkit-overflow-scrolling: touch;
  276. &::-webkit-scrollbar {
  277. -webkit-appearance: none;
  278. }
  279. &::-webkit-scrollbar:vertical {
  280. width: @scroll-bar-width;
  281. }
  282. }
  283. .smart & .navi-wrap{
  284. width: @app-aside-width;
  285. }
  286. }
  287. &.app-aside-folded{
  288. .app-aside{
  289. position: fixed;
  290. top: 0;
  291. bottom: 0;
  292. z-index: 1010;
  293. }
  294. .aside-wrap{
  295. width: @app-aside-folded-width;
  296. .navi-wrap{
  297. width: @app-aside-folded-width + @scroll-bar-width;
  298. }
  299. .smart & .navi-wrap{
  300. width: @app-aside-folded-width;
  301. }
  302. }
  303. }
  304. }
  305. .bg-auto{
  306. &:before{
  307. content: "";
  308. position: absolute;
  309. width: inherit;
  310. top: 0;
  311. bottom: 0;
  312. z-index: -1;
  313. background-color: inherit;
  314. border: inherit;
  315. }
  316. &.b-l:before{
  317. margin-left: -1px;
  318. }
  319. &.b-r:before{
  320. margin-right: -1px;
  321. }
  322. }
  323. .col.show{
  324. display: table-cell !important;
  325. }
  326. }
  327. // sm
  328. @media (min-width: 768px) and (max-width: 991px) {
  329. .hbox-auto-sm{
  330. display: block;
  331. > .col{
  332. width: auto;
  333. height: auto;
  334. display: block;
  335. &.show{
  336. display: block !important;
  337. }
  338. }
  339. }
  340. }
  341. // xs
  342. @media (max-width: 767px) {
  343. .app-aside{
  344. float: none;
  345. }
  346. .app-content-full{
  347. width: 100% !important;
  348. }
  349. .hbox-auto-xs{
  350. display: block;
  351. > .col{
  352. width: auto;
  353. height: auto;
  354. display: block;
  355. }
  356. }
  357. .navbar-nav{
  358. margin-top: 0;
  359. margin-bottom: 0;
  360. > li > a{
  361. box-shadow:0 -1px 0 rgba(0,0,0,0.1);
  362. .up{
  363. top: 0;
  364. }
  365. .avatar{
  366. width: 30px;
  367. margin-top: -5px;
  368. }
  369. }
  370. .open .dropdown-menu{
  371. background-color: #fff;
  372. }
  373. }
  374. .navbar-form{
  375. box-shadow:0 -1px 0 rgba(0,0,0,0.1);
  376. margin-top: 0 !important;
  377. margin-bottom: 0 !important;
  378. .form-group{
  379. margin-bottom: 0;
  380. }
  381. }
  382. }