124 lines
4.0 KiB
TypeScript
124 lines
4.0 KiB
TypeScript
import { FolderGit2, Star, GitFork, ExternalLink, ShieldCheck } from "lucide-react";
|
|
|
|
interface ProjectProps {
|
|
name: string;
|
|
desc: string;
|
|
lang: string;
|
|
stars: number;
|
|
forks: number;
|
|
license: string;
|
|
url: string;
|
|
topics: string[];
|
|
}
|
|
|
|
function ProjectCard({ name, desc, lang, stars, forks, license, url, topics }: ProjectProps) {
|
|
return (
|
|
<a
|
|
href={url}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="block group"
|
|
>
|
|
<div className="p-6 rounded-2xl bg-white/5 border border-white/5 backdrop-blur-sm transition-all duration-300 hover:-translate-y-1 hover:bg-white/10 hover:border-emerald-500/30 hover:shadow-[0_0_25px_rgba(52,211,153,0.1)]">
|
|
<div className="flex items-start justify-between mb-4">
|
|
<FolderGit2 size={32} className="text-emerald-400 shrink-0" />
|
|
<ExternalLink size={16} className="text-gray-500 group-hover:text-emerald-400 transition-colors" />
|
|
</div>
|
|
|
|
<h3 className="text-lg font-bold text-white mb-2 group-hover:text-emerald-400 transition-colors">
|
|
{name}
|
|
</h3>
|
|
<p className="text-sm text-gray-400 leading-relaxed mb-4 line-clamp-2">
|
|
{desc}
|
|
</p>
|
|
|
|
<div className="flex flex-wrap gap-2 mb-4">
|
|
{topics.map((topic) => (
|
|
<span
|
|
key={topic}
|
|
className="px-2.5 py-0.5 text-xs rounded-full bg-emerald-500/10 text-emerald-400 border border-emerald-500/20"
|
|
>
|
|
{topic}
|
|
</span>
|
|
))}
|
|
</div>
|
|
|
|
<div className="flex items-center gap-4 text-xs text-gray-500">
|
|
<span className="flex items-center gap-1">
|
|
<span className="w-2.5 h-2.5 rounded-full bg-amber-400" />
|
|
{lang}
|
|
</span>
|
|
<span className="flex items-center gap-1">
|
|
<Star size={14} />
|
|
{stars}
|
|
</span>
|
|
<span className="flex items-center gap-1">
|
|
<GitFork size={14} />
|
|
{forks}
|
|
</span>
|
|
<span className="flex items-center gap-1">
|
|
<ShieldCheck size={14} />
|
|
{license}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
);
|
|
}
|
|
|
|
const projects: ProjectProps[] = [
|
|
{
|
|
name: "JuiceAgent",
|
|
desc: "A JVMTI-based injection library for loading external JARs and transforming Java bytecode, even when DisableAttachMechanism is enabled.",
|
|
lang: "C++",
|
|
stars: 10,
|
|
forks: 2,
|
|
license: "MIT",
|
|
url: "https://github.com/xiaozhou233/JuiceAgent",
|
|
topics: ["jvmti", "bytecode", "injection", "injector"],
|
|
},
|
|
{
|
|
name: "OrangeX-Client",
|
|
desc: "Minecraft Injected Client with Lunar Client support.",
|
|
lang: "Java",
|
|
stars: 19,
|
|
forks: 3,
|
|
license: "MIT",
|
|
url: "https://github.com/xiaozhou233/OrangeX-Client",
|
|
topics: ["minecraft", "injection", "client"],
|
|
},
|
|
];
|
|
|
|
export default function ProjectsSection() {
|
|
return (
|
|
<section id="projects" className="relative w-full bg-black/95 py-24 px-4 border-t border-white/5">
|
|
<div className="max-w-4xl mx-auto">
|
|
<div className="flex items-center gap-3 mb-12">
|
|
<FolderGit2 className="text-emerald-400" size={28} />
|
|
<h2 className="text-2xl md:text-3xl font-bold text-white tracking-tight">
|
|
<span className="text-emerald-400">#</span> 项目展示
|
|
</h2>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
{projects.map((project) => (
|
|
<ProjectCard key={project.name} {...project} />
|
|
))}
|
|
</div>
|
|
|
|
<p className="text-xs text-gray-600 mt-8">
|
|
<span className="text-gray-500">//</span> 更多项目请访问{" "}
|
|
<a
|
|
href="https://github.com/xiaozhou233"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-emerald-400/70 hover:text-emerald-400 transition-colors underline underline-offset-2"
|
|
>
|
|
github.com/xiaozhou233
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|