index.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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. height: 100%;
  22. align-items: center;
  23. .layout-trigger {
  24. display: flex;
  25. height: 100%;
  26. padding: 1px 10px 0 16px;
  27. cursor: pointer;
  28. align-items: center;
  29. .anticon {
  30. font-size: 17px;
  31. }
  32. &.light {
  33. &:hover {
  34. background: @header-light-bg-hover-color;
  35. }
  36. svg {
  37. fill: #000;
  38. }
  39. }
  40. &.dark {
  41. &:hover {
  42. background: @header-dark-bg-hover-color;
  43. }
  44. }
  45. }
  46. .layout-breadcrumb {
  47. display: flex;
  48. padding: 0 8px;
  49. align-items: center;
  50. .ant-breadcrumb-link {
  51. .anticon {
  52. margin-right: 4px;
  53. margin-bottom: 2px;
  54. }
  55. }
  56. }
  57. }
  58. &__content {
  59. display: flex;
  60. height: 100%;
  61. flex-grow: 1;
  62. align-items: center;
  63. }
  64. &__header--light {
  65. background: @white;
  66. border-bottom: 1px solid @header-light-bottom-border-color;
  67. .layout-header__menu {
  68. height: calc(@header-height - 1px);
  69. .ant-menu-submenu {
  70. height: @header-height;
  71. line-height: @header-height;
  72. }
  73. }
  74. .layout-breadcrumb {
  75. .ant-breadcrumb-link {
  76. color: @breadcrumb-item-normal-color;
  77. a {
  78. color: @text-color-base;
  79. &:hover {
  80. color: @primary-color;
  81. }
  82. }
  83. }
  84. .ant-breadcrumb-separator {
  85. color: @breadcrumb-item-normal-color;
  86. }
  87. }
  88. .layout-header__logo {
  89. height: @header-height;
  90. color: @text-color-base;
  91. img {
  92. width: @logo-width;
  93. height: @logo-width;
  94. margin-right: 6px;
  95. }
  96. &:hover {
  97. background: @header-light-bg-hover-color;
  98. }
  99. }
  100. .layout-header__action {
  101. &-item {
  102. &:hover {
  103. background: @header-light-bg-hover-color;
  104. }
  105. &.locale {
  106. padding: 0 10px;
  107. color: rgba(0, 0, 0, 0.65);
  108. }
  109. }
  110. &-icon {
  111. color: @text-color-base;
  112. }
  113. }
  114. .layout-header__user-dropdown {
  115. &:hover {
  116. background: @header-light-bg-hover-color;
  117. }
  118. }
  119. .user-dropdown {
  120. &__name {
  121. color: @text-color-base;
  122. }
  123. &__desc {
  124. color: @header-light-desc-color;
  125. }
  126. }
  127. }
  128. &__header--dark {
  129. background: @header-dark-bg-color;
  130. .layout-header__action {
  131. &-item {
  132. &:hover {
  133. background: @header-dark-bg-hover-color;
  134. }
  135. }
  136. }
  137. .layout-header__logo {
  138. height: @header-height;
  139. img {
  140. width: @logo-width;
  141. height: @logo-width;
  142. margin-right: 10px;
  143. }
  144. &:hover {
  145. background: @header-dark-bg-hover-color;
  146. }
  147. }
  148. .layout-header__user-dropdown {
  149. &:hover {
  150. background: @header-dark-bg-hover-color;
  151. }
  152. }
  153. .layout-breadcrumb {
  154. .ant-breadcrumb-link {
  155. color: rgba(255, 255, 255, 0.6);
  156. a {
  157. color: rgba(255, 255, 255, 0.8);
  158. &:hover {
  159. color: @white;
  160. }
  161. }
  162. }
  163. .ant-breadcrumb-separator,
  164. .anticon {
  165. color: rgba(255, 255, 255, 0.8);
  166. }
  167. }
  168. }
  169. &__logo {
  170. padding: 0 10px;
  171. }
  172. &__bread {
  173. display: none;
  174. flex: 1;
  175. }
  176. &__action {
  177. display: flex;
  178. align-items: center;
  179. &-item {
  180. display: flex;
  181. height: @header-height;
  182. padding: 0 2px;
  183. font-size: 1.2em;
  184. cursor: pointer;
  185. align-items: center;
  186. }
  187. &-icon {
  188. padding: 0 8px;
  189. }
  190. }
  191. &__menu {
  192. margin-left: 4px;
  193. overflow: hidden;
  194. align-items: center;
  195. }
  196. &__user-dropdown {
  197. height: @header-height;
  198. padding: 0 0 0 10px;
  199. }
  200. .user-dropdown {
  201. display: flex;
  202. padding-right: 10px;
  203. font-size: 12px;
  204. cursor: pointer;
  205. align-items: center;
  206. img {
  207. width: 26px;
  208. height: 26px;
  209. margin-right: 12px;
  210. }
  211. &__header {
  212. border-radius: 50%;
  213. }
  214. }
  215. }
  216. .app-layout-header-user-dropdown-overlay {
  217. .ant-dropdown-menu-item {
  218. min-width: 160px;
  219. }
  220. }