frontend.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. @import (reference) "bootstrap-less/mixins.less";
  2. @import (reference) "bootstrap-less/variables.less";
  3. @import "lesshat.less";
  4. @import url("../css/bootstrap.css");
  5. @import url("../css/fastadmin.css");
  6. @import url("../css/iconfont.css");
  7. @import url("../libs/font-awesome/css/font-awesome.min.css");
  8. @import url("../libs/toastr/toastr.min.css");
  9. @import url("../libs/fastadmin-layer/dist/theme/default/layer.css");
  10. @import url("../libs/bootstrap-table/dist/bootstrap-table.min.css");
  11. @import url("../libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css");
  12. @import url("../libs/bootstrap-daterangepicker/daterangepicker.css");
  13. @import url("../libs/nice-validator/dist/jquery.validator.css");
  14. @import url("../libs/bootstrap-select/dist/css/bootstrap-select.min.css");
  15. @import url("../libs/fastadmin-selectpage/selectpage.css");
  16. @import url("../libs/bootstrap-slider/slider.css");
  17. .clearfix() {
  18. &:before,
  19. &:after {
  20. content: " ";
  21. display: table;
  22. }
  23. &:after {
  24. clear: both;
  25. }
  26. }
  27. html,
  28. body {
  29. height: 100%;
  30. }
  31. body {
  32. padding-top: 50px;
  33. font-size:13px;
  34. background:#f4f6f8;
  35. }
  36. .dropdown:hover .dropdown-menu {
  37. display: block;
  38. margin-top: 0;
  39. }
  40. .navbar {
  41. border:none;
  42. }
  43. .navbar-nav {
  44. > li > a {
  45. font-size:14px;
  46. }
  47. }
  48. .dropdown-menu {
  49. > li > a {
  50. font-size: 13px;
  51. padding: 5px 20px;
  52. }
  53. }
  54. .toast-top-center{
  55. top:50px;
  56. }
  57. #toast-container > div{
  58. .box-shadow(none);
  59. }
  60. /*修复nice-validator和summernote的编辑框冲突*/
  61. .nice-validator .note-editor .note-editing-area .note-editable{
  62. display:inherit;
  63. }
  64. /*预览区域*/
  65. .plupload-preview,.faupload-preview {
  66. padding:0 10px;
  67. margin-bottom:0;
  68. li {
  69. margin-top:10px;
  70. }
  71. .thumbnail {
  72. margin-bottom:10px;
  73. }
  74. a{
  75. display:block;
  76. &:first-child{
  77. height:90px;
  78. }
  79. img{
  80. height:80px;
  81. object-fit: cover;
  82. }
  83. }
  84. }
  85. .layui-layer-content {
  86. clear: both;
  87. }
  88. .layui-layer-fast-msg {
  89. min-width: 100px;
  90. border-radius: 2px;
  91. }
  92. .input-group > .msg-box.n-right {
  93. position: absolute;
  94. }
  95. .bootstrap-select .status {
  96. background: #f0f0f0;
  97. clear: both;
  98. color: #999;
  99. font-size: 12px;
  100. font-weight: 500;
  101. line-height: 1;
  102. margin-bottom: -5px;
  103. padding: 10px 20px;
  104. }
  105. select.bs-select-hidden, select.selectpicker {
  106. display: inherit !important;
  107. max-height: 31px;
  108. overflow: hidden;
  109. &[multiple] {
  110. height: 31px;
  111. //visibility: hidden;
  112. padding: 0;
  113. background: #f4f4f4;
  114. option {
  115. color: #f4f4f4;
  116. .opacity(0);
  117. }
  118. @media not all and (min-resolution: .001dpcm) {
  119. @supports (-webkit-appearance:none) {
  120. visibility: hidden;
  121. }
  122. }
  123. }
  124. }
  125. input.selectpage {
  126. color: transparent;
  127. pointer-events: none;
  128. }
  129. .sp_container {
  130. input.selectpage {
  131. color: inherit;
  132. pointer-events: inherit;
  133. padding-left: 12px;
  134. padding-right: 12px;
  135. }
  136. .sp_element_box {
  137. input.selectpage {
  138. padding-left: 0;
  139. padding-right: 0;
  140. }
  141. li:first-child {
  142. input.selectpage {
  143. padding-left: 9px;
  144. padding-right: 9px;
  145. }
  146. }
  147. }
  148. }
  149. /*修复radio和checkbox样式对齐*/
  150. .radio, .checkbox {
  151. > label {
  152. margin-right: 10px;
  153. > input {
  154. margin: 2px 0 0;
  155. }
  156. }
  157. }
  158. #header-navbar li.dropdown ul.dropdown-menu {
  159. min-width:94px;
  160. }
  161. form.form-horizontal .control-label {
  162. font-weight: normal;
  163. }
  164. .panel-default {
  165. padding: 0 15px;
  166. border: none;
  167. .box-shadow(none);
  168. > .panel-heading {
  169. position: relative;
  170. font-size: 16px;
  171. padding: 15px 0;
  172. background: #fff;
  173. border-bottom: 1px solid #f5f5f5;
  174. }
  175. h2.page-header {
  176. margin-top:0;
  177. height:50px;
  178. line-height:31px;
  179. font-size:18px;
  180. padding:10px 0;
  181. border-bottom: 1px solid #f5f5f5;
  182. }
  183. > .panel-heading {
  184. .panel-title {
  185. color: #313131;
  186. > i {
  187. display: none;
  188. }
  189. }
  190. .more {
  191. position: absolute;
  192. top: 13px;
  193. right: 0;
  194. display: block;
  195. color: #919191;
  196. .transition(all 0.3s ease);
  197. }
  198. .more:hover {
  199. color: #616161;
  200. .transition(all 0.3s ease);
  201. }
  202. .panel-bar {
  203. position: absolute;
  204. top: 7px;
  205. right: 0;
  206. display: block;
  207. }
  208. }
  209. }
  210. @media (max-width: 767px) {
  211. .panel-default {
  212. padding: 0 10px;
  213. > .panel-heading {
  214. padding: 10px 0;
  215. .more {
  216. top: 8px;
  217. }
  218. }
  219. }
  220. > .panel-body {
  221. position: relative;
  222. padding: 15px 0;
  223. }
  224. > .panel-footer {
  225. padding: 15px 0;
  226. background: none;
  227. }
  228. }
  229. .panel-gray {
  230. .box-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  231. > .panel-heading {
  232. background-color: #f5f5f5;
  233. color: #919191;
  234. }
  235. > .panel-body {
  236. color: #919191;
  237. background: #fff;
  238. border-bottom-left-radius: 4px;
  239. border-bottom-right-radius: 4px;
  240. }
  241. }
  242. .panel-page {
  243. padding: 45px 50px 50px;
  244. min-height: 500px;
  245. .panel-heading {
  246. background: transparent;
  247. border-bottom: none;
  248. margin: 0 0 30px 0;
  249. padding: 0;
  250. h2 {
  251. font-size: 25px;
  252. margin-top: 0;
  253. }
  254. }
  255. }
  256. @media (max-width: 767px) {
  257. .panel-page {
  258. padding: 15px;
  259. min-height: 300px;
  260. }
  261. }
  262. .nav-pills > li {
  263. margin-right: 5px;
  264. > a {
  265. padding: 10px 15px;
  266. color: #616161;
  267. .transition(all 0.3s ease);
  268. &:hover {
  269. .transition(all 0.3s ease);
  270. background-color: #f5f5f5;
  271. }
  272. }
  273. &.active > a {
  274. border:none;
  275. color: #fff;
  276. background: #46c37b;
  277. .transition(all 0.3s ease);
  278. border-radius: 3px;
  279. }
  280. }
  281. .nav-pills.nav-pills-sm > li > a {
  282. font-size: 12px;
  283. line-height: 1.5;
  284. padding: 4px 13px;
  285. }
  286. .fieldlist dd {
  287. display: block;
  288. margin: 5px 0;
  289. input {
  290. display: inline-block;
  291. width: 300px;
  292. }
  293. input:first-child {
  294. width: 110px;
  295. }
  296. ins {
  297. width: 110px;
  298. display: inline-block;
  299. text-decoration: none;
  300. font-weight: bold;
  301. }
  302. }
  303. /* 弹窗中的表单 */
  304. .form-layer {
  305. height:100%;min-height:150px;min-width:300px;
  306. .form-body {
  307. width:100%;
  308. overflow:auto;
  309. top:0;
  310. position:absolute;
  311. z-index:10;
  312. bottom:50px;
  313. padding:15px;
  314. }
  315. .form-footer {
  316. height:50px;
  317. line-height:50px;
  318. background-color: #ecf0f1;
  319. width:100%;
  320. position:absolute;
  321. z-index:200;
  322. bottom:0;
  323. margin:0;
  324. }
  325. .form-footer .form-group{
  326. margin-left:0;
  327. margin-right:0;
  328. }
  329. }
  330. footer.footer{
  331. width:100%;color: #aaa;background: #555;margin-top:25px;
  332. .copyright{
  333. line-height: 50px;text-align: center;background: #393939;margin:0;
  334. a{
  335. color: #aaa;
  336. &:hover{color: #fff;}
  337. }
  338. }
  339. }
  340. .rotate{
  341. .transition-duration(0.8s);
  342. .transition-property(transform);
  343. overflow:hidden;
  344. &:hover{
  345. .transform(rotate(360deg));
  346. }
  347. }
  348. .user-section {
  349. background: #fff;
  350. padding: 15px;
  351. margin-bottom: 20px;
  352. .border-radius(4px);
  353. }
  354. .login-section {
  355. margin: 50px auto;
  356. width: 460px;
  357. .border-radius(0);
  358. &.login-section-weixin {
  359. min-height: 315px;
  360. }
  361. .logon-tab {
  362. margin: -15px -15px 0 -15px;
  363. > a {
  364. display: block;
  365. padding: 20px;
  366. float: left;
  367. width: 50%;
  368. font-size: 16px;
  369. text-align: center;
  370. color: #616161;
  371. background-color: #ececec;
  372. .transition(all 0.3s ease);
  373. &:hover {
  374. background-color: #fafafa;
  375. .transition(all 0.3s ease);
  376. }
  377. &.active {
  378. background-color: #fff;
  379. .transition(all 0.3s ease);
  380. }
  381. }
  382. }
  383. .login-main {
  384. padding: 40px 45px 20px 45px;
  385. }
  386. .control-label {
  387. font-size:13px;
  388. }
  389. .n-bootstrap {
  390. .form-group {
  391. position:relative;
  392. }
  393. .input-group {
  394. position: inherit;
  395. }
  396. .n-right {
  397. margin-top:0;
  398. top:0;
  399. position:absolute;
  400. left:0;
  401. text-align:right;
  402. width:100%;
  403. .msg-wrap {
  404. position:relative;
  405. }
  406. }
  407. }
  408. }
  409. main.content {
  410. width:100%;
  411. overflow:auto;
  412. padding:15px;
  413. padding-top:20px;
  414. min-height:calc(~ '100vh - 125px');
  415. }
  416. .sidenav {
  417. padding: 20px 0 10px 0;
  418. margin-bottom: 20px;
  419. background-color: #fff;
  420. .list-group{
  421. &:last-child {
  422. margin-bottom: 0;
  423. }
  424. .list-group-heading {
  425. list-style-type: none;
  426. color: #919191;
  427. margin-bottom: 10px;
  428. margin-left: 35px;
  429. font-size:14px;
  430. }
  431. .list-group-item {
  432. .border-radius(0);
  433. border: none;
  434. padding: 0;
  435. border-left: 2px solid transparent;
  436. &:last-child,&:first-child {
  437. .border-radius(0);
  438. }
  439. &:hover {
  440. border-left: 2px solid rgba(245, 245, 245, 0.38);
  441. background-color: rgba(245, 245, 245, 0.38);
  442. }
  443. > a {
  444. display: block;
  445. color: #616161;
  446. padding: 10px 15px 10px 35px;
  447. }
  448. &.active {
  449. border-left: 2px solid #46c37b;
  450. background-color: rgba(245, 245, 245, 0.38);
  451. > a {
  452. color: #46c37b;
  453. }
  454. }
  455. }
  456. }
  457. }
  458. .nav li{
  459. .avatar-text,.avatar-img {
  460. height:30px;
  461. width:30px;
  462. line-height:30px;
  463. font-size:14px;
  464. }
  465. .avatar-img{
  466. font-size:0;
  467. img{
  468. border-radius:30px;
  469. width:30px;height:30px;
  470. }
  471. }
  472. }
  473. .avatar-text,.avatar-img {
  474. display: inline-block;
  475. box-sizing: content-box;
  476. color: #fff;
  477. text-align: center;
  478. vertical-align: top;
  479. background-color: #e8ecf3;
  480. font-weight: normal;
  481. width: 48px;
  482. height: 48px;
  483. border-radius: 48px;
  484. font-size: 24px;
  485. line-height: 48px;
  486. }
  487. .avatar-img {
  488. font-size:0;
  489. img{
  490. border-radius:48px;
  491. width:48px;height:48px;
  492. }
  493. }
  494. @media (max-width: 767px) {
  495. main.content {
  496. position:inherit;
  497. padding:15px 0;
  498. }
  499. .login-section {
  500. width: 100%;
  501. margin: 20px auto;
  502. .login-main {
  503. padding: 20px 0 0 0;
  504. }
  505. }
  506. footer.footer {
  507. position:inherit;
  508. .copyright{padding:10px;line-height:30px;}
  509. }
  510. }
  511. .pager {
  512. .pagination {
  513. margin: 0;
  514. }
  515. li {
  516. margin: 0 .4em;
  517. display: inline-block;
  518. &:first-child, &:last-child {
  519. > a, > span {
  520. padding: .5em 1.2em;
  521. }
  522. }
  523. }
  524. }
  525. .pager li > a, .pager li > span {
  526. background: none;
  527. border: 1px solid #e6e6e6;
  528. border-radius: 0.25em;
  529. padding: .5em .93em;
  530. font-size: 14px;
  531. }
  532. .jumpto input {
  533. height: 31px;
  534. width: 50px;
  535. margin-left: 5px;
  536. margin-right: 5px;
  537. text-align: center;
  538. display: inline-block;
  539. }