index.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. @import (reference) '../../../design/index.less';
  2. .layout-header {
  3. display: flex;
  4. height: @header-height;
  5. padding: 0 20px 0 0;
  6. margin-left: -1px;
  7. line-height: @header-height;
  8. color: @white;
  9. background: @white;
  10. align-items: center;
  11. justify-content: space-between;
  12. &.fixed {
  13. position: fixed;
  14. top: 0;
  15. left: 0;
  16. z-index: 1000;
  17. width: 100%;
  18. }
  19. &__left {
  20. display: flex;
  21. align-items: center;
  22. .layout-trigger {
  23. padding: 1px 10px 0 16px;
  24. cursor: pointer;
  25. .anticon {
  26. font-size: 17px;
  27. }
  28. &.light {
  29. &:hover {
  30. background: @header-light-bg-hover-color;
  31. }
  32. svg {
  33. fill: #000;
  34. }
  35. }
  36. &.dark {
  37. &:hover {
  38. background: @header-dark-bg-hover-color;
  39. }
  40. }
  41. }
  42. .layout-breadcrumb {
  43. padding: 0 8px;
  44. }
  45. }
  46. &__content {
  47. display: flex;
  48. flex-grow: 1;
  49. align-items: center;
  50. }
  51. &__header--light {
  52. background: @white;
  53. border-bottom: 1px solid @header-light-bottom-border-color;
  54. .layout-header__menu {
  55. height: calc(@header-height - 1px);
  56. .ant-menu-submenu {
  57. height: @header-height;
  58. line-height: @header-height;
  59. }
  60. }
  61. .layout-header__logo {
  62. height: @header-height;
  63. color: @text-color-base;
  64. img {
  65. width: @logo-width;
  66. height: @logo-width;
  67. margin-right: 6px;
  68. }
  69. &:hover {
  70. background: @header-light-bg-hover-color;
  71. }
  72. }
  73. .layout-header__action {
  74. &-item {
  75. &:hover {
  76. background: @header-light-bg-hover-color;
  77. }
  78. &.locale {
  79. padding: 0 10px;
  80. color: rgba(0, 0, 0, 0.65);
  81. }
  82. }
  83. &-icon {
  84. color: @text-color-base;
  85. }
  86. }
  87. .layout-header__user-dropdown {
  88. &:hover {
  89. background: @header-light-bg-hover-color;
  90. }
  91. }
  92. .user-dropdown {
  93. &__name {
  94. color: @text-color-base;
  95. }
  96. &__desc {
  97. color: @header-light-desc-color;
  98. }
  99. }
  100. }
  101. &__header--dark {
  102. background: @header-dark-bg-color;
  103. .layout-header__action {
  104. &-item {
  105. &:hover {
  106. background: @header-dark-bg-hover-color;
  107. }
  108. }
  109. }
  110. .layout-header__logo {
  111. height: @header-height;
  112. img {
  113. width: @logo-width;
  114. height: @logo-width;
  115. margin-right: 10px;
  116. }
  117. &:hover {
  118. background: @header-dark-bg-hover-color;
  119. }
  120. }
  121. .layout-header__user-dropdown {
  122. &:hover {
  123. background: @header-dark-bg-hover-color;
  124. }
  125. }
  126. .breadcrumb {
  127. &__item:last-child .breadcrumb__inner,
  128. &__item:last-child &__inner a,
  129. &__item:last-child &__inner a:hover,
  130. &__item:last-child &__inner:hover {
  131. font-weight: 400;
  132. color: rgba(255, 255, 255, 0.6);
  133. cursor: text;
  134. }
  135. &__inner,
  136. &__inner.is-link,
  137. &__separator {
  138. color: @white;
  139. }
  140. }
  141. }
  142. &__logo {
  143. padding: 0 10px;
  144. }
  145. &__bread {
  146. display: none;
  147. flex: 1;
  148. }
  149. &__action {
  150. display: flex;
  151. align-items: center;
  152. &-item {
  153. display: flex;
  154. height: @header-height;
  155. padding: 0 2px;
  156. font-size: 1.2em;
  157. cursor: pointer;
  158. align-items: center;
  159. }
  160. &-icon {
  161. padding: 0 8px;
  162. }
  163. }
  164. &__menu {
  165. margin-left: 4px;
  166. overflow: hidden;
  167. align-items: center;
  168. }
  169. &__user-dropdown {
  170. height: @header-height;
  171. padding: 0 0 0 10px;
  172. }
  173. .user-dropdown {
  174. display: flex;
  175. padding-right: 10px;
  176. font-size: 12px;
  177. cursor: pointer;
  178. align-items: center;
  179. img {
  180. width: 26px;
  181. height: 26px;
  182. margin-right: 12px;
  183. }
  184. &__header {
  185. border-radius: 50%;
  186. }
  187. }
  188. }
  189. .app-layout-header-user-dropdown-overlay {
  190. .ant-dropdown-menu-item {
  191. min-width: 160px;
  192. }
  193. }