AppSidebar.css 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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 16px 14px 24px;
  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. align-items: center;
  32. min-width: 0;
  33. line-height: 1.1;
  34. }
  35. .sider-brand-collapsed .brand-block {
  36. flex: 0 0 auto;
  37. }
  38. .brand-actions {
  39. display: inline-flex;
  40. align-items: center;
  41. gap: 2px;
  42. flex-shrink: 0;
  43. }
  44. .sidebar-donate {
  45. background: transparent;
  46. border: none;
  47. width: 30px;
  48. height: 30px;
  49. border-radius: 50%;
  50. display: inline-flex;
  51. align-items: center;
  52. justify-content: center;
  53. color: var(--ant-color-text-secondary);
  54. text-decoration: none;
  55. flex-shrink: 0;
  56. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  57. }
  58. .sidebar-donate:hover,
  59. .sidebar-donate:focus-visible {
  60. background-color: rgba(236, 72, 153, 0.12);
  61. color: #ec4899;
  62. transform: scale(1.08);
  63. outline: none;
  64. }
  65. .sidebar-donate .anticon {
  66. font-size: 16px;
  67. }
  68. .sidebar-docs {
  69. background: transparent;
  70. border: none;
  71. width: 30px;
  72. height: 30px;
  73. border-radius: 50%;
  74. display: inline-flex;
  75. align-items: center;
  76. justify-content: center;
  77. color: var(--ant-color-text-secondary);
  78. text-decoration: none;
  79. flex-shrink: 0;
  80. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  81. }
  82. .sidebar-docs:hover,
  83. .sidebar-docs:focus-visible {
  84. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  85. color: var(--ant-color-primary);
  86. transform: scale(1.08);
  87. outline: none;
  88. }
  89. .sidebar-docs .anticon {
  90. font-size: 16px;
  91. }
  92. .sidebar-theme-cycle {
  93. background: transparent;
  94. border: none;
  95. width: 30px;
  96. height: 30px;
  97. border-radius: 50%;
  98. display: inline-flex;
  99. align-items: center;
  100. justify-content: center;
  101. cursor: pointer;
  102. color: var(--ant-color-text-secondary);
  103. padding: 0;
  104. flex-shrink: 0;
  105. transition: background-color 0.2s, transform 0.15s, color 0.2s;
  106. }
  107. .sidebar-theme-cycle:hover,
  108. .sidebar-theme-cycle:focus-visible {
  109. background-color: color-mix(in srgb, var(--ant-color-primary) 12%, transparent);
  110. color: var(--ant-color-primary);
  111. transform: scale(1.08);
  112. outline: none;
  113. }
  114. .sidebar-theme-cycle .anticon {
  115. font-size: 16px;
  116. }
  117. .drawer-header-actions {
  118. display: inline-flex;
  119. align-items: center;
  120. gap: 4px;
  121. }
  122. .drawer-handle {
  123. position: fixed;
  124. top: 12px;
  125. left: 12px;
  126. z-index: 1100;
  127. background: rgba(0, 0, 0, 0.55);
  128. color: #fff;
  129. border: none;
  130. width: 40px;
  131. height: 40px;
  132. border-radius: 50%;
  133. cursor: pointer;
  134. display: none;
  135. align-items: center;
  136. justify-content: center;
  137. font-size: 18px;
  138. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  139. }
  140. .drawer-header {
  141. display: flex;
  142. align-items: center;
  143. justify-content: space-between;
  144. padding: 14px 16px;
  145. border-bottom: 1px solid var(--ant-color-border-secondary);
  146. }
  147. .drawer-close {
  148. background: transparent;
  149. border: none;
  150. width: 32px;
  151. height: 32px;
  152. border-radius: 50%;
  153. display: inline-flex;
  154. align-items: center;
  155. justify-content: center;
  156. cursor: pointer;
  157. font-size: 16px;
  158. color: var(--ant-color-text-secondary);
  159. }
  160. .drawer-close:hover,
  161. .drawer-close:focus-visible {
  162. background: var(--ant-color-fill-tertiary);
  163. }
  164. .drawer-menu .ant-menu-item {
  165. height: 48px;
  166. line-height: 48px;
  167. margin: 0;
  168. border-radius: 0;
  169. }
  170. .drawer-menu .ant-menu-item .anticon {
  171. font-size: 16px;
  172. }
  173. .drawer-utility {
  174. margin-top: auto;
  175. border-top: 1px solid var(--ant-color-border-secondary);
  176. }
  177. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children {
  178. display: flex;
  179. flex-direction: column;
  180. height: 100%;
  181. }
  182. .sider-nav {
  183. flex: 1 1 auto;
  184. overflow-y: auto;
  185. overflow-x: hidden;
  186. min-height: 0;
  187. }
  188. .sider-utility {
  189. flex: 0 0 auto;
  190. border-top: 1px solid var(--ant-color-border-secondary);
  191. }
  192. .sider-footer {
  193. flex: 0 0 auto;
  194. padding: 8px 8px 12px;
  195. }
  196. .sider-version {
  197. display: flex;
  198. align-items: center;
  199. justify-content: flex-start;
  200. gap: 10px;
  201. width: 100%;
  202. padding: 8px 16px;
  203. color: var(--ant-color-text-secondary);
  204. font-size: 13px;
  205. font-weight: 500;
  206. font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  207. text-decoration: none;
  208. transition: color 0.2s;
  209. }
  210. .sider-version .anticon {
  211. font-size: 16px;
  212. }
  213. .sider-version:hover,
  214. .sider-version:focus-visible {
  215. color: var(--ant-color-primary);
  216. outline: none;
  217. }
  218. .sider-version.is-collapsed {
  219. justify-content: center;
  220. padding: 8px 0;
  221. }
  222. .drawer-footer {
  223. flex: 0 0 auto;
  224. padding: 8px 8px 12px;
  225. }
  226. @media (max-width: 768px) {
  227. .drawer-handle {
  228. display: inline-flex;
  229. }
  230. .ant-sidebar > .ant-layout-sider .ant-layout-sider-children,
  231. .ant-sidebar > .ant-layout-sider .ant-layout-sider-trigger {
  232. display: none;
  233. }
  234. .ant-sidebar > .ant-layout-sider {
  235. flex: 0 0 0 !important;
  236. max-width: 0 !important;
  237. min-width: 0 !important;
  238. width: 0 !important;
  239. }
  240. }
  241. body.dark .ant-drawer-content,
  242. body.dark .ant-drawer-body {
  243. background-color: #15161a;
  244. }
  245. html[data-theme="ultra-dark"] body.dark .ant-drawer-content,
  246. html[data-theme="ultra-dark"] body.dark .ant-drawer-body {
  247. background-color: #050507;
  248. }
  249. body.dark .ant-drawer-body .drawer-menu,
  250. body.dark .ant-drawer-body .drawer-menu.ant-menu-dark,
  251. body.dark .ant-drawer-body .drawer-menu .ant-menu-item,
  252. body.dark .ant-drawer-body .drawer-menu .ant-menu-sub,
  253. body.dark .ant-drawer-body .drawer-menu .ant-menu-item-group-list {
  254. background-color: transparent;
  255. }
  256. .sider-nav .ant-menu-item-selected,
  257. .sider-utility .ant-menu-item-selected,
  258. .drawer-menu .ant-menu-item-selected {
  259. background-color: color-mix(in srgb, var(--ant-color-primary) 20%, transparent) !important;
  260. color: var(--ant-color-primary) !important;
  261. }
  262. .sider-nav .ant-menu-item-active:not(.ant-menu-item-selected),
  263. .sider-utility .ant-menu-item-active:not(.ant-menu-item-selected),
  264. .drawer-menu .ant-menu-item-active:not(.ant-menu-item-selected),
  265. .sider-nav .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  266. .sider-utility .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover,
  267. .drawer-menu .ant-menu-item:not(.ant-menu-item-selected):not(.ant-menu-item-disabled):hover {
  268. background-color: color-mix(in srgb, var(--ant-color-primary) 10%, transparent) !important;
  269. color: var(--ant-color-primary) !important;
  270. }