AppSidebar.css 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. .ant-sidebar {
  2. flex: 0 0 var(--sider-rail, 72px);
  3. width: var(--sider-rail, 72px);
  4. position: relative;
  5. z-index: 210;
  6. }
  7. .ant-sidebar > .ant-layout-sider {
  8. position: sticky;
  9. top: 0;
  10. height: 100vh;
  11. align-self: flex-start;
  12. }
  13. .ant-sidebar:not(.sidebar-pinned) > .ant-layout-sider:not(.ant-layout-sider-collapsed) {
  14. box-shadow: 0 0 32px rgba(0, 0, 0, 0.22);
  15. }
  16. .sider-nav .ant-menu-item .anticon,
  17. .sider-nav .ant-menu-submenu-title .anticon,
  18. .sider-utility .ant-menu-item .anticon {
  19. font-size: 16px;
  20. }
  21. .sider-brand,
  22. .drawer-brand {
  23. font-weight: 600;
  24. font-size: 18px;
  25. letter-spacing: 0.5px;
  26. color: var(--ant-color-text);
  27. }
  28. .sider-brand {
  29. display: flex;
  30. align-items: center;
  31. justify-content: space-between;
  32. gap: 8px;
  33. height: 58px;
  34. padding: 0 16px 0 24px;
  35. border-bottom: 1px solid var(--ant-color-border-secondary);
  36. user-select: none;
  37. white-space: nowrap;
  38. overflow: hidden;
  39. }
  40. .brand-block {
  41. display: inline-flex;
  42. align-items: center;
  43. min-width: 0;
  44. line-height: 1.1;
  45. }
  46. .brand-actions {
  47. display: inline-flex;
  48. align-items: center;
  49. gap: 0;
  50. flex-shrink: 0;
  51. }
  52. .brand-actions .sidebar-pin,
  53. .brand-actions .sidebar-docs,
  54. .brand-actions .sidebar-donate,
  55. .brand-actions .sidebar-theme-cycle {
  56. width: 26px;
  57. height: 26px;
  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:
  72. background-color 0.2s,
  73. transform 0.15s,
  74. color 0.2s;
  75. }
  76. .sidebar-donate:hover,
  77. .sidebar-donate:focus-visible {
  78. background-color: rgba(236, 72, 153, 0.12);
  79. color: #ec4899;
  80. transform: scale(1.08);
  81. outline: none;
  82. }
  83. .sidebar-donate .anticon {
  84. font-size: 16px;
  85. }
  86. .sidebar-docs {
  87. background: transparent;
  88. border: none;
  89. width: 30px;
  90. height: 30px;
  91. border-radius: 50%;
  92. display: inline-flex;
  93. align-items: center;
  94. justify-content: center;
  95. color: var(--ant-color-text-secondary);
  96. text-decoration: none;
  97. flex-shrink: 0;
  98. transition:
  99. background-color 0.2s,
  100. transform 0.15s,
  101. color 0.2s;
  102. }
  103. .sidebar-docs:hover,
  104. .sidebar-docs:focus-visible {
  105. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  106. color: var(--ant-color-primary);
  107. transform: scale(1.08);
  108. outline: none;
  109. }
  110. .sidebar-docs .anticon {
  111. font-size: 16px;
  112. }
  113. .sidebar-theme-cycle {
  114. background: transparent;
  115. border: none;
  116. width: 30px;
  117. height: 30px;
  118. border-radius: 50%;
  119. display: inline-flex;
  120. align-items: center;
  121. justify-content: center;
  122. cursor: pointer;
  123. color: var(--ant-color-text-secondary);
  124. padding: 0;
  125. flex-shrink: 0;
  126. transition:
  127. background-color 0.2s,
  128. transform 0.15s,
  129. color 0.2s;
  130. }
  131. .sidebar-theme-cycle:hover,
  132. .sidebar-theme-cycle:focus-visible {
  133. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  134. color: var(--ant-color-primary);
  135. transform: scale(1.08);
  136. outline: none;
  137. }
  138. .sidebar-theme-cycle .anticon {
  139. font-size: 16px;
  140. }
  141. .drawer-header-actions {
  142. display: inline-flex;
  143. align-items: center;
  144. gap: 4px;
  145. }
  146. .drawer-handle {
  147. position: fixed;
  148. top: 12px;
  149. left: 12px;
  150. z-index: 1100;
  151. background: rgba(0, 0, 0, 0.55);
  152. color: #fff;
  153. border: none;
  154. width: 40px;
  155. height: 40px;
  156. border-radius: 50%;
  157. cursor: pointer;
  158. display: none;
  159. align-items: center;
  160. justify-content: center;
  161. font-size: 18px;
  162. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  163. }
  164. .drawer-header {
  165. display: flex;
  166. align-items: center;
  167. justify-content: space-between;
  168. padding: 14px 16px;
  169. border-bottom: 1px solid var(--ant-color-border-secondary);
  170. }
  171. .drawer-close {
  172. background: transparent;
  173. border: none;
  174. width: 32px;
  175. height: 32px;
  176. border-radius: 50%;
  177. display: inline-flex;
  178. align-items: center;
  179. justify-content: center;
  180. cursor: pointer;
  181. font-size: 16px;
  182. color: var(--ant-color-text-secondary);
  183. }
  184. .drawer-close:hover,
  185. .drawer-close:focus-visible {
  186. background: var(--ant-color-fill-tertiary);
  187. }
  188. .drawer-menu .ant-menu-item {
  189. height: 48px;
  190. line-height: 48px;
  191. margin: 0;
  192. border-radius: 0;
  193. }
  194. .drawer-menu .ant-menu-item .anticon {
  195. font-size: 16px;
  196. }
  197. .drawer-utility {
  198. margin-top: auto;
  199. border-top: 1px solid var(--ant-color-border-secondary);
  200. }
  201. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  202. display: flex;
  203. flex-direction: column;
  204. height: 100%;
  205. }
  206. .sider-nav {
  207. flex: 1 1 auto;
  208. overflow-y: auto;
  209. overflow-x: hidden;
  210. min-height: 0;
  211. }
  212. .sider-utility {
  213. flex: 0 0 auto;
  214. border-top: 1px solid var(--ant-color-border-secondary);
  215. }
  216. .sider-footer {
  217. flex: 0 0 auto;
  218. padding: 8px 8px 12px;
  219. }
  220. .sider-sponsor {
  221. margin-bottom: 6px;
  222. }
  223. .sidebar-pin {
  224. display: inline-flex;
  225. align-items: center;
  226. justify-content: center;
  227. width: 30px;
  228. height: 30px;
  229. padding: 0;
  230. border: none;
  231. border-radius: 50%;
  232. background: transparent;
  233. color: var(--ant-color-text-secondary);
  234. cursor: pointer;
  235. flex-shrink: 0;
  236. transition:
  237. background-color 0.2s,
  238. transform 0.15s,
  239. color 0.2s;
  240. }
  241. .sidebar-pin:hover,
  242. .sidebar-pin:focus-visible {
  243. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent);
  244. color: var(--ant-color-primary);
  245. transform: scale(1.08);
  246. outline: none;
  247. }
  248. .sidebar-pin .anticon {
  249. font-size: 16px;
  250. }
  251. .sider-version {
  252. display: flex;
  253. align-items: center;
  254. justify-content: flex-start;
  255. gap: 10px;
  256. width: 100%;
  257. padding: 8px 16px;
  258. color: var(--ant-color-text-secondary);
  259. font-size: 13px;
  260. font-weight: 500;
  261. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  262. text-decoration: none;
  263. transition: color 0.2s;
  264. }
  265. .ant-layout-sider-collapsed .sider-version {
  266. justify-content: center;
  267. padding: 8px 0;
  268. }
  269. .sider-version .anticon {
  270. font-size: 16px;
  271. }
  272. .sider-version:hover,
  273. .sider-version:focus-visible {
  274. color: var(--ant-color-primary);
  275. outline: none;
  276. }
  277. .drawer-footer {
  278. flex: 0 0 auto;
  279. padding: 8px 8px 12px;
  280. }
  281. @media (max-width: 768px) {
  282. .drawer-handle {
  283. display: inline-flex;
  284. }
  285. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  286. display: none;
  287. }
  288. .ant-sidebar > .ant-layout-sider {
  289. flex: 0 0 0 !important;
  290. max-width: 0 !important;
  291. min-width: 0 !important;
  292. width: 0 !important;
  293. }
  294. .ant-sidebar {
  295. flex: 0 0 0;
  296. width: 0;
  297. }
  298. }
  299. body.dark .ant-drawer-content,
  300. body.dark .ant-drawer-body {
  301. background-color: #15161a;
  302. }
  303. html[data-theme='ultra-dark'] body.dark .ant-drawer-content,
  304. html[data-theme='ultra-dark'] body.dark .ant-drawer-body {
  305. background-color: #050507;
  306. }
  307. body.dark .ant-drawer-body .drawer-menu,
  308. body.dark .ant-drawer-body .drawer-menu.ant-menu-dark,
  309. body.dark .ant-drawer-body .drawer-menu .ant-menu-item,
  310. body.dark .ant-drawer-body .drawer-menu .ant-menu-sub,
  311. body.dark .ant-drawer-body .drawer-menu .ant-menu-item-group-list {
  312. background-color: transparent;
  313. }
  314. .sider-nav .ant-menu-item-selected,
  315. .sider-utility .ant-menu-item-selected,
  316. .drawer-menu .ant-menu-item-selected {
  317. background-color: color-mix(in srgb, var(--ant-color-primary) 20%, transparent) !important;
  318. color: var(--ant-color-primary) !important;
  319. }
  320. .sider-nav .ant-menu-item-active:not(.ant-menu-item-selected),
  321. .sider-utility .ant-menu-item-active:not(.ant-menu-item-selected),
  322. .drawer-menu .ant-menu-item-active:not(.ant-menu-item-selected),
  323. .sider-nav .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  324. .sider-utility .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  325. .drawer-menu .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover {
  326. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent) !important;
  327. color: var(--ant-color-primary) !important;
  328. }