- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL - 修复 HomePage.tsx 中所有图片引用 - 修复 CoursePage.tsx 中所有图片引用 - 确保图片在 GitHub Pages 上正确加载 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"ast":null,"code":"import React,{useState}from'react';import{Link,useLocation}from'react-router-dom';import{Cpu,PlayCircle,X}from'./Icons';import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";const Navigation=()=>{const location=useLocation();const[isTrialModalOpen,setIsTrialModalOpen]=useState(false);const navLinks=[{path:'/',label:'课程首页'},{path:'/course',label:'课程'}];return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"nav\",{className:\"fixed top-0 left-0 right-0 z-50 bg-cyber-dark-900/95 backdrop-blur-xl border-b border-cyber-pink-500/30\",children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setIsTrialModalOpen(true),className:\"absolute left-4 top-1/2 -translate-y-1/2 flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white rounded-xl font-medium text-sm transition-all duration-300 hover:scale-105 shadow-lg hover:shadow-purple-500/30 z-10\",children:[/*#__PURE__*/_jsx(PlayCircle,{className:\"w-4 h-4\"}),/*#__PURE__*/_jsx(\"span\",{children:\"\\u76F4\\u64AD\\u56DE\\u653E\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"max-w-7xl mx-auto px-6\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center justify-between h-16\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"flex items-center space-x-4 ml-32\",children:/*#__PURE__*/_jsxs(Link,{to:\"/\",className:\"flex items-center space-x-3\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"w-10 h-10 bg-gradient-to-r from-cyber-pink-500 to-neon-purple-500 rounded-lg flex items-center justify-center shadow-neon-pink neon-glow-pink\",children:/*#__PURE__*/_jsx(Cpu,{className:\"w-6 h-6 text-white\"})}),/*#__PURE__*/_jsx(\"span\",{className:\"gradient-text font-bold text-lg uppercase tracking-wider\",children:\"\\u591AAgent\\u534F\\u4F5C\\u7CFB\\u7EDF\"})]})}),/*#__PURE__*/_jsx(\"div\",{className:\"hidden md:flex items-center space-x-8\",children:navLinks.map(link=>/*#__PURE__*/_jsxs(Link,{to:link.path,className:\"relative px-4 py-2 font-semibold transition-all duration-300 \".concat(location.pathname===link.path?'text-neon-cyan-400 neon-text-cyan':'text-cyber-dark-200 hover:text-neon-cyan-400'),children:[link.label,location.pathname===link.path&&/*#__PURE__*/_jsx(\"span\",{className:\"absolute bottom-0 left-0 right-0 h-0.5 bg-gradient-to-r from-neon-cyan-500 to-cyber-pink-500 shadow-neon-cyan\"})]},link.path))}),/*#__PURE__*/_jsx(\"div\",{className:\"md:hidden flex items-center space-x-4\",children:navLinks.map(link=>/*#__PURE__*/_jsx(Link,{to:link.path,className:\"px-3 py-2 text-sm font-semibold transition-all duration-300 \".concat(location.pathname===link.path?'text-neon-cyan-400 neon-text-cyan':'text-cyber-dark-200 hover:text-neon-cyan-400'),children:link.label},link.path))})]})})]}),isTrialModalOpen&&/*#__PURE__*/_jsxs(\"div\",{className:\"fixed inset-0 z-[2000] flex items-center justify-center p-4\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"absolute inset-0 bg-black/80 backdrop-blur-sm\",onClick:()=>setIsTrialModalOpen(false)}),/*#__PURE__*/_jsxs(\"div\",{className:\"relative w-full max-w-5xl bg-gradient-to-br from-gray-900 to-black rounded-2xl shadow-2xl border border-purple-500/30 overflow-hidden\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center justify-between p-6 border-b border-purple-500/20\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center gap-3\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"w-10 h-10 bg-gradient-to-r from-purple-500 to-pink-500 rounded-lg flex items-center justify-center\",children:/*#__PURE__*/_jsx(PlayCircle,{className:\"w-6 h-6 text-white\"})}),/*#__PURE__*/_jsx(\"h2\",{className:\"text-2xl font-bold text-white\",children:\"\\u76F4\\u64AD\\u56DE\\u653E\"})]}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsTrialModalOpen(false),className:\"w-10 h-10 rounded-lg bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors\",children:/*#__PURE__*/_jsx(X,{className:\"w-5 h-5 text-white\"})})]}),/*#__PURE__*/_jsx(\"div\",{className:\"relative bg-black\",style:{paddingBottom:'56.25%'},children:/*#__PURE__*/_jsx(\"video\",{className:\"absolute inset-0 w-full h-full\",controls:true,autoPlay:true,src:\"https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/video/web_teach/AIclass_playback.mov\",children:\"\\u60A8\\u7684\\u6D4F\\u89C8\\u5668\\u4E0D\\u652F\\u6301\\u89C6\\u9891\\u64AD\\u653E\"})}),/*#__PURE__*/_jsx(\"div\",{className:\"p-6 bg-gradient-to-r from-purple-900/20 to-pink-900/20 border-t border-purple-500/20\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"flex items-center justify-between\",children:[/*#__PURE__*/_jsx(\"p\",{className:\"text-white/80\",children:\"\\u89C2\\u770B\\u591AAgent\\u534F\\u4F5C\\u7CFB\\u7EDF\\u8BFE\\u7A0B\\u7684\\u5B8C\\u6574\\u76F4\\u64AD\\u56DE\\u653E\\uFF0C\\u6DF1\\u5165\\u4E86\\u89E3AI\\u534F\\u4F5C\\u6280\\u672F\"}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsTrialModalOpen(false),className:\"px-6 py-2 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white rounded-lg font-medium transition-all hover:scale-105\",children:\"\\u5173\\u95ED\"})]})})]})]})]});};export default Navigation;","map":{"version":3,"names":["React","useState","Link","useLocation","Cpu","PlayCircle","X","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Navigation","location","isTrialModalOpen","setIsTrialModalOpen","navLinks","path","label","children","className","onClick","to","map","link","concat","pathname","style","paddingBottom","controls","autoPlay","src"],"sources":["/Users/apple/Documents/cursor/Web课件/AI课/education_web_多Agent协作系统/src/components/Navigation.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport { Cpu, PlayCircle, X } from './Icons';\n\nconst Navigation: React.FC = () => {\n const location = useLocation();\n const [isTrialModalOpen, setIsTrialModalOpen] = useState(false);\n\n const navLinks = [\n { path: '/', label: '课程首页' },\n { path: '/course', label: '课程' }\n ];\n\n return (\n <>\n <nav className=\"fixed top-0 left-0 right-0 z-50 bg-cyber-dark-900/95 backdrop-blur-xl border-b border-cyber-pink-500/30\">\n {/* Trial Button - Absolutely Positioned at Left */}\n <button\n onClick={() => setIsTrialModalOpen(true)}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white rounded-xl font-medium text-sm transition-all duration-300 hover:scale-105 shadow-lg hover:shadow-purple-500/30 z-10\"\n >\n <PlayCircle className=\"w-4 h-4\" />\n <span>直播回放</span>\n </button>\n\n <div className=\"max-w-7xl mx-auto px-6\">\n <div className=\"flex items-center justify-between h-16\">\n {/* Logo */}\n <div className=\"flex items-center space-x-4 ml-32\">\n <Link to=\"/\" className=\"flex items-center space-x-3\">\n <div className=\"w-10 h-10 bg-gradient-to-r from-cyber-pink-500 to-neon-purple-500 rounded-lg flex items-center justify-center shadow-neon-pink neon-glow-pink\">\n <Cpu className=\"w-6 h-6 text-white\" />\n </div>\n <span className=\"gradient-text font-bold text-lg uppercase tracking-wider\">多Agent协作系统</span>\n </Link>\n </div>\n\n {/* Desktop Navigation */}\n <div className=\"hidden md:flex items-center space-x-8\">\n {navLinks.map((link) => (\n <Link\n key={link.path}\n to={link.path}\n className={`relative px-4 py-2 font-semibold transition-all duration-300 ${\n location.pathname === link.path\n ? 'text-neon-cyan-400 neon-text-cyan'\n : 'text-cyber-dark-200 hover:text-neon-cyan-400'\n }`}\n >\n {link.label}\n {location.pathname === link.path && (\n <span className=\"absolute bottom-0 left-0 right-0 h-0.5 bg-gradient-to-r from-neon-cyan-500 to-cyber-pink-500 shadow-neon-cyan\"></span>\n )}\n </Link>\n ))}\n </div>\n\n {/* Mobile Navigation */}\n <div className=\"md:hidden flex items-center space-x-4\">\n {navLinks.map((link) => (\n <Link\n key={link.path}\n to={link.path}\n className={`px-3 py-2 text-sm font-semibold transition-all duration-300 ${\n location.pathname === link.path\n ? 'text-neon-cyan-400 neon-text-cyan'\n : 'text-cyber-dark-200 hover:text-neon-cyan-400'\n }`}\n >\n {link.label}\n </Link>\n ))}\n </div>\n </div>\n </div>\n </nav>\n\n {/* Trial Video Modal */}\n {isTrialModalOpen && (\n <div className=\"fixed inset-0 z-[2000] flex items-center justify-center p-4\">\n {/* Backdrop */}\n <div\n className=\"absolute inset-0 bg-black/80 backdrop-blur-sm\"\n onClick={() => setIsTrialModalOpen(false)}\n />\n\n {/* Modal Content */}\n <div className=\"relative w-full max-w-5xl bg-gradient-to-br from-gray-900 to-black rounded-2xl shadow-2xl border border-purple-500/30 overflow-hidden\">\n {/* Header */}\n <div className=\"flex items-center justify-between p-6 border-b border-purple-500/20\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-10 h-10 bg-gradient-to-r from-purple-500 to-pink-500 rounded-lg flex items-center justify-center\">\n <PlayCircle className=\"w-6 h-6 text-white\" />\n </div>\n <h2 className=\"text-2xl font-bold text-white\">直播回放</h2>\n </div>\n <button\n onClick={() => setIsTrialModalOpen(false)}\n className=\"w-10 h-10 rounded-lg bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors\"\n >\n <X className=\"w-5 h-5 text-white\" />\n </button>\n </div>\n\n {/* Video Container */}\n <div className=\"relative bg-black\" style={{ paddingBottom: '56.25%' }}>\n <video\n className=\"absolute inset-0 w-full h-full\"\n controls\n autoPlay\n src=\"https://ddcz-1315997005.cos.ap-nanjing.myqcloud.com/static/video/web_teach/AIclass_playback.mov\"\n >\n 您的浏览器不支持视频播放\n </video>\n </div>\n\n {/* Footer */}\n <div className=\"p-6 bg-gradient-to-r from-purple-900/20 to-pink-900/20 border-t border-purple-500/20\">\n <div className=\"flex items-center justify-between\">\n <p className=\"text-white/80\">\n 观看多Agent协作系统课程的完整直播回放,深入了解AI协作技术\n </p>\n <button\n onClick={() => setIsTrialModalOpen(false)}\n className=\"px-6 py-2 bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white rounded-lg font-medium transition-all hover:scale-105\"\n >\n 关闭\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n </>\n );\n};\n\nexport default Navigation; "],"mappings":"AAAA,MAAO,CAAAA,KAAK,EAAIC,QAAQ,KAAQ,OAAO,CACvC,OAASC,IAAI,CAAEC,WAAW,KAAQ,kBAAkB,CACpD,OAASC,GAAG,CAAEC,UAAU,CAAEC,CAAC,KAAQ,SAAS,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,IAAA,IAAAC,KAAA,CAAAC,QAAA,IAAAC,SAAA,yBAE7C,KAAM,CAAAC,UAAoB,CAAGA,CAAA,GAAM,CACjC,KAAM,CAAAC,QAAQ,CAAGX,WAAW,CAAC,CAAC,CAC9B,KAAM,CAACY,gBAAgB,CAAEC,mBAAmB,CAAC,CAAGf,QAAQ,CAAC,KAAK,CAAC,CAE/D,KAAM,CAAAgB,QAAQ,CAAG,CACf,CAAEC,IAAI,CAAE,GAAG,CAAEC,KAAK,CAAE,MAAO,CAAC,CAC5B,CAAED,IAAI,CAAE,SAAS,CAAEC,KAAK,CAAE,IAAK,CAAC,CACjC,CAED,mBACET,KAAA,CAAAE,SAAA,EAAAQ,QAAA,eACAV,KAAA,QAAKW,SAAS,CAAC,yGAAyG,CAAAD,QAAA,eAEtH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