frontend.less 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950
  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. @import "tinycss.less";
  18. @primary-color: #007bff;
  19. //@primary-color: #2d76d9;
  20. @input-min-height: 33px;
  21. .clearfix() {
  22. &:before,
  23. &:after {
  24. content: " ";
  25. display: table;
  26. }
  27. &:after {
  28. clear: both;
  29. }
  30. }
  31. html,
  32. body {
  33. height: 100%;
  34. }
  35. body {
  36. padding-top: 60px;
  37. font-size: 14px;
  38. background: #f4f6f8;
  39. height: 100%;
  40. line-height: 1.5715;
  41. -webkit-font-smoothing: antialiased;
  42. text-rendering: optimizeLegibility;
  43. -moz-osx-font-smoothing: grayscale;
  44. font-feature-settings: 'liga';
  45. -webkit-text-size-adjust: 100%;
  46. font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica Neue, Helvetica, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Source Han Sans CN, sans-serif;
  47. font-weight: 400;
  48. color: #616161;
  49. }
  50. a {
  51. color: @primary-color;
  52. &:hover, &:focus {
  53. color: @primary-color;
  54. }
  55. }
  56. .navbar-white {
  57. background-color: #fff;
  58. border-color: #fff;
  59. box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
  60. .dropdown-menu {
  61. border-radius: 5px;
  62. //box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
  63. .box-shadow(0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1));
  64. }
  65. }
  66. @media (min-width: 768px) {
  67. .navbar-default {
  68. .navbar-brand {
  69. height: 60px;
  70. line-height: 27px;
  71. }
  72. .navbar-nav {
  73. > li > a {
  74. height: 60px;
  75. line-height: 27px;
  76. }
  77. }
  78. }
  79. .navbar-white .navbar-nav {
  80. > li > a {
  81. height: 60px;
  82. line-height: 27px;
  83. color: #555;
  84. &:hover, &:focus {
  85. color: @primary-color;
  86. }
  87. }
  88. > .active > a {
  89. &, &:hover, &:focus {
  90. background-color: inherit;
  91. color: @primary-color;
  92. }
  93. }
  94. }
  95. }
  96. @media (max-width: 768px) {
  97. body {
  98. padding-top: 50px;
  99. }
  100. .navbar-white {
  101. .navbar-nav .open .dropdown-menu {
  102. background: #eee;
  103. }
  104. .navbar-toggle {
  105. border-color: #ddd;
  106. .icon-bar {
  107. background-color: #888;
  108. }
  109. }
  110. .navbar-collapse.in {
  111. border-top-color: #f5f5f5;
  112. }
  113. }
  114. }
  115. #header-navbar {
  116. .dropdown:hover .dropdown-menu {
  117. display: block;
  118. margin-top: 0;
  119. }
  120. li.dropdown ul.dropdown-menu {
  121. min-width: 100px;
  122. }
  123. }
  124. .navbar {
  125. border: none;
  126. }
  127. .navbar-nav {
  128. > li > a {
  129. font-size: 14px;
  130. }
  131. }
  132. .dropdown-menu {
  133. > li > a {
  134. font-size: 14px;
  135. padding: 5px 20px;
  136. }
  137. }
  138. .dropdown-menu {
  139. border-radius: 2px;
  140. border: 0px;
  141. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  142. padding: 5px 0px;
  143. li a {
  144. padding-top: 10px !important;
  145. padding-bottom: 10px;
  146. }
  147. }
  148. .dropdown-menu > li > a {
  149. font-weight: 400;
  150. color: #444;
  151. padding: 5px 15px;
  152. padding-bottom: 10px;
  153. &:hover, &:focus {
  154. text-decoration: none;
  155. color: #777;
  156. background: rgba(0, 0, 0, 0.05);
  157. }
  158. }
  159. .toast-top-center {
  160. top: 60px;
  161. }
  162. #toast-container > div {
  163. .box-shadow(none);
  164. }
  165. /*修复nice-validator和summernote的编辑框冲突*/
  166. .nice-validator .note-editor .note-editing-area .note-editable {
  167. display: inherit;
  168. }
  169. /*预览区域*/
  170. .plupload-preview, .faupload-preview {
  171. padding: 0 10px;
  172. margin-bottom: 0;
  173. li {
  174. margin-top: 10px;
  175. }
  176. .thumbnail {
  177. margin-bottom: 10px;
  178. }
  179. a {
  180. display: block;
  181. &:first-child {
  182. height: 90px;
  183. }
  184. img {
  185. height: 80px;
  186. object-fit: cover;
  187. }
  188. }
  189. }
  190. .layui-layer-content {
  191. clear: both;
  192. }
  193. .layui-layer-fast {
  194. .layui-layer-content {
  195. > table.table {
  196. margin-bottom: 0;
  197. }
  198. }
  199. .layui-layer-confirm {
  200. display: none;
  201. position: absolute;
  202. width: 100%;
  203. height: 100%;
  204. left: 0;
  205. bottom: 0;
  206. border: 1px solid transparent;
  207. background: transparent;
  208. color: transparent;
  209. &:focus {
  210. border: 1px solid #444c69;
  211. .border-radius(2px);
  212. }
  213. &:focus-visible {
  214. outline: 0;
  215. }
  216. }
  217. }
  218. .layui-layer-fast-msg {
  219. min-width: 100px;
  220. border-radius: 2px;
  221. }
  222. .input-group > .msg-box.n-right {
  223. position: absolute;
  224. }
  225. .bootstrap-select {
  226. .status {
  227. background: #f0f0f0;
  228. clear: both;
  229. color: #999;
  230. font-size: 12px;
  231. font-weight: 500;
  232. line-height: 1;
  233. margin-bottom: -5px;
  234. padding: 10px 20px;
  235. }
  236. .msg-box {
  237. position: absolute;
  238. right: 0;
  239. top: 0;
  240. }
  241. .bs-placeholder {
  242. min-height: @input-min-height;
  243. }
  244. min-height: @input-min-height;
  245. }
  246. select.bs-select-hidden, select.selectpicker {
  247. display: inherit !important;
  248. max-height: @input-min-height;
  249. overflow: hidden;
  250. &[multiple] {
  251. height: 31px;
  252. //visibility: hidden;
  253. padding: 0;
  254. background: #f4f4f4;
  255. option {
  256. color: #f4f4f4;
  257. .opacity(0);
  258. }
  259. @media not all and (min-resolution: .001dpcm) {
  260. @supports (-webkit-appearance:none) {
  261. visibility: hidden;
  262. }
  263. }
  264. }
  265. }
  266. input.selectpage {
  267. color: transparent;
  268. pointer-events: none;
  269. }
  270. .sp_container {
  271. input.selectpage {
  272. color: inherit;
  273. pointer-events: inherit;
  274. padding-left: 12px;
  275. padding-right: 12px;
  276. }
  277. .sp_element_box {
  278. input.selectpage {
  279. padding-left: 0;
  280. padding-right: 0;
  281. }
  282. li:first-child {
  283. input.selectpage {
  284. padding-left: 9px;
  285. padding-right: 9px;
  286. }
  287. }
  288. }
  289. min-height: @input-min-height;
  290. }
  291. /*修复radio和checkbox样式对齐*/
  292. .radio, .checkbox {
  293. > label {
  294. margin-right: 10px;
  295. > input {
  296. margin: 5px 0 0;
  297. }
  298. }
  299. }
  300. form.form-horizontal .control-label {
  301. font-weight: normal;
  302. }
  303. .panel-default {
  304. padding: 0 15px;
  305. border: none;
  306. .box-shadow(none);
  307. > .panel-heading {
  308. position: relative;
  309. font-size: 16px;
  310. padding: 15px 0;
  311. background: #fff;
  312. border-bottom: 1px solid #f5f5f5;
  313. }
  314. h2.page-header {
  315. margin-top: 0;
  316. height: 50px;
  317. line-height: 31px;
  318. font-size: 18px;
  319. padding: 10px 0;
  320. border-bottom: 1px solid #f5f5f5;
  321. }
  322. > .panel-heading {
  323. .panel-title {
  324. color: #313131;
  325. > i {
  326. display: none;
  327. }
  328. }
  329. .more {
  330. position: absolute;
  331. top: 13px;
  332. right: 0;
  333. display: block;
  334. color: #919191;
  335. .transition(all 0.3s ease);
  336. }
  337. .more:hover {
  338. color: #616161;
  339. .transition(all 0.3s ease);
  340. }
  341. .panel-bar {
  342. position: absolute;
  343. top: 7px;
  344. right: 0;
  345. display: block;
  346. }
  347. }
  348. }
  349. @media (max-width: 767px) {
  350. .panel-default {
  351. padding: 0 10px;
  352. > .panel-heading {
  353. padding: 10px 0;
  354. .more {
  355. top: 8px;
  356. }
  357. }
  358. }
  359. > .panel-body {
  360. position: relative;
  361. padding: 15px 0;
  362. }
  363. > .panel-footer {
  364. padding: 15px 0;
  365. background: none;
  366. }
  367. }
  368. .panel-gray {
  369. .box-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  370. > .panel-heading {
  371. background-color: #f5f5f5;
  372. color: #919191;
  373. }
  374. > .panel-body {
  375. color: #919191;
  376. background: #fff;
  377. border-bottom-left-radius: 4px;
  378. border-bottom-right-radius: 4px;
  379. }
  380. }
  381. .panel-page {
  382. padding: 45px 50px 50px;
  383. min-height: 500px;
  384. .panel-heading {
  385. background: transparent;
  386. border-bottom: none;
  387. margin: 0 0 30px 0;
  388. padding: 0;
  389. h2 {
  390. font-size: 25px;
  391. margin-top: 0;
  392. }
  393. }
  394. }
  395. @media (max-width: 767px) {
  396. .panel-page {
  397. padding: 15px;
  398. min-height: 300px;
  399. }
  400. }
  401. .nav-pills > li {
  402. margin-right: 5px;
  403. > a {
  404. padding: 10px 15px;
  405. color: #616161;
  406. .transition(all 0.3s ease);
  407. &:hover {
  408. .transition(all 0.3s ease);
  409. background-color: #f5f5f5;
  410. }
  411. }
  412. &.active > a {
  413. border: none;
  414. color: #fff;
  415. background: @primary-color;
  416. .transition(all 0.3s ease);
  417. border-radius: 3px;
  418. }
  419. }
  420. .nav-pills.nav-pills-sm > li > a {
  421. font-size: 12px;
  422. line-height: 1.5;
  423. padding: 4px 13px;
  424. }
  425. .fieldlist dd {
  426. display: block;
  427. margin: 5px 0;
  428. input {
  429. display: inline-block;
  430. width: 300px;
  431. }
  432. input:first-child {
  433. width: 110px;
  434. }
  435. ins {
  436. width: 110px;
  437. display: inline-block;
  438. text-decoration: none;
  439. }
  440. }
  441. /* 弹窗中的表单 */
  442. .form-layer {
  443. height: 100%;
  444. min-height: 150px;
  445. min-width: 300px;
  446. .form-body {
  447. width: 100%;
  448. overflow: auto;
  449. top: 0;
  450. position: absolute;
  451. z-index: 10;
  452. bottom: 50px;
  453. padding: 15px;
  454. }
  455. .form-footer {
  456. height: 50px;
  457. line-height: 50px;
  458. background-color: #ecf0f1;
  459. width: 100%;
  460. position: absolute;
  461. z-index: 200;
  462. bottom: 0;
  463. margin: 0;
  464. }
  465. .form-footer .form-group {
  466. margin-left: 0;
  467. margin-right: 0;
  468. }
  469. }
  470. footer.footer {
  471. width: 100%;
  472. color: #aaa;
  473. background: #555;
  474. margin-top: 25px;
  475. .copyright {
  476. line-height: 50px;
  477. text-align: center;
  478. background: #393939;
  479. margin: 0;
  480. a {
  481. color: #aaa;
  482. &:hover {
  483. color: #fff;
  484. }
  485. }
  486. }
  487. }
  488. .rotate {
  489. .transition-duration(0.8s);
  490. .transition-property(transform);
  491. overflow: hidden;
  492. &:hover {
  493. .transform(rotate(360deg));
  494. }
  495. }
  496. .user-section {
  497. background: #fff;
  498. padding: 15px;
  499. margin-bottom: 20px;
  500. .border-radius(4px);
  501. }
  502. .login-section {
  503. margin: 50px auto;
  504. width: 460px;
  505. .border-radius(0);
  506. &.login-section-weixin {
  507. min-height: 315px;
  508. }
  509. .logon-tab {
  510. margin: -15px -15px 0 -15px;
  511. > a {
  512. display: block;
  513. padding: 20px;
  514. float: left;
  515. width: 50%;
  516. font-size: 16px;
  517. text-align: center;
  518. color: #616161;
  519. background-color: #efefef;
  520. .transition(all 0.3s ease);
  521. &:hover {
  522. background-color: #fafafa;
  523. .transition(all 0.3s ease);
  524. }
  525. &.active {
  526. background-color: #fff;
  527. .transition(all 0.3s ease);
  528. }
  529. }
  530. }
  531. .login-main {
  532. padding: 40px 45px 20px 45px;
  533. }
  534. }
  535. .login-section, .form-section {
  536. .n-bootstrap {
  537. .controls {
  538. position: relative;
  539. }
  540. .input-group {
  541. position: inherit;
  542. }
  543. .n-right {
  544. margin-top: 0;
  545. top: -20px;
  546. position: absolute;
  547. left: 0;
  548. text-align: right;
  549. width: 100%;
  550. .msg-wrap {
  551. position: relative;
  552. }
  553. }
  554. }
  555. }
  556. main.content {
  557. width: 100%;
  558. overflow: auto;
  559. padding: 15px;
  560. padding-top: 20px;
  561. min-height: calc(~ '100vh - 135px');
  562. }
  563. .sidenav {
  564. padding: 20px 0 10px 0;
  565. margin-bottom: 20px;
  566. background-color: #fff;
  567. .list-group {
  568. &:last-child {
  569. margin-bottom: 0;
  570. }
  571. .list-group-heading {
  572. list-style-type: none;
  573. color: #919191;
  574. margin-bottom: 10px;
  575. margin-left: 35px;
  576. font-size: 14px;
  577. }
  578. .list-group-item {
  579. .border-radius(0);
  580. border: none;
  581. padding: 0;
  582. border-left: 2px solid transparent;
  583. &:last-child, &:first-child {
  584. .border-radius(0);
  585. }
  586. &:hover {
  587. border-left: 2px solid rgba(245, 245, 245, 0.38);
  588. background-color: rgba(245, 245, 245, 0.38);
  589. }
  590. > a {
  591. display: block;
  592. color: #616161;
  593. padding: 10px 15px 10px 35px;
  594. }
  595. &.active {
  596. border-left: 2px solid @primary-color;
  597. background-color: rgba(245, 245, 245, 0.38);
  598. > a {
  599. color: @primary-color;
  600. }
  601. }
  602. }
  603. }
  604. }
  605. .nav li {
  606. .avatar-text, .avatar-img {
  607. height: 30px;
  608. width: 30px;
  609. line-height: 30px;
  610. font-size: 14px;
  611. }
  612. .avatar-img {
  613. font-size: 0;
  614. img {
  615. border-radius: 30px;
  616. width: 30px;
  617. height: 30px;
  618. }
  619. }
  620. }
  621. .avatar-text, .avatar-img {
  622. display: inline-block;
  623. box-sizing: content-box;
  624. color: #fff;
  625. text-align: center;
  626. vertical-align: top;
  627. background-color: #e8ecf3;
  628. font-weight: normal;
  629. width: 48px;
  630. height: 48px;
  631. border-radius: 48px;
  632. font-size: 24px;
  633. line-height: 48px;
  634. }
  635. .avatar-img {
  636. font-size: 0;
  637. img {
  638. border-radius: 48px;
  639. width: 48px;
  640. height: 48px;
  641. }
  642. }
  643. @media (max-width: 767px) {
  644. main.content {
  645. position: inherit;
  646. padding: 15px 0;
  647. }
  648. .login-section {
  649. width: 100%;
  650. margin: 20px auto;
  651. .login-main {
  652. padding: 20px 0 0 0;
  653. }
  654. }
  655. footer.footer {
  656. position: inherit;
  657. .copyright {
  658. padding: 10px;
  659. line-height: 30px;
  660. }
  661. }
  662. }
  663. .pager {
  664. .pagination {
  665. margin: 0;
  666. }
  667. li {
  668. margin: 0 .4em;
  669. display: inline-block;
  670. &:first-child, &:last-child {
  671. > a, > span {
  672. padding: .5em 1.2em;
  673. }
  674. }
  675. }
  676. }
  677. .pager li > a, .pager li > span {
  678. background: none;
  679. border: 1px solid #e6e6e6;
  680. border-radius: 0.25em;
  681. padding: .5em .93em;
  682. font-size: 14px;
  683. }
  684. .jumpto input {
  685. width: 50px;
  686. margin-left: 5px;
  687. margin-right: 5px;
  688. text-align: center;
  689. display: inline-block;
  690. }
  691. .fixed-columns, .fixed-columns-right {
  692. position: absolute;
  693. top: 0;
  694. height: 100%;
  695. min-height: 41px;
  696. background-color: #fff;
  697. box-sizing: border-box;
  698. z-index: 2;
  699. box-shadow: 0 -1px 8px rgba(0, 0, 0, .08);
  700. .fixed-table-body {
  701. min-height: 41px;
  702. overflow-x: hidden !important
  703. }
  704. }
  705. .fixed-columns {
  706. left: 0;
  707. }
  708. .fixed-columns-right {
  709. right: 0;
  710. box-shadow: -1px 0 8px rgba(0, 0, 0, .08);
  711. }
  712. .bootstrap-tagsinput {
  713. background-color: #fff;
  714. border: 1px solid #ccc;
  715. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  716. display: inline-block;
  717. padding: 4px 6px;
  718. //margin-bottom: 10px;
  719. color: #555;
  720. vertical-align: middle;
  721. //border-radius: 4px;
  722. //max-width: 100%;
  723. width: 100%;
  724. line-height: 22px;
  725. cursor: text;
  726. input {
  727. border: none;
  728. box-shadow: none;
  729. outline: none;
  730. background-color: transparent;
  731. padding: 0;
  732. margin: 0;
  733. font-size: 13px;
  734. //width: auto !important;
  735. width: 80px;
  736. max-width: inherit;
  737. &:focus {
  738. border: none;
  739. box-shadow: none;
  740. }
  741. }
  742. .tagsinput-text {
  743. display: inline-block;
  744. overflow: auto;
  745. visibility: hidden;
  746. height: 1px;
  747. position: absolute;
  748. bottom: -1px;
  749. left: 0;
  750. }
  751. .tag {
  752. margin-right: 2px;
  753. color: white;
  754. [data-role="remove"] {
  755. margin-left: 5px;
  756. cursor: pointer;
  757. &:after {
  758. content: "x";
  759. padding: 0px 2px;
  760. }
  761. &:hover {
  762. background-color: rgba(255, 255, 255, .16);
  763. }
  764. }
  765. }
  766. }
  767. .autocomplete-suggestions {
  768. border-radius: 2px;
  769. background: #FFF;
  770. overflow: auto;
  771. min-width: 200px;
  772. .box-shadow(0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1));
  773. strong {
  774. font-weight: normal;
  775. color: red;
  776. }
  777. .autocomplete-suggestion {
  778. padding: 5px 10px;
  779. white-space: nowrap;
  780. overflow: hidden;
  781. }
  782. .autocomplete-selected {
  783. background: #F0F0F0;
  784. }
  785. .autocomplete-group {
  786. padding: 5px 10px;
  787. strong {
  788. display: block;
  789. border-bottom: 1px solid #ddd;
  790. }
  791. }
  792. }