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

3
@nav-header-height: @layout-header-height;
4

偏右's avatar
偏右 committed
5
.logo {
6
  height: @nav-header-height;
偏右's avatar
偏右 committed
7
  position: relative;
8
  line-height: @nav-header-height;
偏右's avatar
偏右 committed
9
  padding-left: (@menu-collapsed-width - 32px) / 2;
jim's avatar
jim committed
10
  transition: all 0.3s;
偏右's avatar
偏右 committed
11 12 13 14 15 16 17 18
  background: #002140;
  overflow: hidden;
  img {
    display: inline-block;
    vertical-align: middle;
    height: 32px;
  }
  h1 {
jim's avatar
jim committed
19
    color: white;
偏右's avatar
偏右 committed
20 21 22 23
    display: inline-block;
    vertical-align: middle;
    font-size: 20px;
    margin: 0 0 0 12px;
24
    font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
偏右's avatar
偏右 committed
25 26 27
    font-weight: 600;
  }
}
28

偏右's avatar
偏右 committed
29
.sider {
陈帅's avatar
陈帅 committed
30
  min-height: 100vh;
jim's avatar
jim committed
31
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
偏右's avatar
偏右 committed
32 33
  position: relative;
  z-index: 10;
34 35 36 37
  &.fixSiderbar {
    position: fixed;
    top: 0;
    left: 0;
38 39 40 41
    :global(.ant-menu-root) {
      overflow-y: auto;
      height: ~'calc(100vh - @{nav-header-height})';
    }
42
  }
jim's avatar
jim committed
43
  &.light {
44
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
jim's avatar
jim committed
45 46 47
    background-color: white;
    .logo {
      background: white;
afc163's avatar
afc163 committed
48
      box-shadow: 1px 1px 0 0 @border-color-split;
jim's avatar
jim committed
49
      h1 {
jim's avatar
jim committed
50
        color: @primary-color;
jim's avatar
jim committed
51 52
      }
    }
afc163's avatar
afc163 committed
53 54 55
    :global(.ant-menu-light) {
      border-right-color: transparent;
    }
jim's avatar
jim committed
56
  }
偏右's avatar
偏右 committed
57
}
58 59 60 61 62 63

.icon {
  width: 14px;
  margin-right: 10px;
}

jiang's avatar
jiang committed
64
:global {
65
  .top-nav-menu li.ant-menu-item {
66 67
    height: @nav-header-height;
    line-height: @nav-header-height;
68
  }
jiang's avatar
jiang committed
69 70 71
  .drawer .drawer-content {
    background: #001529;
  }
72 73
  .ant-menu-inline-collapsed {
    & > .ant-menu-item .sider-menu-item-img + span,
jim's avatar
jim committed
74 75 76 77 78 79
    &
      > .ant-menu-item-group
      > .ant-menu-item-group-list
      > .ant-menu-item
      .sider-menu-item-img
      + span,
80 81 82 83 84 85 86 87
    & > .ant-menu-submenu > .ant-menu-submenu-title .sider-menu-item-img + span {
      max-width: 0;
      display: inline-block;
      opacity: 0;
    }
  }
  .ant-menu-item .sider-menu-item-img + span,
  .ant-menu-submenu-title .sider-menu-item-img + span {
jim's avatar
jim committed
88
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
89 90
    opacity: 1;
  }
jiang's avatar
jiang committed
91
}