Spaces:
Running
Running
Download index.html from NasirOO1/resumebuilder: direct link, hf CLI and curl.
- Browser
- Download file 77.9 kB
-
https://huggingface.co/spaces/NasirOO1/resumebuilder/resolve/main/index.html
- Command line
-
hf download hf://spaces/NasirOO1/resumebuilder/index.html
-
curl -L -o index.html https://huggingface.co/spaces/NasirOO1/resumebuilder/resolve/main/index.html
77.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ResumeAI - Futuristic Resume Builder</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="https://unpkg.com/framer-motion@10.16.4/dist/framer-motion.js"></script>
<script src="https://unpkg.com/react-router-dom@6.14.1/umd/react-router-dom.development.js"></script>
<script src="https://unpkg.com/react-dnd@16.0.1/dist/umd/ReactDnD.min.js"></script>
<script src="https://unpkg.com/react-dnd-html5-backend@16.0.1/dist/umd/ReactDnDHTML5Backend.min.js"></script>
<script src="https://unpkg.com/react-icons@4.8.0/fa/index.js"></script>
<style>
.glassmorphism {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.neumorphism {
border-radius: 20px;
background: linear-gradient(145deg, #1a1a2e, #16213e);
box-shadow: 10px 10px 20px #0f0f1a,
-10px -10px 20px #252544;
}
.resume-section {
transition: all 0.3s ease;
}
.resume-section:hover {
transform: translateY(-5px);
}
.gradient-text {
background: linear-gradient(90deg, #00dbde, #fc00ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.premium-badge {
position: absolute;
top: -10px;
right: -10px;
background: linear-gradient(135deg, #f6d365, #fda085);
transform: rotate(15deg);
box-shadow: 0 4px 15px rgba(246, 211, 101, 0.4);
}
</style>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect } = React;
const { motion, AnimatePresence } = FramerMotion;
const { BrowserRouter, Routes, Route, Link, useNavigate } = ReactRouterDOM;
const { DndProvider, useDrag, useDrop } = ReactDnd;
const { HTML5Backend } = ReactDndHTML5Backend;
const { FaMagic, FaRobot, FaPalette, FaArrowsAlt, FaFilePdf, FaCrown, FaLock, FaArrowRight, FaTimes, FaCheck } = ReactIcons.Fa;
// App Component
const App = () => {
return (
<BrowserRouter>
<DndProvider backend={HTML5Backend}>
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900 to-violet-900 text-white">
<Navbar />
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="/editor" element={<ResumeEditor />} />
<Route path="/templates" element={<TemplatesGallery />} />
<Route path="/premium" element={<PremiumPage />} />
</Routes>
<Footer />
</div>
</DndProvider>
</BrowserRouter>
);
};
// Navbar Component
const Navbar = () => {
const navigate = useNavigate();
const [isMenuOpen, setIsMenuOpen] = useState(false);
return (
<motion.nav
initial={{ y: -100 }}
animate={{ y: 0 }}
transition={{ duration: 0.5 }}
className="glassmorphism p-4"
>
<div className="container mx-auto flex justify-between items-center">
<motion.div
whileHover={{ scale: 1.05 }}
className="flex items-center cursor-pointer"
onClick={() => navigate('/')}
>
<FaRobot className="text-2xl mr-2 text-purple-400" />
<span className="text-xl font-bold gradient-text">ResumeAI</span>
</motion.div>
<div className="hidden md:flex space-x-6">
<NavLink to="/" text="Home" />
<NavLink to="/editor" text="Editor" />
<NavLink to="/templates" text="Templates" />
<NavLink to="/premium" text="Premium" />
</div>
<button
onClick={() => navigate('/premium')}
className="hidden md:flex items-center px-4 py-2 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 transition-all duration-300"
>
<FaCrown className="mr-2" />
Upgrade
</button>
<button
className="md:hidden text-2xl"
onClick={() => setIsMenuOpen(!isMenuOpen)}
>
☰
</button>
</div>
{/* Mobile Menu */}
<AnimatePresence>
{isMenuOpen && (
<motion.div
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="md:hidden mt-4"
>
<div className="flex flex-col space-y-3 p-4 glassmorphism rounded-lg">
<MobileNavLink to="/" text="Home" onClick={() => setIsMenuOpen(false)} />
<MobileNavLink to="/editor" text="Editor" onClick={() => setIsMenuOpen(false)} />
<MobileNavLink to="/templates" text="Templates" onClick={() => setIsMenuOpen(false)} />
<MobileNavLink to="/premium" text="Premium" onClick={() => setIsMenuOpen(false)} />
</div>
</motion.div>
)}
</AnimatePresence>
</motion.nav>
);
};
const NavLink = ({ to, text }) => {
return (
<motion.div whileHover={{ scale: 1.05 }}>
<Link
to={to}
className="hover:text-purple-300 transition-colors duration-300"
>
{text}
</Link>
</motion.div>
);
};
const MobileNavLink = ({ to, text, onClick }) => {
return (
<motion.div whileTap={{ scale: 0.95 }}>
<Link
to={to}
onClick={onClick}
className="block py-2 px-4 hover:bg-purple-900 rounded transition-colors duration-300"
>
{text}
</Link>
</motion.div>
);
};
// Landing Page Component
const LandingPage = () => {
const navigate = useNavigate();
const [isHovered, setIsHovered] = useState(null);
const features = [
{
icon: <FaMagic className="text-3xl" />,
title: "AI-Powered Suggestions",
description: "Get intelligent recommendations to improve your resume content and formatting."
},
{
icon: <FaPalette className="text-3xl" />,
title: "Beautiful Templates",
description: "Choose from dozens of professionally designed resume templates."
},
{
icon: <FaArrowsAlt className="text-3xl" />,
title: "Drag & Drop Editor",
description: "Easily customize every section of your resume with our intuitive editor."
},
{
icon: <FaFilePdf className="text-3xl" />,
title: "PDF Export",
description: "Download your resume as a high-quality PDF with one click."
}
];
return (
<div className="container mx-auto px-4 py-12">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.8 }}
className="text-center mb-16"
>
<motion.h1
initial={{ y: -20 }}
animate={{ y: 0 }}
transition={{ delay: 0.2 }}
className="text-5xl md:text-6xl font-bold mb-6 gradient-text"
>
Build Your Perfect Resume
</motion.h1>
<motion.p
initial={{ y: 20 }}
animate={{ y: 0 }}
transition={{ delay: 0.4 }}
className="text-xl md:text-2xl text-gray-300 mb-10 max-w-3xl mx-auto"
>
Powered by AI to help you land your dream job faster than ever before.
</motion.p>
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.6 }}
className="flex flex-col sm:flex-row justify-center gap-4"
>
<motion.button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
className="px-8 py-3 bg-gradient-to-r from-purple-600 to-blue-500 rounded-full font-semibold flex items-center justify-center"
onClick={() => navigate('/editor')}
>
<FaArrowsAlt className="mr-2" />
Start with Editor
</motion.button>
<motion.button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
className="px-8 py-3 bg-gradient-to-r from-pink-500 to-orange-500 rounded-full font-semibold flex items-center justify-center"
onClick={() => navigate('/templates')}
>
<FaPalette className="mr-2" />
Browse Templates
</motion.button>
</motion.div>
</motion.div>
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.8 }}
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-16"
>
{features.map((feature, index) => (
<motion.div
key={index}
whileHover={{ y: -10 }}
className={`neumorphism p-6 rounded-xl cursor-default ${isHovered === index ? 'ring-2 ring-purple-500' : ''}`}
onMouseEnter={() => setIsHovered(index)}
onMouseLeave={() => setIsHovered(null)}
>
<div className="text-purple-400 mb-4">
{feature.icon}
</div>
<h3 className="text-xl font-bold mb-2">{feature.title}</h3>
<p className="text-gray-300">{feature.description}</p>
</motion.div>
))}
</motion.div>
<div className="glassmorphism p-8 rounded-2xl max-w-4xl mx-auto">
<h2 className="text-3xl font-bold mb-6 text-center">How It Works</h2>
<div className="flex flex-col md:flex-row gap-8">
<motion.div
whileHover={{ scale: 1.02 }}
className="flex-1 bg-gray-800 bg-opacity-50 p-6 rounded-xl"
>
<div className="flex items-center mb-4">
<div className="bg-purple-600 w-8 h-8 rounded-full flex items-center justify-center mr-3">1</div>
<h3 className="text-xl font-semibold">Choose Your Path</h3>
</div>
<p className="text-gray-300">Start with our AI-powered editor or browse our collection of professional templates.</p>
</motion.div>
<motion.div
whileHover={{ scale: 1.02 }}
className="flex-1 bg-gray-800 bg-opacity-50 p-6 rounded-xl"
>
<div className="flex items-center mb-4">
<div className="bg-purple-600 w-8 h-8 rounded-full flex items-center justify-center mr-3">2</div>
<h3 className="text-xl font-semibold">Customize Your Resume</h3>
</div>
<p className="text-gray-300">Add your information, rearrange sections, and personalize the design to match your style.</p>
</motion.div>
<motion.div
whileHover={{ scale: 1.02 }}
className="flex-1 bg-gray-800 bg-opacity-50 p-6 rounded-xl"
>
<div className="flex items-center mb-4">
<div className="bg-purple-600 w-8 h-8 rounded-full flex items-center justify-center mr-3">3</div>
<h3 className="text-xl font-semibold">Download & Apply</h3>
</div>
<p className="text-gray-300">Export your resume as a PDF and start applying for jobs with confidence.</p>
</motion.div>
</div>
</div>
</div>
);
};
// Resume Editor Component
const ResumeEditor = () => {
const [sections, setSections] = useState([
{ id: 1, type: 'header', title: 'Header', content: { name: 'John Doe', title: 'Software Engineer', email: 'john@example.com' } },
{ id: 2, type: 'summary', title: 'Summary', content: 'Experienced software engineer with 5+ years of experience...' },
{ id: 3, type: 'experience', title: 'Experience', content: [{ title: 'Senior Developer', company: 'Tech Corp', duration: '2020-Present' }] },
{ id: 4, type: 'education', title: 'Education', content: [{ degree: 'B.Sc Computer Science', university: 'State University', year: '2015-2019' }] },
{ id: 5, type: 'skills', title: 'Skills', content: ['JavaScript', 'React', 'Node.js'] }
]);
const [activeSection, setActiveSection] = useState(null);
const [previewMode, setPreviewMode] = useState(false);
const [aiSuggestions, setAiSuggestions] = useState([]);
const moveSection = (dragIndex, hoverIndex) => {
const draggedSection = sections[dragIndex];
const newSections = [...sections];
newSections.splice(dragIndex, 1);
newSections.splice(hoverIndex, 0, draggedSection);
setSections(newSections);
};
const getAiSuggestions = () => {
// Simulate AI suggestions
const mockSuggestions = [
{ id: 1, text: "Consider adding more metrics to your experience section", accepted: false },
{ id: 2, text: "Your summary could be more concise", accepted: false },
{ id: 3, text: "Add more technical skills relevant to your target jobs", accepted: false }
];
setAiSuggestions(mockSuggestions);
};
useEffect(() => {
getAiSuggestions();
}, []);
const toggleSuggestion = (id) => {
setAiSuggestions(aiSuggestions.map(suggestion =>
suggestion.id === id ? { ...suggestion, accepted: !suggestion.accepted } : suggestion
));
};
return (
<div className="container mx-auto px-4 py-8">
<div className="flex flex-col lg:flex-row gap-8">
{/* Left Panel - Sections List */}
<div className="lg:w-1/4">
<motion.div
initial={{ x: -50 }}
animate={{ x: 0 }}
className="glassmorphism p-6 rounded-xl mb-6"
>
<h2 className="text-2xl font-bold mb-4 flex items-center">
<FaArrowsAlt className="mr-2" />
Resume Sections
</h2>
<div className="space-y-3">
{sections.map((section, index) => (
<ResumeSectionItem
key={section.id}
index={index}
section={section}
moveSection={moveSection}
isActive={activeSection === section.id}
onClick={() => setActiveSection(section.id)}
/>
))}
</div>
<button className="mt-4 w-full py-2 bg-purple-700 hover:bg-purple-600 rounded-lg transition-colors">
+ Add Section
</button>
</motion.div>
{/* AI Suggestions */}
<motion.div
initial={{ x: -50 }}
animate={{ x: 0 }}
transition={{ delay: 0.2 }}
className="glassmorphism p-6 rounded-xl"
>
<h2 className="text-2xl font-bold mb-4 flex items-center">
<FaRobot className="mr-2" />
AI Suggestions
</h2>
<div className="space-y-3">
{aiSuggestions.length > 0 ? (
aiSuggestions.map(suggestion => (
<motion.div
key={suggestion.id}
whileHover={{ x: 5 }}
className={`p-3 rounded-lg ${suggestion.accepted ? 'bg-green-900 bg-opacity-50' : 'bg-gray-800 bg-opacity-50'}`}
>
<div className="flex justify-between items-start">
<p className="text-sm">{suggestion.text}</p>
<button
onClick={() => toggleSuggestion(suggestion.id)}
className={`ml-2 p-1 rounded-full ${suggestion.accepted ? 'bg-green-500' : 'bg-gray-600'}`}
>
{suggestion.accepted ? <FaCheck size={12} /> : <FaTimes size={12} />}
</button>
</div>
</motion.div>
))
) : (
<p className="text-gray-400 text-sm">No suggestions yet. Add more content to get AI feedback.</p>
)}
</div>
<button
onClick={getAiSuggestions}
className="mt-4 w-full py-2 bg-blue-700 hover:bg-blue-600 rounded-lg transition-colors flex items-center justify-center"
>
<FaMagic className="mr-2" />
Get More Suggestions
</button>
</motion.div>
</div>
{/* Middle Panel - Editor/Preview */}
<div className="lg:w-2/4">
<div className="glassmorphism p-6 rounded-xl mb-6">
<div className="flex justify-between items-center mb-6">
<h2 className="text-2xl font-bold">
{previewMode ? 'Resume Preview' : 'Resume Editor'}
</h2>
<div className="flex space-x-3">
<button
onClick={() => setPreviewMode(!previewMode)}
className="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors"
>
{previewMode ? 'Edit Mode' : 'Preview Mode'}
</button>
<button className="px-4 py-2 bg-gradient-to-r from-purple-600 to-blue-500 rounded-lg flex items-center">
<FaFilePdf className="mr-2" />
Export PDF
</button>
</div>
</div>
<div className="bg-white bg-opacity-10 p-6 rounded-lg min-h-[70vh]">
{previewMode ? (
<ResumePreview sections={sections} />
) : (
<div>
{activeSection ? (
<SectionEditor
section={sections.find(s => s.id === activeSection)}
onUpdate={(updatedContent) => {
setSections(sections.map(s =>
s.id === activeSection ? { ...s, content: updatedContent } : s
));
}}
/>
) : (
<div className="text-center py-16 text-gray-400">
<FaArrowsAlt className="text-4xl mx-auto mb-4" />
<p>Select a section to edit or drag to reorder</p>
</div>
)}
</div>
)}
</div>
</div>
</div>
{/* Right Panel - Design Options */}
<div className="lg:w-1/4">
<motion.div
initial={{ x: 50 }}
animate={{ x: 0 }}
transition={{ delay: 0.1 }}
className="glassmorphism p-6 rounded-xl mb-6"
>
<h2 className="text-2xl font-bold mb-4">Design Options</h2>
<div className="space-y-4">
<div>
<label className="block text-sm font-medium mb-1">Color Scheme</label>
<div className="flex space-x-2">
{['purple', 'blue', 'green', 'red', 'orange'].map(color => (
<div
key={color}
className={`w-8 h-8 rounded-full bg-${color}-500 cursor-pointer border-2 border-transparent hover:border-white`}
></div>
))}
</div>
</div>
<div>
<label className="block text-sm font-medium mb-1">Font Family</label>
<select className="w-full bg-gray-800 border border-gray-700 rounded-lg p-2">
<option>Inter</option>
<option>Roboto</option>
<option>Open Sans</option>
<option>Lato</option>
</select>
</div>
<div>
<label className="block text-sm font-medium mb-1">Layout Style</label>
<div className="grid grid-cols-2 gap-2">
{['Classic', 'Modern', 'Creative', 'Minimal'].map(style => (
<div
key={style}
className="p-2 border border-gray-700 rounded-lg text-center cursor-pointer hover:bg-gray-800"
>
{style}
</div>
))}
</div>
</div>
</div>
</motion.div>
<motion.div
initial={{ x: 50 }}
animate={{ x: 0 }}
transition={{ delay: 0.3 }}
className="glassmorphism p-6 rounded-xl"
>
<h2 className="text-2xl font-bold mb-4">Premium Features</h2>
<div className="space-y-4">
<div className="bg-gray-800 bg-opacity-50 p-4 rounded-lg border border-purple-500">
<div className="flex items-center mb-2">
<FaCrown className="text-yellow-400 mr-2" />
<span className="font-semibold">Unlock All Templates</span>
</div>
<p className="text-sm text-gray-300">Access 50+ premium resume templates</p>
</div>
<div className="bg-gray-800 bg-opacity-50 p-4 rounded-lg border border-purple-500">
<div className="flex items-center mb-2">
<FaFilePdf className="text-blue-400 mr-2" />
<span className="font-semibold">PDF Export</span>
</div>
<p className="text-sm text-gray-300">Download unlimited high-quality PDFs</p>
</div>
<div className="bg-gray-800 bg-opacity-50 p-4 rounded-lg border border-purple-500">
<div className="flex items-center mb-2">
<FaRobot className="text-green-400 mr-2" />
<span className="font-semibold">Advanced AI Tools</span>
</div>
<p className="text-sm text-gray-300">Get detailed resume analysis and optimization</p>
</div>
</div>
<button
onClick={() => window.location.href = '/premium'}
className="mt-4 w-full py-2 bg-gradient-to-r from-yellow-500 to-orange-500 rounded-lg font-semibold flex items-center justify-center"
>
<FaCrown className="mr-2" />
Upgrade to Premium
</button>
</motion.div>
</div>
</div>
</div>
);
};
// Resume Section Item Component (Draggable)
const ResumeSectionItem = ({ section, index, moveSection, isActive, onClick }) => {
const ref = React.useRef(null);
const [{ isDragging }, drag] = useDrag({
type: 'SECTION',
item: { index },
collect: (monitor) => ({
isDragging: monitor.isDragging(),
}),
});
const [, drop] = useDrop({
accept: 'SECTION',
hover: (item, monitor) => {
if (!ref.current) return;
const dragIndex = item.index;
const hoverIndex = index;
if (dragIndex === hoverIndex) return;
moveSection(dragIndex, hoverIndex);
item.index = hoverIndex;
},
});
drag(drop(ref));
return (
<motion.div
ref={ref}
initial={{ opacity: 0 }}
animate={{ opacity: isDragging ? 0.5 : 1 }}
whileHover={{ scale: 1.02 }}
whileTap={{ scale: 0.98 }}
className={`resume-section p-3 rounded-lg cursor-move ${isActive ? 'bg-purple-800 bg-opacity-50' : 'bg-gray-800 bg-opacity-50'}`}
onClick={onClick}
>
<div className="flex items-center">
<div className="w-6 h-6 rounded-full bg-purple-600 flex items-center justify-center mr-3">
{index + 1}
</div>
<span>{section.title}</span>
</div>
</motion.div>
);
};
// Section Editor Component
const SectionEditor = ({ section, onUpdate }) => {
const [content, setContent] = useState(section.content);
useEffect(() => {
setContent(section.content);
}, [section]);
const handleChange = (field, value) => {
const updatedContent = { ...content, [field]: value };
setContent(updatedContent);
onUpdate(updatedContent);
};
const handleArrayChange = (field, index, value) => {
const updatedItems = [...content];
updatedItems[index] = { ...updatedItems[index], [field]: value };
setContent(updatedItems);
onUpdate(updatedItems);
};
const addItem = () => {
const newItem = section.type === 'experience'
? { title: '', company: '', duration: '' }
: { degree: '', university: '', year: '' };
const updatedItems = [...content, newItem];
setContent(updatedItems);
onUpdate(updatedItems);
};
const removeItem = (index) => {
const updatedItems = content.filter((_, i) => i !== index);
setContent(updatedItems);
onUpdate(updatedItems);
};
const renderEditor = () => {
switch (section.type) {
case 'header':
return (
<div className="space-y-4">
<div>
<label className="block text-sm font-medium mb-1">Full Name</label>
<input
type="text"
value={content.name || ''}
onChange={(e) => handleChange('name', e.target.value)}
className="w-full bg-gray-800 border border-gray-700 rounded-lg p-2"
/>
</div>
<div>
<label className="block text-sm font-medium mb-1">Professional Title</label>
<input
type="text"
value={content.title || ''}
onChange={(e) => handleChange('title', e.target.value)}
className="w-full bg-gray-800 border border-gray-700 rounded-lg p-2"
/>
</div>
<div>
<label className="block text-sm font-medium mb-1">Email</label>
<input
type="email"
value={content.email || ''}
onChange={(e) => handleChange('email', e.target.value)}
className="w-full bg-gray-800 border border-gray-700 rounded-lg p-2"
/>
</div>
</div>
);
case 'summary':
return (
<div>
<label className="block text-sm font-medium mb-1">Professional Summary</label>
<textarea
value={content || ''}
onChange={(e) => onUpdate(e.target.value)}
className="w-full bg-gray-800 border border-gray-700 rounded-lg p-2 min-h-[150px]"
/>
</div>
);
case 'experience':
case 'education':
return (
<div className="space-y-4">
{content.map((item, index) => (
<div key={index} className="bg-gray-800 bg-opacity-50 p-4 rounded-lg">
<div className="flex justify-between items-center mb-2">
<h3 className="font-medium">Item #{index + 1}</h3>
<button
onClick={() => removeItem(index)}
className="text-red-400 hover:text-red-300"
>
Remove
</button>
</div>
{section.type === 'experience' ? (
<>
<div className="mb-2">
<label className="block text-sm font-medium mb-1">Job Title</label>
<input
type="text"
value={item.title || ''}
onChange={(e) => handleArrayChange('title', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
<div className="mb-2">
<label className="block text-sm font-medium mb-1">Company</label>
<input
type="text"
value={item.company || ''}
onChange={(e) => handleArrayChange('company', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
<div>
<label className="block text-sm font-medium mb-1">Duration</label>
<input
type="text"
value={item.duration || ''}
onChange={(e) => handleArrayChange('duration', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
</>
) : (
<>
<div className="mb-2">
<label className="block text-sm font-medium mb-1">Degree</label>
<input
type="text"
value={item.degree || ''}
onChange={(e) => handleArrayChange('degree', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
<div className="mb-2">
<label className="block text-sm font-medium mb-1">University</label>
<input
type="text"
value={item.university || ''}
onChange={(e) => handleArrayChange('university', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
<div>
<label className="block text-sm font-medium mb-1">Year</label>
<input
type="text"
value={item.year || ''}
onChange={(e) => handleArrayChange('year', index, e.target.value)}
className="w-full bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
</div>
</>
)}
</div>
))}
<button
onClick={addItem}
className="w-full py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors"
>
+ Add {section.type === 'experience' ? 'Experience' : 'Education'}
</button>
</div>
);
case 'skills':
return (
<div>
<label className="block text-sm font-medium mb-1">Skills</label>
<div className="bg-gray-800 bg-opacity-50 p-4 rounded-lg">
{content.map((skill, index) => (
<div key={index} className="flex items-center mb-2 last:mb-0">
<input
type="text"
value={skill}
onChange={(e) => {
const updatedSkills = [...content];
updatedSkills[index] = e.target.value;
setContent(updatedSkills);
onUpdate(updatedSkills);
}}
className="flex-1 bg-gray-700 border border-gray-600 rounded-lg p-2"
/>
<button
onClick={() => {
const updatedSkills = content.filter((_, i) => i !== index);
setContent(updatedSkills);
onUpdate(updatedSkills);
}}
className="ml-2 p-2 text-red-400 hover:text-red-300"
>
<FaTimes />
</button>
</div>
))}
<button
onClick={() => {
const updatedSkills = [...content, ''];
setContent(updatedSkills);
onUpdate(updatedSkills);
}}
className="mt-2 w-full py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors"
>
+ Add Skill
</button>
</div>
</div>
);
default:
return <div>Editor for this section type is not implemented yet.</div>;
}
};
return (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="space-y-6"
>
<h3 className="text-xl font-bold">{section.title}</h3>
{renderEditor()}
</motion.div>
);
};
// Resume Preview Component
const ResumePreview = ({ sections }) => {
return (
<div className="bg-white text-gray-800 p-8 rounded-lg">
<div className="max-w-3xl mx-auto">
{sections.map((section) => {
switch (section.type) {
case 'header':
return (
<div key={section.id} className="mb-8 text-center">
<h1 className="text-3xl font-bold mb-1">{section.content.name}</h1>
<h2 className="text-xl text-gray-600 mb-2">{section.content.title}</h2>
<p className="text-gray-500">{section.content.email}</p>
</div>
);
case 'summary':
return (
<div key={section.id} className="mb-6">
<h3 className="text-lg font-bold mb-2 border-b border-gray-300 pb-1">SUMMARY</h3>
<p className="text-gray-700">{section.content}</p>
</div>
);
case 'experience':
return (
<div key={section.id} className="mb-6">
<h3 className="text-lg font-bold mb-2 border-b border-gray-300 pb-1">EXPERIENCE</h3>
{section.content.map((exp, index) => (
<div key={index} className="mb-4">
<div className="flex justify-between">
<h4 className="font-semibold">{exp.title}</h4>
<span className="text-gray-600">{exp.duration}</span>
</div>
<p className="text-gray-600 italic">{exp.company}</p>
</div>
))}
</div>
);
case 'education':
return (
<div key={section.id} className="mb-6">
<h3 className="text-lg font-bold mb-2 border-b border-gray-300 pb-1">EDUCATION</h3>
{section.content.map((edu, index) => (
<div key={index} className="mb-4">
<div className="flex justify-between">
<h4 className="font-semibold">{edu.degree}</h4>
<span className="text-gray-600">{edu.year}</span>
</div>
<p className="text-gray-600 italic">{edu.university}</p>
</div>
))}
</div>
);
case 'skills':
return (
<div key={section.id} className="mb-6">
<h3 className="text-lg font-bold mb-2 border-b border-gray-300 pb-1">SKILLS</h3>
<div className="flex flex-wrap gap-2">
{section.content.map((skill, index) => (
<span key={index} className="bg-gray-200 px-3 py-1 rounded-full text-sm">
{skill}
</span>
))}
</div>
</div>
);
default:
return null;
}
})}
</div>
</div>
);
};
// Templates Gallery Component
const TemplatesGallery = () => {
const templates = [
{ id: 1, name: 'Classic', category: 'Free', image: 'https://via.placeholder.com/300x400/1a1a2e/ffffff?text=Classic' },
{ id: 2, name: 'Modern', category: 'Free', image: 'https://via.placeholder.com/300x400/16213e/ffffff?text=Modern' },
{ id: 3, name: 'Minimal', category: 'Premium', image: 'https://via.placeholder.com/300x400/0f3460/ffffff?text=Minimal' },
{ id: 4, name: 'Creative', category: 'Premium', image: 'https://via.placeholder.com/300x400/533483/ffffff?text=Creative' },
{ id: 5, name: 'Executive', category: 'Premium', image: 'https://via.placeholder.com/300x400/3d087b/ffffff?text=Executive' },
{ id: 6, name: 'Tech', category: 'Premium', image: 'https://via.placeholder.com/300x400/2d00f7/ffffff?text=Tech' },
];
const [selectedCategory, setSelectedCategory] = useState('All');
const [selectedTemplate, setSelectedTemplate] = useState(null);
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
const categories = ['All', 'Free', 'Premium'];
const filteredTemplates = selectedCategory === 'All'
? templates
: templates.filter(t => t.category === selectedCategory);
const openPreview = (template) => {
setSelectedTemplate(template);
setIsPreviewOpen(true);
};
const closePreview = () => {
setIsPreviewOpen(false);
};
return (
<div className="container mx-auto px-4 py-8">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="mb-8"
>
<h1 className="text-4xl font-bold mb-4 gradient-text">Resume Templates</h1>
<p className="text-xl text-gray-300">Choose a template to get started</p>
</motion.div>
{/* Category Filter */}
<motion.div
className="flex space-x-4 mb-8 overflow-x-auto pb-2"
initial={{ x: -50 }}
animate={{ x: 0 }}
>
{categories.map(category => (
<motion.button
key={category}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
onClick={() => setSelectedCategory(category)}
className={`px-6 py-2 rounded-full ${selectedCategory === category ? 'bg-purple-600' : 'bg-gray-800'}`}
>
{category}
</motion.button>
))}
</motion.div>
{/* Templates Grid */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
{filteredTemplates.map(template => (
<motion.div
key={template.id}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3 }}
whileHover={{ y: -5 }}
className="neumorphism rounded-xl overflow-hidden relative"
>
{template.category === 'Premium' && (
<div className="premium-badge px-2 py-1 text-xs font-bold rounded-full">
PREMIUM
</div>
)}
<img
src={template.image}
alt={template.name}
className="w-full h-64 object-cover cursor-pointer"
onClick={() => openPreview(template)}
/>
<div className="p-4">
<div className="flex justify-between items-center">
<h3 className="font-bold text-lg">{template.name}</h3>
<span className={`text-sm ${template.category === 'Premium' ? 'text-yellow-400' : 'text-green-400'}`}>
{template.category}
</span>
</div>
<div className="flex justify-between mt-4">
<button
onClick={() => openPreview(template)}
className="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors"
>
Preview
</button>
<button
onClick={() => window.location.href = template.category === 'Premium' ? '/premium' : '/editor'}
className={`px-4 py-2 rounded-lg flex items-center ${template.category === 'Premium' ? 'bg-gradient-to-r from-yellow-500 to-orange-500' : 'bg-gradient-to-r from-purple-500 to-pink-500'}`}
>
{template.category === 'Premium' ? <FaLock className="mr-2" /> : <FaArrowRight className="mr-2" />}
{template.category === 'Premium' ? 'Unlock' : 'Use'}
</button>
</div>
</div>
</motion.div>
))}
</div>
{/* Template Preview Modal */}
<AnimatePresence>
{isPreviewOpen && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
className="fixed inset-0 bg-black bg-opacity-80 z-50 flex items-center justify-center p-4"
onClick={closePreview}
>
<motion.div
initial={{ scale: 0.9 }}
animate={{ scale: 1 }}
exit={{ scale: 0.9 }}
className="bg-gray-900 rounded-xl max-w-4xl w-full max-h-[90vh] overflow-y-auto"
onClick={(e) => e.stopPropagation()}
>
<div className="p-6">
<div className="flex justify-between items-center mb-4">
<h2 className="text-2xl font-bold">{selectedTemplate?.name} Template</h2>
<button
onClick={closePreview}
className="text-gray-400 hover:text-white"
>
<FaTimes size={24} />
</button>
</div>
<div className="bg-white p-8 rounded-lg">
<img
src={selectedTemplate?.image}
alt={selectedTemplate?.name}
className="w-full"
/>
</div>
<div className="mt-6 flex justify-between">
<button
onClick={closePreview}
className="px-6 py-3 bg-gray-800 hover:bg-gray-700 rounded-lg"
>
Close
</button>
<button
onClick={() => window.location.href = selectedTemplate?.category === 'Premium' ? '/premium' : '/editor'}
className={`px-6 py-3 rounded-lg flex items-center ${selectedTemplate?.category === 'Premium' ? 'bg-gradient-to-r from-yellow-500 to-orange-500' : 'bg-gradient-to-r from-purple-500 to-pink-500'}`}
>
{selectedTemplate?.category === 'Premium' ? <FaLock className="mr-2" /> : <FaArrowRight className="mr-2" />}
{selectedTemplate?.category === 'Premium' ? 'Upgrade to Unlock' : 'Use This Template'}
</button>
</div>
</div>
</motion.div>
</motion.div>
)}
</AnimatePresence>
</div>
);
};
// Premium Page Component
const PremiumPage = () => {
const features = [
{ icon: <FaFilePdf />, title: "Unlimited PDF Downloads", description: "Export your resume as high-quality PDF without watermarks" },
{ icon: <FaPalette />, title: "50+ Premium Templates", description: "Access all our professionally designed resume templates" },
{ icon: <FaRobot />, title: "Advanced AI Tools", description: "Get detailed resume analysis and optimization suggestions" },
{ icon: <FaMagic />, title: "Custom Branding", description: "Add your personal logo and custom color schemes" },
{ icon: <FaArrowsAlt />, title: "Priority Support", description: "Get fast responses from our support team" },
{ icon: <FaCrown />, title: "Exclusive Content", description: "Access to job search guides and interview tips" },
];
const plans = [
{
name: "Monthly",
price: "$9.99",
period: "month",
features: ["All premium templates", "Unlimited PDF downloads", "Basic AI tools"],
popular: false
},
{
name: "Annual",
price: "$79.99",
period: "year",
features: ["All premium templates", "Unlimited PDF downloads", "Advanced AI tools", "Priority support"],
popular: true,
discount: "33% off"
},
{
name: "Lifetime",
price: "$199.99",
period: "once",
features: ["All premium templates", "Unlimited PDF downloads", "All AI tools", "Priority support", "Future updates"],
popular: false
}
];
const [selectedPlan, setSelectedPlan] = useState(plans[1]);
return (
<div className="container mx-auto px-4 py-12">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="text-center mb-16"
>
<motion.h1
initial={{ y: -20 }}
animate={{ y: 0 }}
className="text-5xl font-bold mb-6 gradient-text"
>
Upgrade to ResumeAI Premium
</motion.h1>
<motion.p
initial={{ y: 20 }}
animate={{ y: 0 }}
className="text-xl text-gray-300 mb-10 max-w-3xl mx-auto"
>
Unlock the full potential of our resume builder with advanced features and premium templates.
</motion.p>
</motion.div>
<div className="flex flex-col lg:flex-row gap-12">
{/* Features List */}
<motion.div
initial={{ x: -50 }}
animate={{ x: 0 }}
className="lg:w-1/3"
>
<div className="glassmorphism p-8 rounded-xl sticky top-8">
<h2 className="text-2xl font-bold mb-6">Premium Features</h2>
<div className="space-y-6">
{features.map((feature, index) => (
<motion.div
key={index}
whileHover={{ x: 5 }}
className="flex items-start"
>
<div className="bg-purple-600 p-3 rounded-lg mr-4">
{feature.icon}
</div>
<div>
<h3 className="font-bold text-lg mb-1">{feature.title}</h3>
<p className="text-gray-300">{feature.description}</p>
</div>
</motion.div>
))}
</div>
</div>
</motion.div>
{/* Pricing Plans */}
<motion.div
initial={{ x: 50 }}
animate={{ x: 0 }}
className="lg:w-2/3"
>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
{plans.map((plan, index) => (
<motion.div
key={index}
whileHover={{ y: -5 }}
className={`neumorphism rounded-xl p-6 relative ${plan.popular ? 'ring-2 ring-yellow-400' : ''}`}
onClick={() => setSelectedPlan(plan)}
>
{plan.popular && (
<div className="absolute -top-3 left-1/2 transform -translate-x-1/2 bg-yellow-500 text-black px-3 py-1 rounded-full text-xs font-bold">
POPULAR
</div>
)}
{plan.discount && (
<div className="absolute -top-3 -right-3 bg-purple-600 text-white px-3 py-1 rounded-full text-xs font-bold">
{plan.discount}
</div>
)}
<h3 className="text-xl font-bold mb-2">{plan.name}</h3>
<div className="mb-4">
<span className="text-3xl font-bold">{plan.price}</span>
<span className="text-gray-400"> / {plan.period}</span>
</div>
<ul className="space-y-2 mb-6">
{plan.features.map((feature, i) => (
<li key={i} className="flex items-center">
<FaCheck className="text-green-400 mr-2" />
{feature}
</li>
))}
</ul>
<button
className={`w-full py-3 rounded-lg font-bold ${plan.popular ? 'bg-gradient-to-r from-yellow-500 to-orange-500' : 'bg-purple-700 hover:bg-purple-600'}`}
>
{plan.period === 'once' ? 'Get Lifetime Access' : 'Subscribe Now'}
</button>
</motion.div>
))}
</div>
{/* Selected Plan Details */}
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="glassmorphism p-8 rounded-xl"
>
<h2 className="text-2xl font-bold mb-6">You're selecting: {selectedPlan.name} Plan</h2>
<div className="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
<div>
<div className="text-4xl font-bold mb-1">{selectedPlan.price}</div>
<div className="text-gray-400">per {selectedPlan.period}</div>
</div>
{selectedPlan.discount && (
<div className="bg-purple-800 px-4 py-2 rounded-lg mt-4 md:mt-0">
Save {selectedPlan.discount}
</div>
)}
</div>
<div className="mb-8">
<h3 className="font-bold text-lg mb-3">Includes:</h3>
<ul className="grid grid-cols-1 md:grid-cols-2 gap-2">
{selectedPlan.features.map((feature, i) => (
<li key={i} className="flex items-center bg-gray-800 bg-opacity-50 p-3 rounded-lg">
<FaCheck className="text-green-400 mr-2" />
{feature}
</li>
))}
</ul>
</div>
<button className="w-full py-4 bg-gradient-to-r from-yellow-500 to-orange-500 rounded-lg font-bold text-lg flex items-center justify-center">
<FaCrown className="mr-3" />
{selectedPlan.period === 'once' ? 'Get Lifetime Access Now' : 'Start Premium Subscription'}
</button>
<p className="text-center text-gray-400 mt-4 text-sm">
7-day money back guarantee. Cancel anytime.
</p>
</motion.div>
{/* FAQ */}
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.2 }}
className="glassmorphism p-8 rounded-xl mt-12"
>
<h2 className="text-2xl font-bold mb-6">Frequently Asked Questions</h2>
<div className="space-y-4">
{[
{
question: "What payment methods do you accept?",
answer: "We accept all major credit cards (Visa, MasterCard, American Express), PayPal, and Apple Pay."
},
{
question: "Can I cancel my subscription anytime?",
answer: "Yes, you can cancel your subscription at any time. Your premium features will remain active until the end of your billing period."
},
{
question: "What happens if I don't renew my subscription?",
answer: "If you don't renew, you'll lose access to premium features but can continue using the free version. Your data will remain safe."
},
{
question: "Is there a free trial?",
answer: "We don't offer a free trial, but we have a 7-day money-back guarantee if you're not satisfied."
}
].map((item, index) => (
<div key={index} className="bg-gray-800 bg-opacity-50 p-4 rounded-lg">
<h3 className="font-bold mb-2">{item.question}</h3>
<p className="text-gray-300">{item.answer}</p>
</div>
))}
</div>
</motion.div>
</motion.div>
</div>
</div>
);
};
// Footer Component
const Footer = () => {
return (
<motion.footer
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.5 }}
className="glassmorphism mt-12 py-8"
>
<div className="container mx-auto px-4">
<div className="flex flex-col md:flex-row justify-between items-center">
<div className="flex items-center mb-4 md:mb-0">
<FaRobot className="text-2xl mr-2 text-purple-400" />
<span className="text-xl font-bold gradient-text">ResumeAI</span>
</div>
<div className="flex space-x-6 mb-4 md:mb-0">
<a href="#" className="hover:text-purple-300">Privacy Policy</a>
<a href="#" className="hover:text-purple-300">Terms of Service</a>
<a href="#" className="hover:text-purple-300">Contact Us</a>
</div>
<div className="flex space-x-4">
<a href="#" className="hover:text-purple-300">Twitter</a>
<a href="#" className="hover:text-purple-300">LinkedIn</a>
<a href="#" className="hover:text-purple-300">GitHub</a>
</div>
</div>
<div className="mt-8 text-center text-gray-400 text-sm">
© {new Date().getFullYear()} ResumeAI. All rights reserved.
</div>
</div>
</motion.footer>
);
};
// Render the app
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=NasirOO1/resumebuilder" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ResumeAI - Futuristic Resume Builder</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="https://unpkg.com/framer-motion@10.16.4/dist/framer-motion.js"></script>
<script src="https://unpkg.com/react-router-dom@6.14.1/umd/react-router-dom.development.js"></script>
<script src="https://unpkg.com/react-dnd@16.0.1/dist/umd/ReactDnD.min.js"></script>
<script src="https://unpkg.com/react-dnd-html5-backend@16.0.1/dist/umd/ReactDnDHTML5Backend.min.js"></script>
<script src="https://unpkg.com/react-icons@4.8.0/fa/index.js"></script>
<style>
.glassmorphism {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.neumorphism {
border-radius: 20px;
background: linear-gradient(145deg, #1a1a2e, #16213e);
box-shadow: 10px 10px 20px #0f0f1a,
-10px -10px 20px #252544;
}
.resume-section {
transition: all 0.3s ease;
}
.resume-section:hover {
transform: translateY(-5px);
}
.gradient-text {
background: linear-gradient(90deg, #00dbde, #fc00ff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.premium-badge {
position: absolute;
top: -10px;
right: -10px;
background: linear-gradient(135deg, #f6d365, #fda085);
transform: rotate(15deg);
box-shadow: 0 4px 15px rgba(246, 211, 101, 0.4);
}
</style>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect } = React;
const { motion, AnimatePresence } = FramerMotion;
const { BrowserRouter, Routes, Route, Link, useNavigate } = ReactRouterDOM;
const { DndProvider, useDrag, useDrop } = ReactDnd;
const { HTML5Backend } = ReactDndHTML5Backend;
const { FaMagic, FaRobot, FaPalette, FaArrowsAlt, FaFilePdf, FaCrown, FaLock, FaArrowRight, FaTimes, FaCheck } = ReactIcons.Fa;
// App Component
const App = () => {
return (
<BrowserRouter>
<DndProvider backend={HTML5Backend}>
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900 to-violet-900 text-white">
<Navbar />
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="/editor" element={<ResumeEditor />} />
<Route path="/templates" element={<TemplatesGallery />} />
<Route path="/premium" element={<PremiumPage />} />
</Routes>
<Footer />
</div>
</DndProvider>
</BrowserRouter>
);
};
// Navbar Component
const Navbar = () => {
const navigate = useNavigate();
const [isMenuOpen, setIsMenuOpen] = useState(false);
return (
<motion.nav
initial={{ y: -100 }}
animate={{ y: 0 }}
transition={{ duration: 0.5 }}
className="glassmorphism p-4"
>
<div className="container mx-auto flex justify-between items-center">
<motion.div
whileHover={{ scale: 1.05 }}
className="flex items-center cursor-pointer"
onClick={() => navigate('/')}
>
<FaRobot className="text-2xl mr-2 text-purple-400" />