AppSidebar.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. .ant-sidebar > .ant-layout-sider {
  2. position: sticky;
  3. top: 0;
  4. height: 100vh;
  5. align-self: flex-start;
  6. }
  7. .sider-brand,
  8. .drawer-brand {
  9. font-weight: 600;
  10. font-size: 18px;
  11. letter-spacing: 0.5px;
  12. color: var(--ant-color-text);
  13. }
  14. .sider-brand {
  15. display: flex;
  16. align-items: center;
  17. justify-content: space-between;
  18. gap: 8px;
  19. padding: 14px 14px;
  20. border-bottom: 1px solid var(--ant-color-border-secondary);
  21. user-select: none;
  22. }
  23. .sider-brand-collapsed {
  24. justify-content: center;
  25. font-size: 16px;
  26. padding: 14px 4px;
  27. letter-spacing: 0;
  28. }
  29. .brand-block {
  30. display: inline-flex;
  31. flex-direction: column;
  32. align-items: center;
  33. min-width: 0;
  34. line-height: 1.1;
  35. }
  36. .brand-text {
  37. display: block;
  38. }
  39. .brand-version {
  40. display: block;
  41. width: 100%;
  42. text-align: center;
  43. font-size: 10px;
  44. font-weight: 500;
  45. letter-spacing: 0;
  46. opacity: 0.6;
  47. margin-top: 2px;
  48. }
  49. .sider-brand-collapsed .brand-block {
  50. align-items: center;
  51. flex: 0 0 auto;
  52. }
  53. .brand-actions {
  54. display: inline-flex;
  55. align-items: center;
  56. gap: 2px;
  57. flex-shrink: 0;
  58. }
  59. .sidebar-donate {
  60. background: transparent;
  61. border: none;
  62. width: 30px;
  63. height: 30px;
  64. border-radius: 50%;
  65. display: inline-flex;
  66. align-items: center;
  67. justify-content: center;
  68. color: var(--ant-color-text-secondary);
  69. text-decoration: none;
  70. flex-shrink: 0;
  71. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  72. }
  73. .sidebar-donate:hover,
  74. .sidebar-donate:focus-visible {
  75. background-color: rgba(236, 72, 153, 0.12);
  76. color: #ec4899;
  77. transform: scale(1.08);
  78. outline: none;
  79. }
  80. .sidebar-donate .anticon {
  81. font-size: 16px;
  82. }
  83. .sidebar-theme-cycle {
  84. background: transparent;
  85. border: none;
  86. width: 30px;
  87. height: 30px;
  88. border-radius: 50%;
  89. display: inline-flex;
  90. align-items: center;
  91. justify-content: center;
  92. cursor: pointer;
  93. color: var(--ant-color-text-secondary);
  94. padding: 0;
  95. flex-shrink: 0;
  96. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  97. }
  98. .sidebar-theme-cycle:hover,
  99. .sidebar-theme-cycle:focus-visible {
  100. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  101. color: var(--ant-color-primary);
  102. transform: scale(1.08);
  103. outline: none;
  104. }
  105. .sidebar-theme-cycle .anticon {
  106. font-size: 16px;
  107. }
  108. .drawer-header-actions {
  109. display: inline-flex;
  110. align-items: center;
  111. gap: 4px;
  112. }
  113. .drawer-handle {
  114. position: fixed;
  115. top: 12px;
  116. left: 12px;
  117. z-index: 1100;
  118. background: rgba(0, 0, 0, 0.55);
  119. color: #fff;
  120. border: none;
  121. width: 40px;
  122. height: 40px;
  123. border-radius: 50%;
  124. cursor: pointer;
  125. display: none;
  126. align-items: center;
  127. justify-content: center;
  128. font-size: 18px;
  129. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  130. }
  131. .drawer-header {
  132. display: flex;
  133. align-items: center;
  134. justify-content: space-between;
  135. padding: 14px 16px;
  136. border-bottom: 1px solid var(--ant-color-border-secondary);
  137. }
  138. .drawer-close {
  139. background: transparent;
  140. border: none;
  141. width: 32px;
  142. height: 32px;
  143. border-radius: 50%;
  144. display: inline-flex;
  145. align-items: center;
  146. justify-content: center;
  147. cursor: pointer;
  148. font-size: 16px;
  149. color: var(--ant-color-text-secondary);
  150. }
  151. .drawer-close:hover,
  152. .drawer-close:focus-visible {
  153. background: var(--ant-color-fill-tertiary);
  154. }
  155. .drawer-menu .ant-menu-item {
  156. height: 48px;
  157. line-height: 48px;
  158. margin: 0;
  159. border-radius: 0;
  160. }
  161. .drawer-menu .ant-menu-item .anticon {
  162. font-size: 16px;
  163. }
  164. .drawer-utility {
  165. margin-top: auto;
  166. border-top: 1px solid var(--ant-color-border-secondary);
  167. }
  168. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  169. display: flex;
  170. flex-direction: column;
  171. height: 100%;
  172. }
  173. .sider-nav {
  174. flex: 1 1 auto;
  175. overflow-y: auto;
  176. overflow-x: hidden;
  177. min-height: 0;
  178. }
  179. .sider-utility {
  180. flex: 0 0 auto;
  181. border-top: 1px solid var(--ant-color-border-secondary);
  182. }
  183. @media (max-width: 768px) {
  184. .drawer-handle {
  185. display: inline-flex;
  186. }
  187. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children,
  188. .ant-sidebar > .ant-layout-sider .ant-layout-sider-trigger {
  189. display: none;
  190. }
  191. .ant-sidebar > .ant-layout-sider {
  192. flex: 0 0 0 !important;
  193. max-width: 0 !important;
  194. min-width: 0 !important;
  195. width: 0 !important;
  196. }
  197. }
  198. .sider-nav .ant-menu-item-selected,
  199. .sider-utility .ant-menu-item-selected,
  200. .drawer-menu .ant-menu-item-selected {
  201. background-color: color-mix(in srgb, var(--ant-color-primary) 20%, transparent) !important;
  202. color: var(--ant-color-primary) !important;
  203. }
  204. .sider-nav .ant-menu-item-active:not(.ant-menu-item-selected),
  205. .sider-utility .ant-menu-item-active:not(.ant-menu-item-selected),
  206. .drawer-menu .ant-menu-item-active:not(.ant-menu-item-selected),
  207. .sider-nav .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  208. .sider-utility .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  209. .drawer-menu .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover {
  210. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent) !important;
  211. color: var(--ant-color-primary) !important;
  212. }