frontend.less 12 KB

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