index.less 6.2 KB
Newer Older
陈文彬 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@import (reference) '../../design/index.less';

.default-layout {
  &__content {
    position: relative;

    &.fixed {
      overflow: hidden;
    }
  }

  &__loading {
    position: absolute;
    z-index: @page-loading-z-index;
  }

  &__main {
    position: relative;
    height: 100%;
    // overflow: hidden;
    // overflow: auto;

    &.fixed {
      overflow: auto;
    }

    &.fixed.lock {
      overflow: hidden;
    }
  }

  .layout-content {
    position: relative;
    // height: 100%;

    &.fixed {
      width: 1200px;
      margin: 0 auto;
    }
  }

  .layout-menu {
    &__logo {
      height: @header-height;
V
vben 已提交
45
      padding: 10px 4px 10px 10px;
陈文彬 已提交
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

      img {
        width: @logo-width;
        height: @logo-width;
      }

      &.light {
        .logo-title {
          color: @text-color-base;
        }
      }

      &.dark {
        .logo-title {
          color: @white;
        }
      }
    }
  }

  .layout-sidebar {
    background-size: 100% 100%;

V
vben 已提交
69 70 71 72
    &.ant-layout-sider-dark {
      background: @first-menu-item-dark-bg-color;
    }

V
vben 已提交
73 74 75 76
    &:not(.ant-layout-sider-dark) {
      border-right: 1px solid @border-color-light;
    }

陈文彬 已提交
77 78 79 80 81 82 83 84 85
    .ant-layout-sider-zero-width-trigger {
      top: 40%;
      z-index: 10;
    }

    &__dargbar {
      position: absolute;
      top: 0;
      right: -2px;
V
vben 已提交
86
      z-index: @side-drag-z-index;
陈文彬 已提交
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
      width: 2px;
      height: 100%;
      cursor: col-resize;
      border-top: none;
      border-bottom: none;

      &.hide {
        display: none;
      }

      &:hover {
        background: @primary-color;
        box-shadow: 0 0 4px 0 rgba(28, 36, 56, 0.15);
      }
    }
  }

  &__tabs {
    z-index: 10;
    height: @multiple-height;
    padding: 0;
    line-height: @multiple-height;
    background: @border-color-shallow-light;
V
vben 已提交
110
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
陈文彬 已提交
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
  }
}

.setting-drawer {
  .ant-drawer-body {
    padding-top: 0;
    background: @white;
  }

  &__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  &__cell-item {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
  }

  &__theme-item {
    display: flex;
    flex-wrap: wrap;
    margin: 16px 0;

    span {
      display: inline-block;
      width: 20px;
      height: 20px;
      margin-top: 10px;
      margin-right: 10px;
      cursor: pointer;
      border-radius: 4px;

      svg {
        display: none;
      }

      &.active {
        svg {
          display: inline-block;
          margin-left: 4px;
          font-size: 0.8em;
          fill: @white;
        }
      }
    }
  }

  &__siderbar {
    display: flex;

    > div {
      position: relative;

      .check-icon {
        position: absolute;
        top: 40%;
        left: 40%;
        display: none;
        color: @primary-color;

        &.active {
          display: inline-block;
        }
      }
    }

    img {
      margin-right: 10px;
      cursor: pointer;
    }
  }
}

V
vben 已提交
187
.ant-layout-header:not(.default-layout__tabs) {
V
vben 已提交
188 189 190 191
  height: @header-height;
  line-height: @header-height;
}

V
vben 已提交
192 193 194 195 196 197
.ant-layout-header.default-layout__tabs {
  height: @multiple-height + 2;
  line-height: @multiple-height + 2;
  background: @white;
}

