index.less 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. @import '~antd/lib/style/themes/default.less';
  2. @import '../../../src/themeColor.less';
  3. @pro-header-hover-bg: rgba(0, 0, 0, 0.025);
  4. .header {
  5. height: 50px;
  6. padding: 0;
  7. background: @theme-linear;
  8. box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  9. position: relative;
  10. .header_logo {
  11. width: 108px;
  12. margin-left: 10px;
  13. margin-right: 10px;
  14. display: inline-block;
  15. text-align: center;
  16. img {
  17. max-height: 50px;
  18. max-width: 100%;
  19. margin-top: -6px;
  20. }
  21. }
  22. }
  23. .logo {
  24. height: @layout-header-height;
  25. line-height: @layout-header-height;
  26. vertical-align: top;
  27. display: inline-block;
  28. padding: 0 0 0 24px;
  29. cursor: pointer;
  30. font-size: 20px;
  31. img {
  32. display: inline-block;
  33. vertical-align: middle;
  34. }
  35. }
  36. .menu {
  37. :global(.anticon) {
  38. margin-right: 8px;
  39. }
  40. :global(.ant-dropdown-menu-item) {
  41. min-width: 160px;
  42. }
  43. }
  44. .trigger {
  45. font-size: 20px;
  46. height: 50px;
  47. cursor: pointer;
  48. transition: all 0.3s, padding 0s;
  49. padding: ~'calc(30 / 2)' 24px;
  50. display: inline-block;
  51. &:hover {
  52. background: @pro-header-hover-bg;
  53. }
  54. }
  55. .right {
  56. display: flex;
  57. justify-content: center;
  58. align-items: center;
  59. float: right;
  60. height: 100%;
  61. padding-right: 20px;
  62. overflow: hidden;
  63. .action {
  64. cursor: pointer;
  65. padding: 0 12px;
  66. display: inline-block;
  67. transition: all 0.3s;
  68. height: 100%;
  69. > i {
  70. vertical-align: middle;
  71. color: @text-color;
  72. }
  73. &:hover {
  74. background: @pro-header-hover-bg;
  75. }
  76. &:global(.opened) {
  77. background: @pro-header-hover-bg;
  78. }
  79. }
  80. .search {
  81. padding: 0 12px;
  82. &:hover {
  83. background: transparent;
  84. }
  85. }
  86. .account {
  87. .avatar {
  88. margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
  89. margin-right: 8px;
  90. color: @primary-color;
  91. background: rgba(255, 255, 255, 0.85);
  92. vertical-align: top;
  93. }
  94. }
  95. }
  96. .dark {
  97. height: @layout-header-height;
  98. .action {
  99. color: rgba(255, 255, 255, 0.85);
  100. > i {
  101. color: rgba(255, 255, 255, 0.85);
  102. }
  103. &:hover,
  104. &:global(.opened) {
  105. background: @primary-color;
  106. }
  107. :global(.ant-badge) {
  108. color: rgba(255, 255, 255, 0.85);
  109. }
  110. }
  111. }
  112. @media only screen and (max-width: @screen-md) {
  113. .header {
  114. :global(.ant-divider-vertical) {
  115. vertical-align: unset;
  116. }
  117. .name {
  118. display: none;
  119. color: #fff;
  120. }
  121. i.trigger {
  122. padding: 22px 12px;
  123. }
  124. .logo {
  125. padding-left: 12px;
  126. padding-right: 12px;
  127. position: relative;
  128. }
  129. .right {
  130. position: absolute;
  131. right: 12px;
  132. top: 0;
  133. background: #fff;
  134. .account {
  135. .avatar {
  136. margin-right: 0;
  137. }
  138. }
  139. }
  140. }
  141. }
  142. :global {
  143. .ant-layout-header {
  144. height: 50px !important;
  145. line-height: 50px !important;
  146. }
  147. }
  148. .wraptype {
  149. display: inline-block;
  150. vertical-align: top;
  151. margin-left: 6px;
  152. span {
  153. display: inline-block;
  154. vertical-align: top;
  155. font-size: 16px;
  156. color: #fff;
  157. padding: 0 14px;
  158. line-height: 50px;
  159. height: 50px;
  160. a {
  161. color: #fff !important;
  162. }
  163. .svgSpan {
  164. padding: 2px 3px 0 0;
  165. }
  166. }
  167. }