customer-service-layout.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. // 全局变量定义
  2. $primary-color: #165DFF;
  3. $primary-dark: #0E42CB;
  4. $secondary-color: #4E5BA6;
  5. $success-color: #00B42A;
  6. $warning-color: #FF7D00;
  7. $danger-color: #F53F3F;
  8. $text-primary: #1D2129;
  9. $text-secondary: #4E5969;
  10. $text-tertiary: #86909C;
  11. $border-color: #E5E6EB;
  12. $background-primary: #FFFFFF;
  13. $background-secondary: #F2F3F5;
  14. $background-tertiary: #F7F8FA;
  15. $shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  16. $shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  17. $shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  18. $border-radius: 8px;
  19. $transition: all 0.3s ease;
  20. // 顶部导航栏
  21. .top-navbar {
  22. display: flex;
  23. align-items: center;
  24. justify-content: space-between;
  25. padding: 0 24px;
  26. height: 64px;
  27. background-color: $background-primary;
  28. border-bottom: 1px solid $border-color;
  29. box-shadow: $shadow-sm;
  30. position: sticky;
  31. top: 0;
  32. z-index: 1000;
  33. .navbar-left {
  34. display: flex;
  35. align-items: center;
  36. gap: 16px;
  37. }
  38. .menu-toggle {
  39. display: none;
  40. background: none;
  41. border: none;
  42. cursor: pointer;
  43. color: $text-primary;
  44. padding: 8px;
  45. transition: $transition;
  46. &:hover {
  47. color: $primary-color;
  48. }
  49. }
  50. .app-title {
  51. font-size: 20px;
  52. font-weight: 600;
  53. color: $text-primary;
  54. }
  55. .navbar-center {
  56. flex: 1;
  57. max-width: 500px;
  58. margin: 0 20px;
  59. }
  60. .search-container {
  61. display: flex;
  62. align-items: center;
  63. background-color: $background-tertiary;
  64. border-radius: $border-radius;
  65. padding: 6px 12px;
  66. border: 1px solid $border-color;
  67. .search-input {
  68. flex: 1;
  69. background: none;
  70. border: none;
  71. outline: none;
  72. padding: 6px 8px;
  73. font-size: 14px;
  74. color: $text-primary;
  75. &::placeholder {
  76. color: $text-tertiary;
  77. }
  78. }
  79. .search-button {
  80. background: none;
  81. border: none;
  82. cursor: pointer;
  83. color: $text-secondary;
  84. padding: 4px;
  85. transition: $transition;
  86. &:hover {
  87. color: $primary-color;
  88. }
  89. }
  90. }
  91. .navbar-right {
  92. display: flex;
  93. align-items: center;
  94. gap: 16px;
  95. }
  96. .notification-btn {
  97. position: relative;
  98. background: none;
  99. border: none;
  100. cursor: pointer;
  101. color: $text-secondary;
  102. padding: 8px;
  103. transition: $transition;
  104. &:hover {
  105. color: $primary-color;
  106. }
  107. .notification-badge {
  108. position: absolute;
  109. top: 2px;
  110. right: 2px;
  111. background-color: $danger-color;
  112. color: white;
  113. font-size: 10px;
  114. font-weight: 500;
  115. padding: 2px 6px;
  116. border-radius: 10px;
  117. min-width: 18px;
  118. text-align: center;
  119. }
  120. }
  121. .user-profile {
  122. display: flex;
  123. align-items: center;
  124. gap: 8px;
  125. .user-avatar {
  126. width: 36px;
  127. height: 36px;
  128. border-radius: 50%;
  129. object-fit: cover;
  130. }
  131. .user-name {
  132. font-size: 14px;
  133. font-weight: 500;
  134. color: $text-primary;
  135. }
  136. }
  137. }
  138. // 主要内容区
  139. .main-content {
  140. display: flex;
  141. flex: 1;
  142. overflow: hidden;
  143. }
  144. // 左侧侧边栏
  145. .sidebar {
  146. width: 220px;
  147. background-color: $background-primary;
  148. border-right: 1px solid $border-color;
  149. display: flex;
  150. flex-direction: column;
  151. transition: $transition;
  152. .sidebar-nav {
  153. flex: 1;
  154. padding: 16px 0;
  155. .nav-item {
  156. display: flex;
  157. align-items: center;
  158. gap: 12px;
  159. padding: 12px 24px;
  160. color: $text-secondary;
  161. text-decoration: none;
  162. border-left: 3px solid transparent;
  163. transition: $transition;
  164. &:hover {
  165. background-color: $background-tertiary;
  166. color: $primary-color;
  167. }
  168. &.active {
  169. color: $primary-color;
  170. background-color: color-mix(in srgb, $primary-color 5%, transparent);
  171. border-left-color: $primary-color;
  172. font-weight: 500;
  173. }
  174. }
  175. }
  176. .sidebar-footer {
  177. padding: 16px 24px;
  178. border-top: 1px solid $border-color;
  179. .storage-info {
  180. margin-bottom: 16px;
  181. font-size: 12px;
  182. color: $text-tertiary;
  183. }
  184. .logout-btn {
  185. display: flex;
  186. align-items: center;
  187. gap: 8px;
  188. padding: 8px 12px;
  189. background: none;
  190. border: 1px solid $border-color;
  191. border-radius: $border-radius;
  192. color: $text-secondary;
  193. cursor: pointer;
  194. font-size: 14px;
  195. transition: $transition;
  196. &:hover {
  197. background-color: $background-tertiary;
  198. border-color: $danger-color;
  199. color: $danger-color;
  200. }
  201. }
  202. }
  203. &.collapsed {
  204. width: 0;
  205. overflow: hidden;
  206. }
  207. }
  208. // 中间内容区
  209. .content-wrapper {
  210. flex: 1;
  211. overflow-y: auto;
  212. padding: 24px;
  213. transition: $transition;
  214. &.expanded {
  215. width: 100%;
  216. }
  217. }
  218. // 响应式设计
  219. @media (max-width: 1024px) {
  220. .sidebar {
  221. width: 200px;
  222. }
  223. }
  224. @media (max-width: 768px) {
  225. .top-navbar {
  226. padding: 0 16px;
  227. .menu-toggle {
  228. display: block;
  229. }
  230. .app-title {
  231. font-size: 18px;
  232. }
  233. .navbar-center {
  234. display: none;
  235. }
  236. }
  237. .sidebar {
  238. position: fixed;
  239. top: 64px;
  240. left: 0;
  241. height: calc(100vh - 64px);
  242. z-index: 900;
  243. transform: translateX(0);
  244. &.collapsed {
  245. transform: translateX(-100%);
  246. }
  247. }
  248. .content-wrapper {
  249. padding: 16px;
  250. margin-left: 0;
  251. }
  252. }
  253. @media (max-width: 480px) {
  254. .top-navbar {
  255. height: 56px;
  256. .navbar-right {
  257. gap: 12px;
  258. }
  259. }
  260. .sidebar {
  261. top: 56px;
  262. height: calc(100vh - 56px);
  263. }
  264. .content-wrapper {
  265. padding: 12px;
  266. }
  267. }