AppSidebar.css 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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: 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-docs {
  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. color: var(--ant-color-text-secondary);
  93. text-decoration: none;
  94. flex-shrink: 0;
  95. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  96. }
  97. .sidebar-docs:hover,
  98. .sidebar-docs:focus-visible {
  99. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  100. color: var(--ant-color-primary);
  101. transform: scale(1.08);
  102. outline: none;
  103. }
  104. .sidebar-docs .anticon {
  105. font-size: 16px;
  106. }
  107. .sidebar-theme-cycle {
  108. background: transparent;
  109. border: none;
  110. width: 30px;
  111. height: 30px;
  112. border-radius: 50%;
  113. display: inline-flex;
  114. align-items: center;
  115. justify-content: center;
  116. cursor: pointer;
  117. color: var(--ant-color-text-secondary);
  118. padding: 0;
  119. flex-shrink: 0;
  120. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  121. }
  122. .sidebar-theme-cycle:hover,
  123. .sidebar-theme-cycle:focus-visible {
  124. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  125. color: var(--ant-color-primary);
  126. transform: scale(1.08);
  127. outline: none;
  128. }
  129. .sidebar-theme-cycle .anticon {
  130. font-size: 16px;
  131. }
  132. .drawer-header-actions {
  133. display: inline-flex;
  134. align-items: center;
  135. gap: 4px;
  136. }
  137. .drawer-handle {
  138. position: fixed;
  139. top: 12px;
  140. left: 12px;
  141. z-index: 1100;
  142. background: rgba(0, 0, 0, 0.55);
  143. color: #fff;
  144. border: none;
  145. width: 40px;
  146. height: 40px;
  147. border-radius: 50%;
  148. cursor: pointer;
  149. display: none;
  150. align-items: center;
  151. justify-content: center;
  152. font-size: 18px;
  153. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  154. }
  155. .drawer-header {
  156. display: flex;
  157. align-items: center;
  158. justify-content: space-between;
  159. padding: 14px 16px;
  160. border-bottom: 1px solid var(--ant-color-border-secondary);
  161. }
  162. .drawer-close {
  163. background: transparent;
  164. border: none;
  165. width: 32px;
  166. height: 32px;
  167. border-radius: 50%;
  168. display: inline-flex;
  169. align-items: center;
  170. justify-content: center;
  171. cursor: pointer;
  172. font-size: 16px;
  173. color: var(--ant-color-text-secondary);
  174. }
  175. .drawer-close:hover,
  176. .drawer-close:focus-visible {
  177. background: var(--ant-color-fill-tertiary);
  178. }
  179. .drawer-menu .ant-menu-item {
  180. height: 48px;
  181. line-height: 48px;
  182. margin: 0;
  183. border-radius: 0;
  184. }
  185. .drawer-menu .ant-menu-item .anticon {
  186. font-size: 16px;
  187. }
  188. .drawer-utility {
  189. margin-top: auto;
  190. border-top: 1px solid var(--ant-color-border-secondary);
  191. }
  192. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  193. display: flex;
  194. flex-direction: column;
  195. height: 100%;
  196. }
  197. .sider-nav {
  198. flex: 1 1 auto;
  199. overflow-y: auto;
  200. overflow-x: hidden;
  201. min-height: 0;
  202. }
  203. .sider-utility {
  204. flex: 0 0 auto;
  205. border-top: 1px solid var(--ant-color-border-secondary);
  206. }
  207. .sider-footer {
  208. flex: 0 0 auto;
  209. padding: 8px 8px 12px;
  210. }
  211. .sidebar-pin {
  212. display: inline-flex;
  213. align-items: center;
  214. justify-content: center;
  215. width: 30px;
  216. height: 30px;
  217. padding: 0;
  218. border: none;
  219. border-radius: 50%;
  220. background: transparent;
  221. color: var(--ant-color-text-secondary);
  222. cursor: pointer;
  223. flex-shrink: 0;
  224. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  225. }
  226. .sidebar-pin:hover,
  227. .sidebar-pin:focus-visible {
  228. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent);
  229. color: var(--ant-color-primary);
  230. transform: scale(1.08);
  231. outline: none;
  232. }
  233. .sidebar-pin .anticon {
  234. font-size: 16px;
  235. }
  236. .sider-version {
  237. display: flex;
  238. align-items: center;
  239. justify-content: flex-start;
  240. gap: 10px;
  241. width: 100%;
  242. padding: 8px 16px;
  243. color: var(--ant-color-text-secondary);
  244. font-size: 13px;
  245. font-weight: 500;
  246. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  247. text-decoration: none;
  248. transition: color 0.2s;
  249. }
  250. .ant-layout-sider-collapsed .sider-version {
  251. justify-content: center;
  252. padding: 8px 0;
  253. }
  254. .sider-version .anticon {
  255. font-size: 16px;
  256. }
  257. .sider-version:hover,
  258. .sider-version:focus-visible {
  259. color: var(--ant-color-primary);
  260. outline: none;
  261. }
  262. .drawer-footer {
  263. flex: 0 0 auto;
  264. padding: 8px 8px 12px;
  265. }
  266. @media (max-width: 768px) {
  267. .drawer-handle {
  268. display: inline-flex;
  269. }
  270. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  271. display: none;
  272. }
  273. .ant-sidebar > .ant-layout-sider {
  274. flex: 0 0 0 !important;
  275. max-width: 0 !important;
  276. min-width: 0 !important;
  277. width: 0 !important;
  278. }
  279. .ant-sidebar {
  280. flex: 0 0 0;
  281. width: 0;
  282. }
  283. }
  284. body.dark .ant-drawer-content,
  285. body.dark .ant-drawer-body {
  286. background-color: #15161a;
  287. }
  288. html[data-theme="ultra-dark"] body.dark .ant-drawer-content,
  289. html[data-theme="ultra-dark"] body.dark .ant-drawer-body {
  290. background-color: #050507;
  291. }
  292. body.dark .ant-drawer-body .drawer-menu,
  293. body.dark .ant-drawer-body .drawer-menu.ant-menu-dark,
  294. body.dark .ant-drawer-body .drawer-menu .ant-menu-item,
  295. body.dark .ant-drawer-body .drawer-menu .ant-menu-sub,
  296. body.dark .ant-drawer-body .drawer-menu .ant-menu-item-group-list {
  297. background-color: transparent;
  298. }
  299. .sider-nav .ant-menu-item-selected,
  300. .sider-utility .ant-menu-item-selected,
  301. .drawer-menu .ant-menu-item-selected {
  302. background-color: color-mix(in srgb, var(--ant-color-primary) 20%, transparent) !important;
  303. color: var(--ant-color-primary) !important;
  304. }
  305. .sider-nav .ant-menu-item-active:not(.ant-menu-item-selected),
  306. .sider-utility .ant-menu-item-active:not(.ant-menu-item-selected),
  307. .drawer-menu .ant-menu-item-active:not(.ant-menu-item-selected),
  308. .sider-nav .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  309. .sider-utility .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  310. .drawer-menu .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover {
  311. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent) !important;
  312. color: var(--ant-color-primary) !important;
  313. }