wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 1 | import React from "react"; |
| 2 | import HomeIcon from "@mui/icons-material/Home"; |
| 3 | import MovieIcon from "@mui/icons-material/Movie"; |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 4 | import TvIcon from "@mui/icons-material/Tv"; |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 5 | import MusicNoteIcon from "@mui/icons-material/MusicNote"; |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 6 | import AnimationIcon from "@mui/icons-material/Animation"; |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 7 | import SportsEsportsIcon from "@mui/icons-material/SportsEsports"; |
| 8 | import SportsMartialArtsIcon from "@mui/icons-material/SportsMartialArts"; |
| 9 | import PersonIcon from "@mui/icons-material/Person"; |
| 10 | import AccountCircleIcon from "@mui/icons-material/AccountCircle"; |
| 11 | import ForumIcon from "@mui/icons-material/Forum"; |
| 12 | import HelpIcon from "@mui/icons-material/Help"; |
| 13 | import { useNavigate } from "react-router-dom"; |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 14 | import "./HomePage.css"; |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 15 | |
| 16 | // 导航栏 |
| 17 | const navItems = [ |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 18 | { label: "首页", icon: <HomeIcon className="emerald-nav-icon" />, path: "/home", type: "home" }, |
| 19 | { label: "电影", icon: <MovieIcon className="emerald-nav-icon" />, path: "/movie", type: "movie" }, |
| 20 | { label: "剧集", icon: <TvIcon className="emerald-nav-icon" />, path: "/tv", type: "tv" }, |
| 21 | { label: "音乐", icon: <MusicNoteIcon className="emerald-nav-icon" />, path: "/music", type: "music" }, |
| 22 | { label: "动漫", icon: <AnimationIcon className="emerald-nav-icon" />, path: "/anime", type: "anime" }, |
| 23 | { label: "游戏", icon: <SportsEsportsIcon className="emerald-nav-icon" />, path: "/game", type: "game" }, |
| 24 | { label: "体育", icon: <SportsMartialArtsIcon className="emerald-nav-icon" />, path: "/sport", type: "sport" }, |
| 25 | { label: "资料", icon: <PersonIcon className="emerald-nav-icon" />, path: "/info", type: "info" }, |
| 26 | { label: "论坛", icon: <ForumIcon className="emerald-nav-icon" />, path: "/forum", type: "forum" }, |
| 27 | { label: "发布", icon: <AccountCircleIcon className="emerald-nav-icon" />, path: "/publish", type: "publish" }, |
| 28 | { label: "求种", icon: <HelpIcon className="emerald-nav-icon" />, path: "/begseed", type: "help" }, |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 29 | ]; |
| 30 | |
| 31 | // 示例种子数据 |
| 32 | const exampleSeeds = [ |
| 33 | { |
| 34 | id: 1, |
| 35 | tags: "电影,科幻", |
| 36 | title: "三体 1080P 蓝光", |
| 37 | popularity: 123, |
| 38 | user: { username: "Alice" }, |
| 39 | }, |
| 40 | { |
| 41 | id: 2, |
| 42 | tags: "动漫,热血", |
| 43 | title: "灌篮高手 国语配音", |
| 44 | popularity: 88, |
| 45 | user: { username: "Bob" }, |
| 46 | }, |
| 47 | { |
| 48 | id: 3, |
| 49 | tags: "音乐,流行", |
| 50 | title: "周杰伦-稻香", |
| 51 | popularity: 56, |
| 52 | user: { username: "Jay" }, |
| 53 | }, |
| 54 | { |
| 55 | id: 4, |
| 56 | tags: "剧集,悬疑", |
| 57 | title: "隐秘的角落", |
| 58 | popularity: 77, |
| 59 | user: { username: "小明" }, |
| 60 | }, |
| 61 | ]; |
| 62 | |
| 63 | export default function HomePage() { |
| 64 | const navigate = useNavigate(); |
| 65 | |
| 66 | return ( |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 67 | <div className="emerald-home-container"> |
| 68 | {/* 流星雨背景效果 */} |
| 69 | <div className="meteor-shower"> |
| 70 | <div className="meteor">💫</div> |
| 71 | <div className="meteor">⭐</div> |
| 72 | <div className="meteor">✨</div> |
| 73 | <div className="meteor">🌟</div> |
| 74 | <div className="meteor">💫</div> |
| 75 | <div className="meteor">⭐</div> |
| 76 | <div className="meteor">✨</div> |
| 77 | <div className="meteor">🌟</div> |
| 78 | <div className="meteor">💫</div> |
| 79 | <div className="meteor">⭐</div> |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 80 | </div> |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 81 | |
| 82 | {/* 浮动园林装饰元素 */} |
| 83 | <div className="floating-garden-elements"> |
| 84 | <div className="garden-element">🌿</div> |
| 85 | <div className="garden-element">🦋</div> |
| 86 | <div className="garden-element">🌺</div> |
| 87 | <div className="garden-element">🌸</div> |
| 88 | </div> |
| 89 | |
| 90 | <div className="emerald-content"> |
| 91 | {/* NeuraFlux用户栏 */} |
| 92 | <div className="emerald-user-bar"> |
| 93 | <div className="emerald-user-avatar" onClick={() => navigate('/user')}> |
| 94 | <AccountCircleIcon style={{ fontSize: 38, color: 'white' }} /> |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 95 | </div> |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 96 | <div className="emerald-brand-section"> |
| 97 | <div className="emerald-brand-icon">⚡</div> |
| 98 | <div className="emerald-user-label">NeuraFlux</div> |
| 99 | </div> |
| 100 | <div className="emerald-user-stats"> |
| 101 | <span className="emerald-stat-item"> |
| 102 | 魔力值: <span className="emerald-stat-value">12,345</span> |
| 103 | </span> |
| 104 | <span className="emerald-stat-item"> |
| 105 | 分享率: <span className="emerald-stat-value">2.56</span> |
| 106 | </span> |
| 107 | <span className="emerald-stat-item"> |
| 108 | 上传: <span className="emerald-stat-value">100GB</span> |
| 109 | </span> |
| 110 | <span className="emerald-stat-item"> |
| 111 | 下载: <span className="emerald-stat-value">50GB</span> |
| 112 | </span> |
| 113 | </div> |
| 114 | </div> |
| 115 | |
| 116 | {/* NeuraFlux导航栏 */} |
| 117 | <nav className="emerald-nav-bar"> |
| 118 | {navItems.map((item) => ( |
| 119 | <div |
| 120 | key={item.label} |
| 121 | className={`emerald-nav-item ${item.label === "首页" ? "active" : ""}`} |
| 122 | data-type={item.type} |
| 123 | onClick={() => navigate(item.path)} |
| 124 | > |
| 125 | {item.icon} |
| 126 | <span className="emerald-nav-label">{item.label}</span> |
| 127 | </div> |
| 128 | ))} |
| 129 | </nav> |
| 130 | |
| 131 | {/* NeuraFlux种子列表 */} |
| 132 | <div className="emerald-table-section"> |
| 133 | <table className="emerald-table"> |
| 134 | <thead> |
| 135 | <tr> |
| 136 | <th>分类标签</th> |
| 137 | <th>资源标题</th> |
| 138 | <th>热门指数</th> |
| 139 | <th>发布者</th> |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 140 | </tr> |
TRM-coding | fa3ffdf | 2025-06-09 22:47:42 +0800 | [diff] [blame^] | 141 | </thead> |
| 142 | <tbody> |
| 143 | {exampleSeeds.map((seed) => ( |
| 144 | <tr key={seed.id}> |
| 145 | <td>{seed.tags}</td> |
| 146 | <td> |
| 147 | <a href={`/torrent/${seed.id}`}> |
| 148 | {seed.title} |
| 149 | </a> |
| 150 | </td> |
| 151 | <td>{seed.popularity}</td> |
| 152 | <td>{seed.user.username}</td> |
| 153 | </tr> |
| 154 | ))} |
| 155 | </tbody> |
| 156 | </table> |
| 157 | </div> |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 158 | </div> |
wht | 10563a8 | 2025-06-08 15:52:18 +0800 | [diff] [blame] | 159 | </div> |
| 160 | ); |
| 161 | } |