yyb
17 小时以前 5470429a79313630a7ddef601de1d89e7dada754
src/assets/styles/sidebar.scss
@@ -1,144 +1,259 @@
#app {
  .main-container {
    min-height: 100%;
    transition: margin-left 0.28s;
    margin-left: $base-sidebar-width;
    position: relative;
    background: transparent;
  }
  .sidebarHide {
    margin-left: 0 !important;
  }
  .sidebar-container {
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    padding: 12px 0 16px 16px;
    background: transparent;
    box-shadow: none;
    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }
    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }
    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }
    .el-scrollbar {
      height: 100%;
    }
    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 72px);
        margin-top: 10px;
      }
    }
    .is-horizontal {
      display: none;
    }
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    .svg-icon {
      margin-right: 16px;
    }
    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
      padding: 10px 8px 18px;
      border-radius: 22px;
      background: var(--menu-surface);
      backdrop-filter: blur(18px);
      box-shadow: var(--shadow-sm);
#app {
  .main-container {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease;
    position: relative;
    background: transparent;
  }
  .sidebarHide {
    margin-left: 0 !important;
  }
  .sidebar-container {
    transition: width 0.25s ease;
    width: var(--sidebar-width) !important;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    padding: 0;
    font-size: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08);
    isolation: isolate;
    &::before {
      content: "";
      position: absolute;
      inset: -28% -52% -18% -38%;
      z-index: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 9% 12%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.62), transparent 44%),
        radial-gradient(circle at 87% 18%, rgba(56, 189, 248, 0.4), transparent 48%),
        radial-gradient(circle at 20% 82%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.3), transparent 43%),
        radial-gradient(circle at 66% 62%, rgba(125, 211, 252, 0.24), transparent 50%),
        conic-gradient(
          from 210deg at 58% 38%,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 0deg,
          rgba(56, 189, 248, 0.05) 76deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.16) 180deg,
          rgba(125, 211, 252, 0.04) 290deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 360deg
        );
      filter: blur(7px) saturate(1.24) contrast(1.05);
      opacity: 0.96;
      transform: translate3d(0, 0, 0);
      transform-origin: 44% 58%;
      animation:
        sidebarAuroraDrift 17.9s cubic-bezier(0.31, 0.03, 0.18, 0.99) infinite,
        sidebarAuroraBreath 9.7s ease-in-out infinite,
        sidebarAuroraSkew 6.9s steps(23, end) infinite;
    }
    .el-menu-item,
    .menu-title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }
    .el-menu-item .el-menu-tooltip__trigger {
      display: inline-block !important;
    }
    // menu hover
    .submenu-title-noDropdown,
    .el-sub-menu__title {
      &:hover {
        background-color: var(--menu-hover) !important;
        border-radius: 14px;
    &::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        linear-gradient(
          108deg,
          transparent 10%,
          rgba(255, 255, 255, 0.17) 34%,
          rgba(255, 255, 255, 0.04) 48%,
          transparent 72%
        ),
        linear-gradient(
          202deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.24) 0%,
          transparent 34%,
          rgba(56, 189, 248, 0.18) 66%,
          transparent 100%
        ),
        radial-gradient(circle at 74% 12%, rgba(125, 211, 252, 0.25), transparent 50%),
        radial-gradient(circle at 22% 84%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14), transparent 56%);
      background-size: 236% 100%, 186% 186%, 164% 164%, 180% 180%;
      background-position: 224% 0, 14% 16%, 78% 10%, 18% 82%;
      opacity: 0.52;
      transform: translate3d(0, 0, 0);
      animation:
        sidebarSheenSweep 13.1s linear infinite,
        sidebarSheenJitter 4.7s steps(31, end) infinite;
    }
    > * {
      position: relative;
      z-index: 1;
    }
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }
    .scrollbar-wrapper {
      overflow-x: hidden !important;
      overflow-y: auto !important;
    }
    .el-scrollbar__bar.is-vertical {
      right: 2px;
    }
    .el-scrollbar {
      height: 100%;
    }
    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 78px);
      }
    }
    & .theme-light .is-active > .el-sub-menu__title {
      color: var(--current-color) !important;
    }
    .is-horizontal {
      display: none;
    }
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    .el-menu {
      border: none !important;
      height: 100%;
      width: 100% !important;
      padding: 10px 0 16px;
      border-radius: 0;
      background: transparent !important;
      box-shadow: none;
      backdrop-filter: none;
    }
    .el-menu-item,
    .el-sub-menu__title,
    .menu-title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }
    .el-menu-item .el-menu-tooltip__trigger {
      display: inline-flex !important;
      width: 100%;
      align-items: center;
    }
    .submenu-title-noDropdown,
    .el-sub-menu__title,
    .el-menu-item {
      min-width: 0 !important;
      width: calc(100% - 24px) !important;
      margin: 0 12px 8px !important;
      height: 50px;
      line-height: 50px;
      border-radius: 14px;
      padding-left: 16px !important;
      padding-right: 36px !important;
      box-sizing: border-box;
      transition: all 0.28s ease;
      color: var(--sidebar-text);
      background: linear-gradient(128deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
      border: 1px solid rgba(255, 255, 255, 0.06) !important;
      position: relative;
      overflow: hidden;
    }
    .submenu-title-noDropdown::after,
    .el-sub-menu__title::after,
    .el-menu-item::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(115deg, transparent 12%, rgba(255, 255, 255, 0.16), transparent 78%);
      transform: translateX(-100%);
      opacity: 0;
      transition: transform 0.45s ease, opacity 0.26s ease;
      pointer-events: none;
    }
    .submenu-title-noDropdown:hover,
    .el-sub-menu__title:hover,
    .el-menu-item:hover {
      background: linear-gradient(128deg, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.28), rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.08)) !important;
      border-color: rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.32) !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(8, 36, 76, 0.24);
      transform: translateX(3px);
    }
    .submenu-title-noDropdown:hover::after,
    .el-sub-menu__title:hover::after,
    .el-menu-item:hover::after,
    .el-menu-item.is-active::after,
    .el-sub-menu.is-active > .el-sub-menu__title::after {
      transform: translateX(100%);
      opacity: 1;
    }
    & .theme-light .is-active > .el-sub-menu__title,
    & .theme-dark .is-active > .el-sub-menu__title,
    & .el-menu-item.is-active {
      color: #fff !important;
      background: var(--menu-active-bg, linear-gradient(135deg, var(--el-color-primary), var(--el-color-primary-light-3))) !important;
      background-size: 180% 180%;
      box-shadow: var(--menu-active-glow, 0 10px 24px rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.34));
      border-color: rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.5) !important;
      animation: sidebarActiveFlow 4.6s ease infinite;
    }
    & .nest-menu .el-sub-menu > .el-sub-menu__title,
    & .el-sub-menu .el-menu-item {
      min-width: 0 !important;
      margin: 0 12px 6px;
      width: calc(100% - 24px);
      padding-left: 8px !important;
      padding-right: 8px !important;
      box-sizing: border-box;
      width: calc(100% - 24px) !important;
      margin: 0 12px 8px !important;
      height: 46px;
      line-height: 46px;
      padding-left: 14px !important;
      padding-right: 14px !important;
      border-radius: 12px;
      transition: all 0.24s ease;
      color: var(--sidebar-text);
      border: 1px solid rgba(255, 255, 255, 0.06) !important;
      background: linear-gradient(128deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
      &:hover {
        background-color: var(--menu-hover) !important;
        background: linear-gradient(128deg, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.24), rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.07)) !important;
        border-color: rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.3) !important;
        transform: translateX(2px);
      }
      &.is-active {
        background-color: var(--menu-active-bg) !important;
        border-radius: 14px;
      }
    }
    & .theme-light .nest-menu .el-sub-menu > .el-sub-menu__title,
    & .theme-light .el-sub-menu .el-menu-item {
      //background-color: transparent;
      &:hover {
        background-color: var(--menu-hover) !important;
        border-radius: 14px;
        background: var(--menu-active-bg, linear-gradient(135deg, var(--el-color-primary), var(--el-color-primary-light-3))) !important;
        background-size: 180% 180%;
        color: #fff !important;
        font-weight: 500;
        box-shadow: var(--menu-active-glow, 0 10px 24px rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.34));
        animation: sidebarActiveFlow 4.6s ease infinite;
      }
    }
  }
  .hideSidebar {
    .sidebar-container {
      width: 68px !important;
      padding-left: 0;
      padding-right: 0;
      width: var(--sidebar-collapsed-width) !important;
    }
    .main-container {
      margin-left: 84px;
      margin-left: var(--sidebar-collapsed-width);
    }
    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;
@@ -169,13 +284,14 @@
        justify-content: center;
        .svg-icon {
          width: 18px;
          height: 18px;
          width: 22px;
          height: 22px;
          margin-right: 0;
          flex-shrink: 0;
        }
      }
    }
    .el-sub-menu {
      overflow: hidden;
@@ -194,14 +310,14 @@
    .el-menu--collapse {
      width: 100% !important;
      padding: 10px 6px 18px;
      padding: 12px 0 16px;
      > .el-menu-item,
      .el-sub-menu {
        & > .el-sub-menu__title,
        &.el-menu-item {
          margin: 0 0 6px;
          width: 100%;
          width: calc(100% - 12px) !important;
          margin: 0 6px 8px !important;
          padding-left: 0 !important;
          padding-right: 0 !important;
          box-sizing: border-box;
@@ -210,14 +326,10 @@
          justify-content: center;
          .svg-icon {
            width: 18px;
            height: 18px;
            width: 22px;
            height: 22px;
            margin-right: 0;
            flex-shrink: 0;
          }
          &:hover {
            border-radius: 14px;
          }
          & > span {
@@ -225,99 +337,328 @@
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
          & > i {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
            display: inline-block;
          }
        }
      }
    }
  }
  .el-menu--collapse .el-menu .el-sub-menu {
    min-width: $base-sidebar-width !important;
  }
  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }
    .sidebar-container {
      transition: transform 0.28s;
      width: $base-sidebar-width !important;
    }
    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$base-sidebar-width, 0, 0);
      }
    }
  }
  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}
// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }
  .el-menu--collapse .el-menu .el-sub-menu {
    min-width: var(--sidebar-width) !important;
  }
  .mobile {
    .main-container {
      margin-left: 0;
    }
    .sidebar-container {
      transition: transform 0.25s;
      width: var(--sidebar-width) !important;
    }
    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(calc(-1 * var(--sidebar-width)), 0, 0);
      }
    }
  }
  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 10px;
    }
  }
  .nest-menu .el-sub-menu > .el-sub-menu__title,
  .el-menu-item {
    min-width: 0 !important;
    margin: 0 12px 6px;
    width: calc(100% - 24px);
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin: 0 10px 8px;
    width: calc(100% - 20px);
    height: 46px;
    line-height: 46px;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
    border-radius: 12px;
    color: var(--sidebar-text);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: linear-gradient(128deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    transition: all 0.24s ease;
    &:hover {
      // you can use $sub-menuHover
      background-color: var(--menu-hover) !important;
      background: linear-gradient(128deg, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.24), rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.07)) !important;
      border-color: rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.3) !important;
      transform: translateX(2px);
    }
    &.is-active {
      background-color: var(--menu-active-bg) !important;
      border-radius: 14px;
      background: var(--menu-active-bg, linear-gradient(135deg, var(--el-color-primary), var(--el-color-primary-light-3))) !important;
      background-size: 180% 180%;
      color: #fff !important;
      border-radius: 12px;
      box-shadow: var(--menu-active-glow, 0 10px 24px rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.34));
      border-color: rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.5) !important;
      animation: sidebarActiveFlow 4.6s ease infinite;
    }
  }
  // the scroll bar appears when the sub-menu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-md);
    &::-webkit-scrollbar-track-piece {
      background: #dfe7e1;
    }
    &::-webkit-scrollbar {
      width: 6px;
    }
    &::-webkit-scrollbar-thumb {
      background: #9aa79e;
      border-radius: 20px;
    }
  }
}
  > .el-menu--popup {
    max-height: 100vh;
    overflow: hidden;
    padding: 10px;
    border-radius: 14px;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.26);
    box-shadow:
      0 18px 40px rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.16),
      var(--shadow-md);
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
    &::before {
      content: "";
      position: absolute;
      inset: -28% -52% -18% -38%;
      z-index: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 9% 12%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.62), transparent 44%),
        radial-gradient(circle at 87% 18%, rgba(56, 189, 248, 0.4), transparent 48%),
        radial-gradient(circle at 20% 82%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.3), transparent 43%),
        radial-gradient(circle at 66% 62%, rgba(125, 211, 252, 0.24), transparent 50%),
        conic-gradient(
          from 210deg at 58% 38%,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 0deg,
          rgba(56, 189, 248, 0.05) 76deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.16) 180deg,
          rgba(125, 211, 252, 0.04) 290deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 360deg
        );
      filter: blur(7px) saturate(1.24) contrast(1.05);
      opacity: 0.96;
      transform: translate3d(0, 0, 0);
      transform-origin: 44% 58%;
      animation:
        sidebarAuroraDrift 17.9s cubic-bezier(0.31, 0.03, 0.18, 0.99) infinite,
        sidebarAuroraBreath 9.7s ease-in-out infinite,
        sidebarAuroraSkew 6.9s steps(23, end) infinite;
    }
    &::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        linear-gradient(
          108deg,
          transparent 10%,
          rgba(255, 255, 255, 0.17) 34%,
          rgba(255, 255, 255, 0.04) 48%,
          transparent 72%
        ),
        linear-gradient(
          202deg,
          rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.24) 0%,
          transparent 34%,
          rgba(56, 189, 248, 0.18) 66%,
          transparent 100%
        ),
        radial-gradient(circle at 74% 12%, rgba(125, 211, 252, 0.25), transparent 50%),
        radial-gradient(circle at 22% 84%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14), transparent 56%);
      background-size: 236% 100%, 186% 186%, 164% 164%, 180% 180%;
      background-position: 224% 0, 14% 16%, 78% 10%, 18% 82%;
      opacity: 0.52;
      transform: translate3d(0, 0, 0);
      animation:
        sidebarSheenSweep 13.1s linear infinite,
        sidebarSheenJitter 4.7s steps(31, end) infinite;
    }
    > * {
      position: relative;
      z-index: 1;
    }
    > .el-menu {
      max-height: calc(100vh - 20px);
      overflow-y: auto;
      overflow-x: hidden;
      &::-webkit-scrollbar-track-piece {
        background: var(--surface-muted);
      }
      &::-webkit-scrollbar {
        width: 5px;
      }
      &::-webkit-scrollbar-thumb {
        background: var(--accent-light);
        border-radius: 10px;
      }
    }
  }
}
@keyframes sidebarActiveFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes sidebarAuroraDrift {
  0% {
    transform: translate3d(-6.3%, -1.8%, 0) scale(1.05) rotate(-1.8deg);
  }
  6% {
    transform: translate3d(2.2%, -4.6%, 0) scale(1.08) rotate(0.7deg);
  }
  17% {
    transform: translate3d(-3.7%, 4.4%, 0) scale(1.11) rotate(2deg);
  }
  27% {
    transform: translate3d(5.6%, 1.2%, 0) scale(1.03) rotate(-1deg);
  }
  39% {
    transform: translate3d(-4.8%, -3.1%, 0) scale(1.09) rotate(1.5deg);
  }
  52% {
    transform: translate3d(2.9%, 4.8%, 0) scale(1.04) rotate(-1.4deg);
  }
  64% {
    transform: translate3d(-6.4%, 0.3%, 0) scale(1.08) rotate(0.5deg);
  }
  73% {
    transform: translate3d(4.8%, -3.9%, 0) scale(1.05) rotate(1.6deg);
  }
  81% {
    transform: translate3d(-2.4%, 2.9%, 0) scale(1.1) rotate(-0.8deg);
  }
  92% {
    transform: translate3d(3.7%, -1.7%, 0) scale(1.06) rotate(-1.6deg);
  }
  100% {
    transform: translate3d(-5.9%, 0.8%, 0) scale(1.08) rotate(1.2deg);
  }
}
@keyframes sidebarAuroraBreath {
  0% {
    opacity: 0.76;
    filter: blur(5px) saturate(1.08);
  }
  15% {
    opacity: 1;
    filter: blur(7px) saturate(1.28);
  }
  37% {
    opacity: 0.84;
    filter: blur(8px) saturate(1.12);
  }
  61% {
    opacity: 0.98;
    filter: blur(6px) saturate(1.24);
  }
  83% {
    opacity: 0.86;
    filter: blur(7px) saturate(1.16);
  }
  100% {
    opacity: 0.94;
    filter: blur(6px) saturate(1.2);
  }
}
@keyframes sidebarAuroraSkew {
  0% {
    transform-origin: 44% 58%;
  }
  21% {
    transform-origin: 62% 42%;
  }
  43% {
    transform-origin: 31% 66%;
  }
  66% {
    transform-origin: 68% 74%;
  }
  100% {
    transform-origin: 39% 45%;
  }
}
@keyframes sidebarSheenSweep {
  0% {
    background-position: 232% 0, 10% 18%, 80% 12%, 20% 82%;
  }
  8% {
    background-position: 186% 0, 16% 30%, 74% 18%, 28% 74%;
  }
  21% {
    background-position: 116% 0, 34% 10%, 62% 26%, 18% 64%;
  }
  37% {
    background-position: 52% 0, 50% 24%, 46% 12%, 32% 58%;
  }
  52% {
    background-position: -4% 0, 34% 54%, 22% 22%, 12% 46%;
  }
  69% {
    background-position: -62% 0, 14% 36%, 32% 34%, 24% 56%;
  }
  84% {
    background-position: -106% 0, 20% 20%, 46% 20%, 34% 70%;
  }
  100% {
    background-position: -136% 0, 10% 18%, 80% 12%, 20% 82%;
  }
}
@keyframes sidebarSheenJitter {
  0% {
    opacity: 0.28;
    transform: translate3d(0, 0, 0);
  }
  17% {
    opacity: 0.56;
    transform: translate3d(1.8%, -0.5%, 0);
  }
  38% {
    opacity: 0.34;
    transform: translate3d(-1.2%, 0.8%, 0);
  }
  63% {
    opacity: 0.6;
    transform: translate3d(2.3%, -0.3%, 0);
  }
  81% {
    opacity: 0.3;
    transform: translate3d(-1.6%, 0.7%, 0);
  }
  100% {
    opacity: 0.52;
    transform: translate3d(2%, -0.1%, 0);
  }
}