frontend.less 17 KB

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