index.less 2.27 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 6
.logo {
  position: relative;
Yu's avatar
Yu committed
7
  height: @nav-header-height;
偏右's avatar
偏右 committed
8 9
  padding-left: (@menu-collapsed-width - 32px) / 2;
  overflow: hidden;
Yu's avatar
Yu committed
10 11 12
  line-height: @nav-header-height;
  background: #002140;
  transition: all 0.3s;
偏右's avatar
偏右 committed
13 14 15
  img {
    display: inline-block;
    height: 32px;
Yu's avatar
Yu committed
16
    vertical-align: middle;
偏右's avatar
偏右 committed
17 18 19 20
  }
  h1 {
    display: inline-block;
    margin: 0 0 0 12px;
Yu's avatar
Yu committed
21
    color: white;
偏右's avatar
偏右 committed
22
    font-weight: 600;
Yu's avatar
Yu committed
23 24 25
    font-size: 20px;
    font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
    vertical-align: middle;
偏右's avatar
偏右 committed
26 27 28 29 30
  }
}
.sider {
  position: relative;
  z-index: 10;
Yu's avatar
Yu committed
31 32 33
  min-height: 100vh;
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  &.fixSiderBar {
34 35 36
    position: fixed;
    top: 0;
    left: 0;
Yu's avatar
Yu committed
37 38 39 40 41 42 43 44 45 46 47 48 49
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
    :global {
      .ant-menu-root {
        height: ~'calc(100vh - @{nav-header-height})';
        overflow-y: auto;
      }
      .ant-menu-inline {
        border-right: 0;
        .ant-menu-item,
        .ant-menu-submenu-title {
          width: 100%;
        }
      }
50
    }
51
  }
jim's avatar
jim committed
52
  &.light {
jim's avatar
jim committed
53
    background-color: white;
Yu's avatar
Yu committed
54
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
jim's avatar
jim committed
55 56
    .logo {
      background: white;
afc163's avatar
afc163 committed
57
      box-shadow: 1px 1px 0 0 @border-color-split;
jim's avatar
jim committed
58
      h1 {
jim's avatar
jim committed
59
        color: @primary-color;
jim's avatar
jim committed
60 61
      }
    }
afc163's avatar
afc163 committed
62 63 64
    :global(.ant-menu-light) {
      border-right-color: transparent;
    }
jim's avatar
jim committed
65
  }
偏右's avatar
偏右 committed
66
}
67 68 69

.icon {
  width: 14px;
Yu's avatar
Yu committed
70
  vertical-align: baseline;
71 72
}

jiang's avatar
jiang committed
73
:global {
74
  .top-nav-menu li.ant-menu-item {
75 76
    height: @nav-header-height;
    line-height: @nav-header-height;
77
  }
jiang's avatar
jiang committed
78 79 80
  .drawer .drawer-content {
    background: #001529;
  }
81 82
  .ant-menu-inline-collapsed {
    & > .ant-menu-item .sider-menu-item-img + span,
jim's avatar
jim committed
83 84 85 86 87 88
    &
      > .ant-menu-item-group
      > .ant-menu-item-group-list
      > .ant-menu-item
      .sider-menu-item-img
      + span,
89 90
    & > .ant-menu-submenu > .ant-menu-submenu-title .sider-menu-item-img + span {
      display: inline-block;
Yu's avatar
Yu committed
91
      max-width: 0;
92 93 94 95 96 97
      opacity: 0;
    }
  }
  .ant-menu-item .sider-menu-item-img + span,
  .ant-menu-submenu-title .sider-menu-item-img + span {
    opacity: 1;
Yu's avatar
Yu committed
98
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
99
  }
100 101 102 103 104
  .ant-drawer-left {
    .ant-drawer-body {
      padding: 0;
    }
  }
jiang's avatar
jiang committed
105
}