TRM-coding | d1cbf67 | 2025-06-18 15:15:08 +0800 | [diff] [blame^] | 1 | @import "~antd/dist/antd.css"; |
| 2 | |
| 3 | /* 整体容器背景,弱化底层 */ |
| 4 | .admin-container { |
| 5 | background-color: #f5f6f8; |
| 6 | } |
| 7 | |
| 8 | .admin-container { |
| 9 | padding: 24px; |
| 10 | background-color: #fff; |
| 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
| 12 | } |
| 13 | |
| 14 | /* 页眉分层:白底 + 圆角 + 阴影 */ |
| 15 | .page-header { |
| 16 | background: #fff; |
| 17 | padding: 12px 24px; |
| 18 | border-radius: 8px; |
| 19 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); |
| 20 | } |
| 21 | |
| 22 | .admin-title { |
| 23 | font-size: 24px; |
| 24 | color: #e61515; |
| 25 | margin-bottom: 16px; |
| 26 | } |
| 27 | |
| 28 | .admin-table { |
| 29 | width: 100%; |
| 30 | border-collapse: collapse; |
| 31 | } |
| 32 | |
| 33 | .admin-table th, |
| 34 | .admin-table td { |
| 35 | border: 1px solid #f0f0f0; |
| 36 | padding: 12px 16px; |
| 37 | text-align: left; |
| 38 | } |
| 39 | |
| 40 | .admin-table th { |
| 41 | background-color: #fafafa; |
| 42 | color: #333; |
| 43 | font-weight: 500; |
| 44 | } |
| 45 | |
| 46 | .status { |
| 47 | font-weight: 500; |
| 48 | text-transform: capitalize; |
| 49 | } |
| 50 | |
| 51 | .status.pending { |
| 52 | color: #f29900; |
| 53 | } |
| 54 | |
| 55 | .status.approved { |
| 56 | color: #28a745; |
| 57 | } |
| 58 | |
| 59 | .status.banned { |
| 60 | color: #d73a49; |
| 61 | } |
| 62 | |
| 63 | .btn { |
| 64 | padding: 6px 12px; |
| 65 | margin-right: 8px; |
| 66 | border: none; |
| 67 | border-radius: 4px; |
| 68 | cursor: pointer; |
| 69 | font-size: 14px; |
| 70 | } |
| 71 | |
| 72 | .btn-approve { |
| 73 | background-color: #e61515; |
| 74 | color: #fff; |
| 75 | } |
| 76 | |
| 77 | .btn-ban { |
| 78 | background-color: #f5f5f5; |
| 79 | color: #333; |
| 80 | } |
| 81 | |
| 82 | /* 1. 瀑布流容器 */ |
| 83 | .admin-grid { |
| 84 | display: grid; |
| 85 | grid-gap: 16px; |
| 86 | grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); |
| 87 | margin-top: 16px; |
| 88 | } |
| 89 | |
| 90 | /* 2. 卡片 */ |
| 91 | .admin-card { |
| 92 | display: flex; |
| 93 | flex-direction: column; |
| 94 | background: #fff; |
| 95 | border-radius: 8px; |
| 96 | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| 97 | overflow: hidden; |
| 98 | transition: transform 0.2s; |
| 99 | } |
| 100 | .admin-card:hover { |
| 101 | transform: translateY(-4px); |
| 102 | } |
| 103 | |
| 104 | /* 3. 头部:用户名 + 状态 */ |
| 105 | .card-header { |
| 106 | padding: 12px 16px; |
| 107 | border-bottom: 1px solid #f0f0f0; |
| 108 | display: flex; |
| 109 | justify-content: space-between; |
| 110 | align-items: center; |
| 111 | } |
| 112 | .card-header .username { |
| 113 | font-weight: 500; |
| 114 | color: #333; |
| 115 | } |
| 116 | .card-header .status { |
| 117 | font-weight: 500; |
| 118 | text-transform: capitalize; |
| 119 | } |
| 120 | .card-header .status.pending { color: #f29900; } |
| 121 | .card-header .status.approved { color: #28a745; } |
| 122 | .card-header .status.banned { color: #d73a49; } |
| 123 | |
| 124 | /* 4. 操作按钮区 */ |
| 125 | .card-actions { |
| 126 | display: flex; |
| 127 | padding: 12px 16px; |
| 128 | border-top: 1px solid #f0f0f0; |
| 129 | gap: 8px; |
| 130 | } |
| 131 | .card-actions .btn { |
| 132 | flex: 1; |
| 133 | } |
| 134 | .card-actions .btn-approve { background-color: #e61515; color: #fff; } |
| 135 | .card-actions .btn-ban { background-color: #f5f5f5; color: #333; } |
| 136 | |
| 137 | /* —— Admin.js 专用布局 —— */ |
| 138 | .admin-layout { |
| 139 | display: flex; |
| 140 | gap: 16px; |
| 141 | } |
| 142 | |
| 143 | /* 左侧列表区 */ |
| 144 | .list-panel { |
| 145 | width: 320px; |
| 146 | border-right: 1px solid #f0f0f0; |
| 147 | padding-right: 16px; |
| 148 | overflow-y: auto; |
| 149 | padding: 16px; |
| 150 | } |
| 151 | |
| 152 | /* 顶部标签切换 */ |
| 153 | .tabs { |
| 154 | display: flex; |
| 155 | border-bottom: 1px solid #f0f0f0; |
| 156 | margin-bottom: 8px; |
| 157 | background: #fafafa; |
| 158 | padding: 0 16px; |
| 159 | border-radius: 8px 8px 0 0; |
| 160 | } |
| 161 | .tab-btn { |
| 162 | flex: 1; |
| 163 | padding: 8px 12px; |
| 164 | background: none; |
| 165 | border: none; |
| 166 | border-bottom: 2px solid transparent; |
| 167 | cursor: pointer; |
| 168 | font-size: 14px; |
| 169 | } |
| 170 | .tab-btn.active { |
| 171 | border-color: #e61515; |
| 172 | color: #e61515; |
| 173 | } |
| 174 | |
| 175 | /* 帖子列表 */ |
| 176 | .post-list { |
| 177 | /* 可根据需要添加滚动或间距 */ |
| 178 | } |
| 179 | .post-item { |
| 180 | display: flex; |
| 181 | align-items: center; |
| 182 | padding: 8px; |
| 183 | cursor: pointer; |
| 184 | border-bottom: 1px solid #f5f5f5; |
| 185 | background: #fff; |
| 186 | margin-bottom: 4px; |
| 187 | border-radius: 4px; |
| 188 | transition: background 0.2s; |
| 189 | } |
| 190 | .post-item:hover { |
| 191 | background-color: #fafafa; |
| 192 | } |
| 193 | .post-item.selected { |
| 194 | background: #e6f1ff; |
| 195 | } |
| 196 | .thumb { |
| 197 | width: 40px; |
| 198 | height: 40px; |
| 199 | object-fit: cover; |
| 200 | border-radius: 4px; |
| 201 | margin-right: 8px; |
| 202 | } |
| 203 | .info { |
| 204 | flex: 1; |
| 205 | } |
| 206 | .info .title { |
| 207 | font-weight: 500; |
| 208 | color: #333; |
| 209 | } |
| 210 | .info .meta { |
| 211 | font-size: 12px; |
| 212 | color: #888; |
| 213 | } |
| 214 | |
| 215 | /* 状态标签 */ |
| 216 | .status-tag { |
| 217 | padding: 2px 6px; |
| 218 | border-radius: 4px; |
| 219 | font-size: 12px; |
| 220 | text-transform: capitalize; |
| 221 | } |
| 222 | .status-tag.pending { |
| 223 | background-color: #fff4e5; |
| 224 | color: #f29900; |
| 225 | } |
| 226 | .status-tag.approved { |
| 227 | background-color: #e6f9f0; |
| 228 | color: #28a745; |
| 229 | } |
| 230 | .status-tag.rejected { |
| 231 | background-color: #fceaea; |
| 232 | color: #d73a49; |
| 233 | } |
| 234 | |
| 235 | /* 右侧详情面板 */ |
| 236 | .detail-panel { |
| 237 | flex: 1; |
| 238 | padding-left: 16px; |
| 239 | max-height: calc(100vh - 100px); |
| 240 | overflow-y: auto; |
| 241 | padding: 24px; |
| 242 | margin-left: 8px; |
| 243 | } |
| 244 | |
| 245 | /* 卡片阴影微调 */ |
| 246 | .admin-card { |
| 247 | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| 248 | } |
| 249 | |
| 250 | .detail-meta { |
| 251 | font-size: 12px; |
| 252 | color: #888; |
| 253 | margin-bottom: 8px; |
| 254 | } |
| 255 | .detail-content { |
| 256 | margin-bottom: 16px; |
| 257 | line-height: 1.6; |
| 258 | } |
| 259 | .detail-actions { |
| 260 | margin-bottom: 16px; |
| 261 | background: #f9f9fb; |
| 262 | padding: 12px; |
| 263 | border-radius: 4px; |
| 264 | } |
| 265 | |
| 266 | /* 操作按钮 */ |
| 267 | .btn-reject { |
| 268 | background-color: #f5f5f5; |
| 269 | color: #333; |
| 270 | } |
| 271 | .rejected-label { |
| 272 | color: #d73a49; |
| 273 | font-weight: 500; |
| 274 | } |
| 275 | |
| 276 | /* 加载与空状态 */ |
| 277 | .loading, |
| 278 | .empty-state { |
| 279 | text-align: center; |
| 280 | padding: 16px; |
| 281 | color: #888; |
| 282 | } |
| 283 | |
| 284 | /* 合规性指引 */ |
| 285 | .compliance-guidelines { |
| 286 | border-top: 1px solid #f0f0f0; |
| 287 | padding-top: 12px; |
| 288 | margin-top: 12px; |
| 289 | background: #f9f9fb; |
| 290 | padding: 12px; |
| 291 | border-radius: 4px; |
| 292 | } |
| 293 | .compliance-guidelines h4 { |
| 294 | margin-bottom: 8px; |
| 295 | font-size: 16px; |
| 296 | } |
| 297 | .compliance-guidelines ul { |
| 298 | padding-left: 20px; |
| 299 | } |
| 300 | .compliance-guidelines li { |
| 301 | line-height: 1.4; |
| 302 | margin-bottom: 4px; |
| 303 | } |
| 304 | |
| 305 | /* 管理员导航栏样式 */ |
| 306 | .admin-nav { |
| 307 | display: flex; |
| 308 | align-items: center; |
| 309 | gap: 1.5rem; |
| 310 | margin: 1rem 0 2rem; |
| 311 | border-bottom: 2px solid #e5e5e5; |
| 312 | } |
| 313 | |
| 314 | .admin-nav button { |
| 315 | background: none; |
| 316 | border: none; |
| 317 | padding: 0.5rem 0; |
| 318 | font-size: 1rem; |
| 319 | color: #555; |
| 320 | cursor: pointer; |
| 321 | position: relative; |
| 322 | transition: color 0.3s ease; |
| 323 | } |
| 324 | |
| 325 | .admin-nav button:hover { |
| 326 | color: #000; |
| 327 | } |
| 328 | |
| 329 | .admin-nav button.active { |
| 330 | color: #0078d4; |
| 331 | } |
| 332 | |
| 333 | .admin-nav button.active::after { |
| 334 | content: ''; |
| 335 | position: absolute; |
| 336 | bottom: -2px; |
| 337 | left: 0; |
| 338 | width: 100%; |
| 339 | height: 3px; |
| 340 | background-color: #0078d4; |
| 341 | border-radius: 2px 2px 0 0; |
| 342 | } |
| 343 | |
| 344 | /* 页面头部:标题 + 搜索框 */ |
| 345 | .page-header { |
| 346 | display: flex; |
| 347 | justify-content: space-between; |
| 348 | align-items: center; |
| 349 | margin-bottom: 16px; |
| 350 | background: #fff; |
| 351 | padding: 12px 24px; |
| 352 | border-radius: 8px; |
| 353 | box-shadow: 0 1px 3px rgba(0,0,0,0.1); |
| 354 | } |
| 355 | .main-title { |
| 356 | font-size: 28px; |
| 357 | color: #e61515; |
| 358 | margin: 0; |
| 359 | } |
| 360 | .search-input { |
| 361 | width: 240px; |
| 362 | padding: 6px 12px; |
| 363 | font-size: 14px; |
| 364 | border: 1px solid #ddd; |
| 365 | border-radius: 4px; |
| 366 | transition: border-color 0.2s; |
| 367 | background: #fafafa; |
| 368 | } |
| 369 | .search-input:focus { |
| 370 | outline: none; |
| 371 | border-color: #e61515; |
| 372 | } |
| 373 | |
| 374 | /* 小红书品牌红 */ |
| 375 | :root { |
| 376 | --xiaohongshu-red: #e2204f; |
| 377 | } |
| 378 | |
| 379 | /* Antd 表格表头背景小红书红,文字白色 */ |
| 380 | .ant-table-thead > tr > th { |
| 381 | background-color: var(--xiaohongshu-red) !important; |
| 382 | color: #fff; |
| 383 | } |
| 384 | |
| 385 | /* 侧栏前两项文字变小红书红 */ |
| 386 | .ant-layout-sider .ant-menu-item:nth-child(1), |
| 387 | .ant-layout-sider .ant-menu-item:nth-child(2) { |
| 388 | color: var(--xiaohongshu-red) !important; |
| 389 | } |