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

3 4
@nav-header-height: 64px;

偏右'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 24 25 26 27
    display: inline-block;
    vertical-align: middle;
    font-size: 20px;
    margin: 0 0 0 12px;
    font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    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;
jim's avatar
jim committed
48
      border-bottom: 1px solid @border-color-split;
49
      box-shadow: 1px 0 0 0 @border-color-split;
jim's avatar
jim committed
50
      h1 {
jim's avatar
jim committed
51
        color: @primary-color;
jim's avatar
jim committed
52 53
      }
    }
afc163's avatar
afc163 committed
54 55 56
    :global(.ant-menu-light) {
      border-right-color: transparent;
    }
jim's avatar
jim committed
57
  }
偏右's avatar
偏右 committed
58
}
59 60 61 62 63 64

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

jiang's avatar
jiang committed
65 66 67 68
:global {
  .drawer .drawer-content {
    background: #001529;
  }
69 70
  .ant-menu-inline-collapsed {
    & > .ant-menu-item .sider-menu-item-img + span,
jim's avatar
jim committed
71 72 73 74 75 76
    &
      > .ant-menu-item-group
      > .ant-menu-item-group-list
      > .ant-menu-item
      .sider-menu-item-img
      + span,
77 78 79 80 81 82 83 84
    & > .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
85
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
86 87
    opacity: 1;
  }
jiang's avatar
jiang committed
88
}