frontend.less 10 KB

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