index.less 2.26 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 28
    font-weight: 600;
  }
}
.sider {
陈帅's avatar
陈帅 committed
29
  min-height: 100vh;
jim's avatar
jim committed
30
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
偏右's avatar
偏右 committed
31 32
  position: relative;
  z-index: 10;
陈帅's avatar
陈帅 committed
33 34
  &.fixSiderBar {
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
35 36 37
    position: fixed;
    top: 0;
    left: 0;
38 39 40 41 42 43 44 45 46 47 48 49
    :global {
      .ant-menu-root {
        overflow-y: auto;
        height: ~'calc(100vh - @{nav-header-height})';
      }
      .ant-menu-inline {
        border-right: 0;
        .ant-menu-item,
        .ant-menu-submenu-title {
          width: 100%;
        }
      }
50
    }
51
  }
jim's avatar
jim committed
52
  &.light {
53
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
jim's avatar
jim committed
54 55 56
    background-color: white;
    .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 70 71 72

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

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 91 92 93 94 95 96
    & > .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
97
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
98 99
    opacity: 1;
  }
100 101 102 103 104
  .ant-drawer-left {
    .ant-drawer-body {
      padding: 0;
    }
  }
jiang's avatar
jiang committed
105
}