陈文彬 已提交
198 199 200 201 202
.layout-header {
  display: flex;
  height: @header-height;
  padding: 0 20px 0 0;
  color: @white;
N
nebv 已提交
203
  background: @white;
陈文彬 已提交
204 205 206
  align-items: center;
  justify-content: space-between;

N
nebv 已提交
207 208 209
  &__content {
    flex-grow: 1;
    display: flex;
V
vben 已提交
210
    // justify-content: center;
N
nebv 已提交
211 212 213
    align-items: center;
  }

陈文彬 已提交
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
  &__header--light {
    background: @white;
    border-bottom: 1px solid @header-light-bottom-border-color;

    .layout-header__menu {
      height: calc(@header-height - 1px);

      .ant-menu-submenu {
        height: @header-height;
        line-height: @header-height;
      }
    }

    .layout-header__logo {
      height: @header-height;
      color: @text-color-base;

      img {
        width: @logo-width;
        height: @logo-width;
        margin-right: 6px;
      }

      &:hover {
        background: @header-light-bg-hover-color;
      }
    }

    .layout-header__action {
      &-item {
        &:hover {
          background: @header-light-bg-hover-color;
        }
      }

      &-icon {
        color: @text-color-base;
      }
    }

    .layout-header__user-dropdown {
      &:hover {
        background: @header-light-bg-hover-color;
      }
    }

    .user-dropdown {
      &__name {
        color: @text-color-base;
      }

      &__desc {
        color: @header-light-desc-color;
      }
    }
  }

  &__header--dark {
    background: @header-dark-bg-color;

    .layout-header__action {
      &-item {
        &:hover {
          background: @header-dark-bg-hover-color;
        }
      }
    }

    .layout-header__logo {
      height: @header-height;

      img {
        width: @logo-width;
        height: @logo-width;
        margin-right: 10px;
      }

      &:hover {
        background: @header-dark-bg-hover-color;
      }
    }

    .layout-header__user-dropdown {
      &:hover {
        background: @header-dark-bg-hover-color;
      }
    }

    .breadcrumb {
      &__item:last-child .breadcrumb__inner,
      &__item:last-child &__inner a,
      &__item:last-child &__inner a:hover,
      &__item:last-child &__inner:hover {
        font-weight: 400;
        color: rgba(255, 255, 255, 0.6);
        cursor: text;
      }

      &__inner,
      &__separator {
        color: @white;
      }
    }
  }

  &__logo {
    padding: 0 10px;
  }

  &__bread {
    flex: 1;
    display: none;
  }

  &__action {
    display: flex;
    align-items: center;

    &-item {
      display: flex;
      align-items: center;
      height: @header-height;
336 337
      padding: 0 2px;
      font-size: 1.2em;
陈文彬 已提交
338 339 340 341
      cursor: pointer;
    }

    &-icon {
V
vben 已提交
342
      padding: 0 8px;
陈文彬 已提交
343 344 345 346 347 348 349 350 351 352
    }
  }

  &__menu {
    margin-left: 20px;
    overflow: hidden;
    align-items: center;
  }

  &__user-dropdown {
V
vben 已提交
353
    height: @header-height;
陈文彬 已提交
354 355 356 357 358 359
    padding: 0 0 0 10px;
  }
}

.user-dropdown {
  display: flex;
V
vben 已提交
360
  padding-right: 10px;
V
vben 已提交
361
  font-size: 12px;
陈文彬 已提交
362 363 364 365
  cursor: pointer;
  align-items: center;

  img {
V
vben 已提交
366 367
    width: 26px;
    height: 26px;
V
vben 已提交
368
    margin-right: 12px;
陈文彬 已提交
369 370 371 372 373 374 375 376 377
  }

  &__header {
    border-radius: 50%;
  }
}

.layout-breadcrumb {
  padding: 0 16px;
N
nebv 已提交
378
  flex-grow: 1;
陈文彬 已提交
379
}
V
vben 已提交
380 381

.ant-layout-sider-trigger {
V
vben 已提交
382 383
  height: 36px;
  line-height: 36px;
V
vben 已提交
384
}