notifications.scss 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. @use '../../../../styles/variables' as *;
  2. @use '../../../../styles/mixins' as *;
  3. .notifications-container {
  4. min-height: 100vh;
  5. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  6. padding-bottom: 80px;
  7. .header {
  8. @include header-style();
  9. background: rgba(255, 255, 255, 0.95);
  10. backdrop-filter: blur(15px);
  11. border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  12. box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  13. position: sticky;
  14. top: 0;
  15. z-index: 100;
  16. .header-left {
  17. .back-icon {
  18. width: 24px;
  19. height: 24px;
  20. color: var(--primary-color);
  21. transition: all 0.3s ease;
  22. &:hover {
  23. transform: scale(1.1);
  24. color: var(--primary-dark);
  25. }
  26. }
  27. }
  28. .header-title {
  29. font-size: 18px;
  30. font-weight: 600;
  31. color: var(--text-primary);
  32. background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  33. -webkit-background-clip: text;
  34. -webkit-text-fill-color: transparent;
  35. background-clip: text;
  36. }
  37. .header-right {
  38. .mark-all-read {
  39. padding: 8px 16px;
  40. background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  41. color: white;
  42. border-radius: 20px;
  43. font-size: 12px;
  44. font-weight: 600;
  45. cursor: pointer;
  46. transition: all 0.3s ease;
  47. box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
  48. &:hover {
  49. transform: translateY(-2px);
  50. box-shadow: 0 6px 25px rgba(var(--primary-rgb), 0.4);
  51. }
  52. }
  53. }
  54. }
  55. .notifications-list {
  56. padding: 20px;
  57. display: flex;
  58. flex-direction: column;
  59. gap: 16px;
  60. .notification-item {
  61. display: flex;
  62. align-items: flex-start;
  63. gap: 16px;
  64. padding: 20px;
  65. background: rgba(255, 255, 255, 0.95);
  66. border-radius: 16px;
  67. box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  68. transition: all 0.3s ease;
  69. cursor: pointer;
  70. border: 1px solid rgba(255, 255, 255, 0.2);
  71. backdrop-filter: blur(10px);
  72. position: relative;
  73. overflow: hidden;
  74. &::before {
  75. content: '';
  76. position: absolute;
  77. top: 0;
  78. left: 0;
  79. width: 4px;
  80. height: 100%;
  81. background: transparent;
  82. transition: all 0.3s ease;
  83. }
  84. &:hover {
  85. transform: translateY(-3px);
  86. box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  87. &::before {
  88. background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  89. }
  90. }
  91. &.unread {
  92. background: rgba(255, 255, 255, 0.98);
  93. border-color: rgba(var(--primary-rgb), 0.2);
  94. box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.15);
  95. &::before {
  96. background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  97. }
  98. .notification-content {
  99. .notification-title {
  100. font-weight: 700;
  101. color: var(--text-primary);
  102. }
  103. }
  104. }
  105. .notification-icon {
  106. position: relative;
  107. flex-shrink: 0;
  108. width: 48px;
  109. height: 48px;
  110. border-radius: 50%;
  111. background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  112. @include center-flex;
  113. box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
  114. .icon {
  115. width: 24px;
  116. height: 24px;
  117. color: var(--primary-color);
  118. }
  119. .unread-dot {
  120. position: absolute;
  121. top: 2px;
  122. right: 2px;
  123. width: 12px;
  124. height: 12px;
  125. background: linear-gradient(135deg, #ff4757, #ff3742);
  126. border-radius: 50%;
  127. border: 2px solid white;
  128. box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
  129. animation: pulse 2s infinite;
  130. }
  131. }
  132. .notification-content {
  133. flex: 1;
  134. min-width: 0;
  135. .notification-header {
  136. display: flex;
  137. justify-content: space-between;
  138. align-items: flex-start;
  139. margin-bottom: 8px;
  140. gap: 12px;
  141. .notification-title {
  142. font-size: 16px;
  143. font-weight: 600;
  144. color: var(--text-primary);
  145. line-height: 1.4;
  146. flex: 1;
  147. min-width: 0;
  148. word-break: break-word;
  149. }
  150. .notification-time {
  151. font-size: 12px;
  152. color: var(--text-secondary);
  153. white-space: nowrap;
  154. flex-shrink: 0;
  155. background: rgba(var(--text-secondary-rgb), 0.1);
  156. padding: 4px 8px;
  157. border-radius: 8px;
  158. }
  159. }
  160. .notification-message {
  161. font-size: 14px;
  162. color: var(--text-secondary);
  163. line-height: 1.5;
  164. word-break: break-word;
  165. display: -webkit-box;
  166. -webkit-line-clamp: 2;
  167. line-clamp: 2;
  168. -webkit-box-orient: vertical;
  169. overflow: hidden;
  170. }
  171. }
  172. .notification-actions {
  173. flex-shrink: 0;
  174. .delete-btn {
  175. width: 36px;
  176. height: 36px;
  177. border-radius: 50%;
  178. background: rgba(255, 255, 255, 0.8);
  179. @include center-flex;
  180. cursor: pointer;
  181. transition: all 0.3s ease;
  182. border: 1px solid rgba(0, 0, 0, 0.1);
  183. .delete-icon {
  184. width: 18px;
  185. height: 18px;
  186. color: var(--text-secondary);
  187. transition: all 0.3s ease;
  188. }
  189. &:hover {
  190. background: #ff4757;
  191. border-color: #ff4757;
  192. transform: scale(1.1);
  193. box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  194. .delete-icon {
  195. color: white;
  196. }
  197. }
  198. }
  199. }
  200. }
  201. }
  202. .empty-state {
  203. @include center-flex;
  204. flex-direction: column;
  205. padding: 80px 20px;
  206. text-align: center;
  207. .empty-icon {
  208. width: 100px;
  209. height: 100px;
  210. color: rgba(255, 255, 255, 0.6);
  211. margin-bottom: 24px;
  212. opacity: 0.8;
  213. }
  214. .empty-text {
  215. font-size: 20px;
  216. font-weight: 600;
  217. color: rgba(255, 255, 255, 0.9);
  218. text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  219. }
  220. }
  221. }
  222. @keyframes pulse {
  223. 0% {
  224. transform: scale(1);
  225. opacity: 1;
  226. }
  227. 50% {
  228. transform: scale(1.2);
  229. opacity: 0.7;
  230. }
  231. 100% {
  232. transform: scale(1);
  233. opacity: 1;
  234. }
  235. }
  236. // 平板响应式设计
  237. @include tablet {
  238. .notifications-container {
  239. .notifications-list {
  240. padding: 24px;
  241. gap: 20px;
  242. .notification-item {
  243. padding: 24px;
  244. .notification-icon {
  245. width: 52px;
  246. height: 52px;
  247. .icon {
  248. width: 26px;
  249. height: 26px;
  250. }
  251. }
  252. .notification-content {
  253. .notification-header {
  254. .notification-title {
  255. font-size: 17px;
  256. }
  257. .notification-time {
  258. font-size: 13px;
  259. }
  260. }
  261. .notification-message {
  262. font-size: 15px;
  263. }
  264. }
  265. }
  266. }
  267. .empty-state {
  268. padding: 100px 24px;
  269. .empty-icon {
  270. width: 120px;
  271. height: 120px;
  272. }
  273. .empty-text {
  274. font-size: 22px;
  275. }
  276. }
  277. }
  278. }
  279. // 移动端响应式设计
  280. @include mobile {
  281. .notifications-container {
  282. .header {
  283. padding: 12px 16px;
  284. .header-title {
  285. font-size: 16px;
  286. }
  287. .header-left {
  288. .back-icon {
  289. width: 20px;
  290. height: 20px;
  291. }
  292. }
  293. .header-right {
  294. .mark-all-read {
  295. padding: 6px 12px;
  296. font-size: 11px;
  297. }
  298. }
  299. }
  300. .notifications-list {
  301. padding: 16px;
  302. gap: 12px;
  303. .notification-item {
  304. padding: 16px;
  305. gap: 12px;
  306. .notification-icon {
  307. width: 40px;
  308. height: 40px;
  309. .icon {
  310. width: 20px;
  311. height: 20px;
  312. }
  313. .unread-dot {
  314. width: 10px;
  315. height: 10px;
  316. top: 1px;
  317. right: 1px;
  318. }
  319. }
  320. .notification-content {
  321. .notification-header {
  322. margin-bottom: 6px;
  323. gap: 8px;
  324. .notification-title {
  325. font-size: 14px;
  326. }
  327. .notification-time {
  328. font-size: 11px;
  329. padding: 3px 6px;
  330. }
  331. }
  332. .notification-message {
  333. font-size: 13px;
  334. display: -webkit-box;
  335. -webkit-line-clamp: 3;
  336. line-clamp: 3;
  337. -webkit-box-orient: vertical;
  338. overflow: hidden;
  339. }
  340. }
  341. .notification-actions {
  342. .delete-btn {
  343. width: 32px;
  344. height: 32px;
  345. .delete-icon {
  346. width: 16px;
  347. height: 16px;
  348. }
  349. }
  350. }
  351. }
  352. }
  353. .empty-state {
  354. padding: 60px 16px;
  355. .empty-icon {
  356. width: 80px;
  357. height: 80px;
  358. margin-bottom: 20px;
  359. }
  360. .empty-text {
  361. font-size: 18px;
  362. }
  363. }
  364. }
  365. }