index.less 2.12 KB
Newer Older
jim's avatar
jim committed
1
@import '~antd/lib/style/themes/default.less';
2 3

.header {
4
  height: 64px;
niko's avatar
niko committed
5
  padding: 0 12px 0 0;
afc163's avatar
afc163 committed
6
  background: #fff;
jim's avatar
jim committed
7
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
afc163's avatar
afc163 committed
8
  position: relative;
9 10
}

偏右's avatar
偏右 committed
11 12
:global {
  .ant-layout {
陈帅's avatar
陈帅 committed
13
    min-height: 100vh;
偏右's avatar
偏右 committed
14
    overflow-x: hidden;
15
  }
偏右's avatar
偏右 committed
16 17
}

jiang's avatar
jiang committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31
.logo {
  height: 64px;
  line-height: 58px;
  vertical-align: top;
  display: inline-block;
  padding: 0 0 0 24px;
  cursor: pointer;
  font-size: 20px;
  img {
    display: inline-block;
    vertical-align: middle;
  }
}

偏右's avatar
偏右 committed
32 33 34 35 36 37
.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
    width: 160px;
38 39 40
  }
}

guihua's avatar
guihua committed
41
i.trigger {
42 43 44
  font-size: 20px;
  line-height: 64px;
  cursor: pointer;
jim's avatar
jim committed
45
  transition: all 0.3s, padding 0s;
niko's avatar
niko committed
46
  padding: 0 24px;
47
  &:hover {
afc163's avatar
afc163 committed
48
    background: @primary-1;
49 50 51 52 53 54 55 56 57 58
  }
}

.right {
  float: right;
  height: 100%;
  .action {
    cursor: pointer;
    padding: 0 12px;
    display: inline-block;
jim's avatar
jim committed
59
    transition: all 0.3s;
60 61
    height: 100%;
    > i {
afc163's avatar
afc163 committed
62
      font-size: 16px;
63
      vertical-align: middle;
afc163's avatar
afc163 committed
64
      color: @text-color;
65
    }
66 67
    &:hover,
    &:global(.ant-popover-open) {
afc163's avatar
afc163 committed
68
      background: @primary-1;
69 70
    }
  }
afc163's avatar
afc163 committed
71
  .search {
jim's avatar
jim committed
72
    padding: 0 12px;
afc163's avatar
afc163 committed
73 74 75
    &:hover {
      background: transparent;
    }
76 77 78 79 80
  }
  .account {
    .avatar {
      margin: 20px 8px 20px 0;
      color: @primary-color;
jim's avatar
jim committed
81
      background: rgba(255, 255, 255, 0.85);
82 83 84 85
      vertical-align: middle;
    }
  }
}
jiang's avatar
jiang committed
86

jim's avatar
jim committed
87
.dark {
jim's avatar
jim committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
  height: 64px;
  .action {
    color: rgba(255, 255, 255, 0.85);
    > i {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
    &:global(.ant-popover-open) {
      background: @primary-color;
    }
    :global(.ant-badge) {
      color: rgba(255, 255, 255, 0.85);
    }
  }
}

jiang's avatar
jiang committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
@media only screen and (max-width: @screen-md) {
  .header {
    :global(.ant-divider-vertical) {
      vertical-align: unset;
    }
    .name {
      display: none;
    }
    i.trigger {
      padding: 0 12px;
    }
    .logo {
      padding-right: 12px;
      position: relative;
    }
    .right {
      position: absolute;
      right: 12px;
      top: 0;
      background: #fff;
      .account {
        .avatar {
          margin-right: 0;
        }
      }
    }
  }
}