|
|
<!DOCTYPE html> |
|
|
<html lang="en" class="scroll-smooth"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>AI CV Summarizer | Smart Document Analysis</title> |
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
|
|
<style> |
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); |
|
|
body { |
|
|
font-family: 'Inter', sans-serif; |
|
|
background-color: #f8fafc; |
|
|
} |
|
|
.file-upload:hover { |
|
|
transform: translateY(-2px); |
|
|
box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.2); |
|
|
} |
|
|
.summary-area { |
|
|
min-height: 200px; |
|
|
transition: all 0.3s ease; |
|
|
} |
|
|
.radio-custom { |
|
|
-webkit-appearance: none; |
|
|
-moz-appearance: none; |
|
|
appearance: none; |
|
|
width: 16px; |
|
|
height: 16px; |
|
|
border: 2px solid #e2e8f0; |
|
|
border-radius: 50%; |
|
|
outline: none; |
|
|
cursor: pointer; |
|
|
transition: all 0.2s; |
|
|
} |
|
|
.radio-custom:checked { |
|
|
border-color: #4f46e5; |
|
|
background-color: #4f46e5; |
|
|
background-image: radial-gradient(circle, white 35%, transparent 40%); |
|
|
} |
|
|
.drag-active { |
|
|
border-color: #4f46e5; |
|
|
background-color: #eef2ff; |
|
|
} |
|
|
</style> |
|
|
</head> |
|
|
<body> |
|
|
<div class="min-h-screen flex flex-col"> |
|
|
|
|
|
<header class="bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-8 px-4 shadow-lg"> |
|
|
<div class="container mx-auto max-w-6xl"> |
|
|
<div class="flex flex-col md:flex-row items-center justify-between gap-6"> |
|
|
<div> |
|
|
<h1 class="text-3xl md:text-4xl font-bold mb-2 flex items-center gap-3"> |
|
|
<i class="fas fa-brain"></i> AI CV Summarizer |
|
|
</h1> |
|
|
<p class="text-indigo-100 opacity-90">Extract key insights from documents in seconds</p> |
|
|
</div> |
|
|
<div class="flex items-center gap-4"> |
|
|
<span class="px-3 py-1 bg-white/20 rounded-full text-sm flex items-center gap-2"> |
|
|
<i class="fas fa-bolt text-yellow-300"></i> Powered by Gemini 2.5 |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</header> |
|
|
|
|
|
|
|
|
<main class="flex-1 py-8 px-4"> |
|
|
<div class="container mx-auto max-w-6xl"> |
|
|
<div class="flex flex-col gap-8"> |
|
|
|
|
|
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100"> |
|
|
<h2 class="text-xl font-semibold mb-4 text-gray-800 flex items-center gap-2"> |
|
|
<i class="fas fa-cloud-upload-alt text-indigo-500"></i> Upload Your Document |
|
|
</h2> |
|
|
|
|
|
<div class="flex mb-4 gap-2"> |
|
|
<button id="tabPdf" class="flex-1 py-2 px-4 rounded-lg border border-indigo-500 text-indigo-500 font-medium bg-indigo-50">PDF Upload</button> |
|
|
<button id="tabText" class="flex-1 py-2 px-4 rounded-lg border border-gray-300 text-gray-500 font-medium">Text Input</button> |
|
|
</div> |
|
|
|
|
|
<div id="pdfSection"> |
|
|
<div id="dropZone" class="file-upload border-2 border-dashed border-gray-300 rounded-lg p-8 text-center cursor-pointer transition-all duration-300 mb-6"> |
|
|
<div class="flex flex-col items-center justify-center"> |
|
|
<i class="fas fa-file-pdf text-5xl text-indigo-400 mb-4"></i> |
|
|
<input type="file" id="fileInput" class="hidden" accept=".pdf" /> |
|
|
<button id="uploadBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-lg font-medium mb-2 transition-colors duration-300"> |
|
|
Select PDF File |
|
|
</button> |
|
|
<p class="text-gray-500 text-sm">or drag and drop here</p> |
|
|
<p class="text-gray-400 text-xs mt-2">PDF up to 10MB</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div id="textSection" class="hidden"> |
|
|
<textarea id="cvTextInput" class="w-full h-40 p-4 border border-gray-300 rounded-lg mb-4 focus:border-indigo-500 focus:ring-indigo-500" placeholder="Paste your CV content here..."></textarea> |
|
|
</div> |
|
|
|
|
|
<div class="mb-4"> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Job Description (JD)</label> |
|
|
<textarea id="jdTextInput" class="w-full h-40 p-4 border border-gray-300 rounded-lg mb-4 focus:border-indigo-500 focus:ring-indigo-500" placeholder="Paste the job description here..."></textarea> |
|
|
</div> |
|
|
|
|
|
<div class="space-y-5"> |
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Output Language</label> |
|
|
<select class="w-full rounded-lg border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 shadow-sm"> |
|
|
<option selected>Vietnamese</option> |
|
|
<option>English</option> |
|
|
<option>Spanish</option> |
|
|
<option>French</option> |
|
|
<option>German</option> |
|
|
<option>Chinese</option> |
|
|
</select> |
|
|
</div> |
|
|
|
|
|
<div> |
|
|
<label class="block text-sm font-medium text-gray-700 mb-2">Summary Length</label> |
|
|
<div class="flex items-center gap-4"> |
|
|
<label class="flex items-center gap-2 cursor-pointer"> |
|
|
<input type="radio" name="summaryLength" class="radio-custom" checked> |
|
|
<span class="text-sm">Short (~100 words)</span> |
|
|
</label> |
|
|
<label class="flex items-center gap-2 cursor-pointer"> |
|
|
<input type="radio" name="summaryLength" class="radio-custom"> |
|
|
<span class="text-sm">Medium (~250 words)</span> |
|
|
</label> |
|
|
<label class="flex items-center gap-2 cursor-pointer"> |
|
|
<input type="radio" name="summaryLength" class="radio-custom"> |
|
|
<span class="text-sm">Long (~500 words)</span> |
|
|
</label> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<button id="processBtn" class="mt-8 w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 px-4 rounded-lg font-medium flex items-center justify-center gap-2 transition-colors duration-300 disabled:opacity-50 disabled:cursor-not-allowed" disabled> |
|
|
<i class="fas fa-magic"></i> Generate Summary |
|
|
</button> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto"> |
|
|
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2"> |
|
|
<i class="fas fa-file-alt text-indigo-500"></i> Extracted CV Content |
|
|
</h3> |
|
|
<div id="extractedContent" class="text-gray-700 text-sm overflow-auto"> |
|
|
<div class="text-center py-12 text-gray-400"> |
|
|
<i class="fas fa-file-import text-4xl mb-3"></i> |
|
|
<p>Upload your CV or paste text to see extracted content</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto"> |
|
|
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2"> |
|
|
<i class="fas fa-briefcase text-indigo-500"></i> Job Description |
|
|
</h3> |
|
|
<div id="jdContent" class="text-gray-700 overflow-auto"> |
|
|
<div class="text-center py-12 text-gray-400"> |
|
|
<i class="fas fa-align-left text-4xl mb-3"></i> |
|
|
<p>Enter job description on the left to see it here</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto"> |
|
|
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2"> |
|
|
<i class="fas fa-robot text-indigo-500"></i> AI-Generated Summary |
|
|
</h3> |
|
|
<div id="aiSummary" class="text-gray-700 overflow-auto"> |
|
|
<div class="text-center py-12 text-gray-400"> |
|
|
<i class="fas fa-spinner fa-spin text-4xl mb-3"></i> |
|
|
<p>Your summary will appear here after processing...</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto"> |
|
|
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2"> |
|
|
<i class="fas fa-project-diagram text-indigo-500"></i> CV-JD Match Analysis |
|
|
</h3> |
|
|
<div id="matchAnalysis" class="text-gray-700 overflow-auto"> |
|
|
<div class="text-center py-12 text-gray-400"> |
|
|
<i class="fas fa-search text-4xl mb-3"></i> |
|
|
<p>Analysis of CV-JD match will appear here</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</main> |
|
|
|
|
|
|
|
|
<footer class="bg-gray-50 py-6 text-center text-gray-500 text-sm border-t border-gray-200"> |
|
|
<div class="container mx-auto max-w-6xl px-4"> |
|
|
<p>© 2023 AI CV Summarizer. All rights reserved.</p> |
|
|
<p class="mt-1 flex items-center justify-center gap-2"> |
|
|
<span>This service may use your files to improve the AI model.</span> |
|
|
<a href="https://github.com/username/repo/issues/new" target="_blank" class="text-indigo-600 hover:text-indigo-800"> |
|
|
<i class="fas fa-bug"></i> Report Bug |
|
|
</a> |
|
|
</p> |
|
|
</div> |
|
|
</footer> |
|
|
</div> |
|
|
|
|
|
<script> |
|
|
|
|
|
const dropZone = document.getElementById('dropZone'); |
|
|
const fileInput = document.getElementById('fileInput'); |
|
|
const uploadBtn = document.getElementById('uploadBtn'); |
|
|
const processBtn = document.getElementById('processBtn'); |
|
|
|
|
|
uploadBtn.addEventListener('click', () => fileInput.click()); |
|
|
|
|
|
fileInput.addEventListener('change', (e) => { |
|
|
if (e.target.files.length) { |
|
|
handleFile(e.target.files[0]); |
|
|
} |
|
|
}); |
|
|
|
|
|
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { |
|
|
dropZone.addEventListener(eventName, preventDefaults, false); |
|
|
}); |
|
|
|
|
|
function preventDefaults(e) { |
|
|
e.preventDefault(); |
|
|
e.stopPropagation(); |
|
|
} |
|
|
|
|
|
['dragenter', 'dragover'].forEach(eventName => { |
|
|
dropZone.addEventListener(eventName, highlight, false); |
|
|
}); |
|
|
|
|
|
['dragleave', 'drop'].forEach(eventName => { |
|
|
dropZone.addEventListener(eventName, unhighlight, false); |
|
|
}); |
|
|
|
|
|
function highlight() { |
|
|
dropZone.classList.add('drag-active'); |
|
|
} |
|
|
|
|
|
function unhighlight() { |
|
|
dropZone.classList.remove('drag-active'); |
|
|
} |
|
|
|
|
|
dropZone.addEventListener('drop', (e) => { |
|
|
const dt = e.dataTransfer; |
|
|
const file = dt.files[0]; |
|
|
handleFile(file); |
|
|
}); |
|
|
|
|
|
function handleFile(file) { |
|
|
if (file.type !== 'application/pdf') { |
|
|
alert('Please upload a PDF file'); |
|
|
return; |
|
|
} |
|
|
if (file.size > 10 * 1024 * 1024) { |
|
|
alert('File is too large. Maximum size is 10MB'); |
|
|
return; |
|
|
} |
|
|
|
|
|
|
|
|
processBtn.disabled = false; |
|
|
|
|
|
|
|
|
const extractedContent = document.getElementById('extractedContent'); |
|
|
extractedContent.innerHTML = ` |
|
|
<div class="flex items-start gap-4 mb-4"> |
|
|
<i class="fas fa-file-pdf text-red-500 mt-1"></i> |
|
|
<div> |
|
|
<h4 class="font-medium">${file.name}</h4> |
|
|
<p class="text-xs text-gray-500">${(file.size / (1024 * 1024)).toFixed(2)} MB</p> |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-green-600 text-sm"><i class="fas fa-check-circle"></i> Ready to process</p> |
|
|
`; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
processBtn.addEventListener('click', () => { |
|
|
const aiSummary = document.getElementById('aiSummary'); |
|
|
aiSummary.innerHTML = ` |
|
|
<div class="text-center py-8"> |
|
|
<i class="fas fa-spinner fa-spin text-4xl mb-3 text-indigo-500"></i> |
|
|
<p class="text-gray-600">Generating your summary...</p> |
|
|
</div> |
|
|
`; |
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
const sampleSummary = ` |
|
|
<div class="space-y-4"> |
|
|
<div class="p-4 bg-indigo-50 rounded-lg"> |
|
|
<h4 class="font-medium text-indigo-700 flex items-center gap-2"><i class="fas fa-user-graduate"></i> Education</h4> |
|
|
<p class="text-sm mt-1">Bachelor's in Computer Science from XYZ University (2015-2019)</p> |
|
|
</div> |
|
|
<div class="p-4 bg-green-50 rounded-lg"> |
|
|
<h4 class="font-medium text-green-700 flex items-center gap-2"><i class="fas fa-briefcase"></i> Experience</h4> |
|
|
<p class="text-sm mt-1">3 years as a Software Engineer at ABC Company, specialized in web development and UI design.</p> |
|
|
</div> |
|
|
<div class="p-4 bg-blue-50 rounded-lg"> |
|
|
<h4 class="font-medium text-blue-700 flex items-center gap-2"><i class="fas fa-code"></i> Skills</h4> |
|
|
<p class="text-sm mt-1">JavaScript, React, Node.js, Python, SQL, Git, Agile Methodologies</p> |
|
|
</div> |
|
|
</div> |
|
|
`; |
|
|
aiSummary.innerHTML = sampleSummary; |
|
|
}, 2500); |
|
|
}); |
|
|
|
|
|
const tabPdf = document.getElementById('tabPdf'); |
|
|
const tabText = document.getElementById('tabText'); |
|
|
const pdfSection = document.getElementById('pdfSection'); |
|
|
const textSection = document.getElementById('textSection'); |
|
|
const cvTextInput = document.getElementById('cvTextInput'); |
|
|
|
|
|
tabPdf.addEventListener('click', () => { |
|
|
pdfSection.classList.remove('hidden'); |
|
|
textSection.classList.add('hidden'); |
|
|
tabPdf.classList.add('border-indigo-500', 'text-indigo-500', 'bg-indigo-50'); |
|
|
tabPdf.classList.remove('border-gray-300', 'text-gray-500'); |
|
|
tabText.classList.add('border-gray-300', 'text-gray-500'); |
|
|
tabText.classList.remove('border-indigo-500', 'text-indigo-500', 'bg-indigo-50'); |
|
|
}); |
|
|
|
|
|
tabText.addEventListener('click', () => { |
|
|
pdfSection.classList.add('hidden'); |
|
|
textSection.classList.remove('hidden'); |
|
|
tabText.classList.add('border-indigo-500', 'text-indigo-500', 'bg-indigo-50'); |
|
|
tabText.classList.remove('border-gray-300', 'text-gray-500'); |
|
|
tabPdf.classList.add('border-gray-300', 'text-gray-500'); |
|
|
tabPdf.classList.remove('border-indigo-500', 'text-indigo-500', 'bg-indigo-50'); |
|
|
}); |
|
|
|
|
|
|
|
|
const jdTextInput = document.getElementById('jdTextInput'); |
|
|
const jdContent = document.getElementById('jdContent'); |
|
|
|
|
|
jdTextInput.addEventListener('input', () => { |
|
|
if (jdTextInput.value.trim()) { |
|
|
jdContent.innerHTML = ` |
|
|
<div class="prose max-w-none"> |
|
|
<pre class="whitespace-pre-wrap">${jdTextInput.value}</pre> |
|
|
</div> |
|
|
`; |
|
|
} else { |
|
|
jdContent.innerHTML = ` |
|
|
<div class="text-center py-12 text-gray-400"> |
|
|
<i class="fas fa-align-left text-4xl mb-3"></i> |
|
|
<p>Enter job description on the left to see it here</p> |
|
|
</div> |
|
|
`; |
|
|
} |
|
|
}); |
|
|
</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=Grzimo/cvscanner" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
|
|
</html> |