import React, { useState, useMemo, useEffect } from 'react';
import {
Globe, Server, Cpu, Activity, Shield, Zap,
ArrowRight, MousePointer2, Box, BarChart3,
Wifi, Lock, Terminal, Layers
} from 'lucide-react';
// 1. 域名数据配置
// 这一部分是核心数据库,部署后代码会根据访问的域名来这里匹配配置
const rawDomains = [
{ name: "animeclap.com", type: "media" },
{ name: "avfxtradinghub.com", type: "fintech" },
{ name: "buzzzboxes.com", type: "social" },
{ name: "cbreference.com", type: "data" },
{ name: "fangmeicom.com", type: "tech" },
{ name: "forexclean.com", type: "fintech" },
{ name: "gurlypick.com", type: "ecommerce" },
{ name: "indofastcharge.com", type: "energy" },
{ name: "janellsihay.com", type: "personal" },
{ name: "kideyesofficial.com", type: "media" },
{ name: "magicglp.com", type: "gaming" },
{ name: "mouthfresher.com", type: "health" },
{ name: "mr696mnz.com", type: "crypto" },
{ name: "pencilsnet.com", type: "education" },
{ name: "royalstarmines.com", type: "industry" },
{ name: "sensationsafaris.com", type: "travel" },
{ name: "swornforged.com", type: "gaming" },
{ name: "tadalafily.com", type: "health" },
{ name: "tujuhberita.com", type: "news" },
{ name: "xiaobuboke.com", type: "blog" },
];
// 2. 主题配置系统
const themes = {
default: {
color: "cyan",
gradient: "from-cyan-400 to-blue-600",
bg: "bg-slate-950",
desc: "Empowering the future with advanced digital infrastructure.",
icon: Cpu
},
fintech: {
color: "emerald",
gradient: "from-emerald-400 to-teal-600",
bg: "bg-green-950",
desc: "Next-generation financial trading solutions and blockchain analytics.",
icon: BarChart3
},
media: {
color: "pink",
gradient: "from-pink-500 to-rose-600",
bg: "bg-rose-950",
desc: "Immersive digital media experiences streaming directly to you.",
icon: Zap
},
energy: {
color: "yellow",
gradient: "from-yellow-400 to-orange-500",
bg: "bg-slate-950",
desc: "Sustainable energy charging networks for a greener planet.",
icon: Zap
},
gaming: {
color: "purple",
gradient: "from-purple-500 to-indigo-600",
bg: "bg-indigo-950",
desc: "Forging new worlds in virtual reality and interactive gaming.",
icon: MousePointer2
},
crypto: {
color: "violet",
gradient: "from-violet-400 to-fuchsia-600",
bg: "bg-slate-900",
desc: "Decentralized assets and secure mining protocols.",
icon: Lock
}
};
const getTheme = (type) => {
if (['fintech', 'industry'].includes(type)) return themes.fintech;
if (['media', 'social', 'blog'].includes(type)) return themes.media;
if (['energy', 'health'].includes(type)) return themes.energy;
if (['gaming', 'crypto'].includes(type)) return themes.gaming;
return themes.default;
};
export default function DomainPortfolioApp() {
const [selectedDomain, setSelectedDomain] = useState(rawDomains[4]); // 默认显示预览
const [isLiveMode, setIsLiveMode] = useState(false); // 标记是否为正式上线模式
const theme = useMemo(() => getTheme(selectedDomain.type), [selectedDomain]);
// 核心逻辑:检测当前访问的域名
useEffect(() => {
const hostname = window.location.hostname;
// 检查当前访问的域名是否存在于我们的列表中
const matchedDomain = rawDomains.find(d => hostname.includes(d.name));
if (matchedDomain) {
// 如果匹配成功(例如访问了 animeclap.com),则锁定该域名并隐藏侧边栏
setSelectedDomain(matchedDomain);
setIsLiveMode(true);
document.title = matchedDomain.name.toUpperCase(); // 修改浏览器标题
}
}, []);
return (
{/* 侧边栏:仅在非正式部署模式下显示 (Preview Mode) */}
{!isLiveMode && (
)}
{/* 主视图 */}
{/* 动态背景 */}
{/* 网格背景 */}
{/* 光晕效果 */}
{/* 导航栏 */}
{/* 核心内容区 */}
{/* Hero Section */}
SYSTEM STATUS: OPERATIONAL
The Future of
{selectedDomain.name}
{theme.desc} We provide scalable infrastructure and digital intelligence for the modern web.
{/* 3D Visual Simulation */}
init {selectedDomain.name} --verbose
> Loading core modules...
> Connecting to global CDN...
> Securing connection (SSL/TLS)...
[SUCCESS] Deployment Complete.
{[40, 70, 45, 90, 60, 80, 50, 95].map((h, i) => (
))}
{/* Features Grid */}
{[
{ title: "Global CDN", icon: Globe, desc: "Lightning fast content delivery across 200+ edge locations." },
{ title: "Secure Shield", icon: Shield, desc: "Enterprise-grade DDoS protection and WAF included." },
{ title: "Cloud Scale", icon: Layers, desc: "Auto-scaling infrastructure that grows with your traffic." }
].map((feature, idx) => (
{feature.title}
{feature.desc}
))}
);
}