_menu.scss 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. .layout-sidebar {
  2. position: fixed;
  3. width: 300px;
  4. height: calc(100vh - 9rem);
  5. z-index: 999;
  6. overflow-y: auto;
  7. user-select: none;
  8. top: 7rem;
  9. left: 2rem;
  10. transition: transform $transitionDuration, left $transitionDuration;
  11. background-color: var(--surface-overlay);
  12. border-radius: 12px;
  13. padding: 1.5rem;
  14. box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.02), 0px 0px 2px rgba(0, 0, 0, 0.05), 0px 1px 4px rgba(0, 0, 0, 0.08);
  15. }
  16. .layout-menu {
  17. list-style-type: none;
  18. margin: 0;
  19. padding: 0;
  20. li {
  21. &.layout-menuitem-category {
  22. margin-top: 0.75rem;
  23. &:first-child {
  24. margin-top: 0;
  25. }
  26. }
  27. .layout-menuitem-root-text {
  28. text-transform: uppercase;
  29. color: var(--surface-900);
  30. font-weight: 600;
  31. margin-bottom: 0.5rem;
  32. font-size: 0.875rem;
  33. }
  34. a {
  35. cursor: pointer;
  36. text-decoration: none;
  37. display: flex;
  38. align-items: center;
  39. color: var(--text-color);
  40. transition: color $transitionDuration;
  41. border-radius: $borderRadius;
  42. padding: 0.75rem 1rem;
  43. transition: background-color 0.15s;
  44. span {
  45. margin-left: 0.5rem;
  46. }
  47. .menuitem-toggle-icon {
  48. margin-left: auto;
  49. }
  50. &:focus {
  51. @include focused-inset();
  52. }
  53. &:hover {
  54. background-color: var(--surface-hover);
  55. }
  56. &.router-link-exact-active {
  57. font-weight: 700;
  58. color: var(--primary-color);
  59. }
  60. .p-badge {
  61. margin-left: auto;
  62. }
  63. }
  64. &.active-menuitem {
  65. > a {
  66. .menuitem-toggle-icon {
  67. &:before {
  68. content: '\e933';
  69. }
  70. }
  71. }
  72. }
  73. ul {
  74. list-style-type: none;
  75. margin: 0;
  76. padding: 0;
  77. &.layout-submenu-wrapper-enter-from,
  78. &.layout-submenu-wrapper-leave-to {
  79. max-height: 0;
  80. }
  81. &.layout-submenu-wrapper-enter-to,
  82. &.layout-submenu-wrapper-leave-from {
  83. max-height: 1000px;
  84. }
  85. &.layout-submenu-wrapper-leave-active {
  86. overflow: hidden;
  87. transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
  88. }
  89. &.layout-submenu-wrapper-enter-active {
  90. overflow: hidden;
  91. transition: max-height 1s ease-in-out;
  92. }
  93. ul {
  94. padding-left: 1rem;
  95. }
  96. }
  97. }
  98. }