index.less 7.2 KB
Newer Older
陈文彬 已提交
1 2 3
@import (reference) '../../design/index.less';

.default-layout {
N
nebv 已提交
4 5 6 7 8
  // .ant-menu-submenu .ant-menu-sub {
  //   transition: none !important;
  //   // transition: background 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s,
  //   //   padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s !important;
  // }
V
vben 已提交
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 45 46 47 48 49 50
  &__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;
51
      padding: 10px 4px;
陈文彬 已提交
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104

      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%;

    .ant-layout-sider-zero-width-trigger {
      top: 40%;
      z-index: 10;
    }

    &__dargbar {
      position: absolute;
      top: 0;
      right: -2px;
      z-index: @sider-drag-z-index;
      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);
      }
    }
  }

  .setting-button {
    top: 45%;
    right: 0;
V
vben 已提交
105
    padding: 8px;
N
nebv 已提交
106
    border-radius: 6px 0 0 6px;
陈文彬 已提交
107

N
nebv 已提交
108
    svg {
V
vben 已提交
109 110
      width: 1em;
      height: 1em;
陈文彬 已提交
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 187 188 189 190 191 192 193 194 195 196
    }
  }

  &__tabs {
    z-index: 10;
    height: @multiple-height;
    padding: 0;
    line-height: @multiple-height;
    background: @border-color-shallow-light;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
  }
}

.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 已提交
197 198 199 200 201
.ant-layout-header {
  height: @header-height;
  line-height: @header-height;
}

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

N
nebv 已提交
211 212 213
  &__content {
    flex-grow: 1;
    display: flex;
V
vben 已提交
214
    // justify-content: center;
N
nebv 已提交
215 216 217
    align-items: center;
  }

陈文彬 已提交
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 336 337 338 339 340 341 342 343
  &__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;
      }
    }
  }

  &-lm {
    display: flex;
  }

  &__logo {
    padding: 0 10px;
  }

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

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

    &-item {
      display: flex;
      align-items: center;
      height: @header-height;
V
vben 已提交
344
      font-size: 1.1em;
陈文彬 已提交
345 346 347 348
      cursor: pointer;
    }

    &-icon {
V
vben 已提交
349
      padding: 0 8px;
陈文彬 已提交
350 351 352 353
    }
  }

  &__menu {
V
vben 已提交
354
    // display: flex;
陈文彬 已提交
355 356 357
    margin-left: 20px;
    overflow: hidden;
    align-items: center;
V
vben 已提交
358
    // flex-grow: 1;
陈文彬 已提交
359 360 361 362 363 364 365 366 367 368 369
  }

  &__user-dropdown {
    height: 52px;
    padding: 0 0 0 10px;
  }
}

.user-dropdown {
  display: flex;
  height: 100%;
V
vben 已提交
370
  font-size: 12px;
陈文彬 已提交
371 372 373 374
  cursor: pointer;
  align-items: center;

  img {
V
vben 已提交
375 376 377
    width: 26px;
    height: 26px;
    margin-right: 16px;
陈文彬 已提交
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
  }

  &__header {
    border-radius: 50%;
  }

  &__divider {
    width: 1px;
    height: 30px;
    margin-right: 20px;
    background: #c6d9ee;
  }

  &__exit {
    margin-top: -40px;
    font-size: 12px;
    color: #c6d9ee;
    text-align: center;

    > section {
      height: 20px;
    }
  }

  &__info {
    display: flex;
    margin-right: 12px;
    flex-direction: column;

    > section {
      line-height: 1.8;
    }
  }

  &__name {
V
vben 已提交
413
    font-size: 12px;
陈文彬 已提交
414 415 416 417 418 419 420 421 422 423
  }

  &__desc {
    font-size: 12px;
    .text-truncate();
  }
}

.layout-breadcrumb {
  padding: 0 16px;
N
nebv 已提交
424
  flex-grow: 1;
陈文彬 已提交
425
}
V
vben 已提交
426 427 428 429 430

.ant-layout-sider-trigger {
  height: 30px;
  line-height: 30px;
}
V
vben 已提交
431 432 433 434 435 436 437 438 439 440 441 442 443 444

.hide-title {
  .ant-menu-inline-collapsed > .ant-menu-item,
  .ant-menu-inline-collapsed > .ant-menu-item-group > .ant-menu-item-group-list > .ant-menu-item,
  .ant-menu-inline-collapsed
    > .ant-menu-item-group
    > .ant-menu-item-group-list
    > .ant-menu-submenu
    > .ant-menu-submenu-title,
  .ant-menu-inline-collapsed > .ant-menu-submenu > .ant-menu-submenu-title {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }
}