Skip to content

Commit

Permalink
Merge branch 'main' into privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyank00007 authored Oct 15, 2024
2 parents 8c22883 + e797cd5 commit 308679a
Show file tree
Hide file tree
Showing 8 changed files with 1,584 additions and 579 deletions.
40 changes: 40 additions & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,49 @@
}
}

#progress-container {
width: 100%;
height: 5px;
background-color: white;
border-radius: 5px;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}

#progress-bar {
height: 100%;
background-color: #3f10ea;
}

</style>
</head>
<body>

<div id="progress-container">
<div id="progress-bar"></div>
</div>

<script>
let lastScrollPercentage = 0;

function updateProgressBar() {
const scrollTop = window.scrollY;
const windowHeight = document.documentElement.scrollHeight - window.innerHeight;
const scrollPercentage = (scrollTop / windowHeight) * 100;

const progressBar = document.getElementById('progress-bar');


lastScrollPercentage += (scrollPercentage - lastScrollPercentage) * 0.1;
progressBar.style.width = lastScrollPercentage + '%';
}
window.addEventListener('scroll', updateProgressBar);

</script>

<!-- Navbar -->
<nav class="navbar">
<img src="images/logo.png" alt="logo">
Expand All @@ -321,6 +360,7 @@ <h1>Resum Resume</h1>
<a class="tab" href="index.html">Home</a>
<a class="tab" href="about.html">About</a>
<a class="tab" href="resume.html">Build Resume</a>
<a class="tab" href="resume_tips.html">Resume Tips</a>
<a class="tab" href="signup.html">Sign Up</a>
<a class="tab" href="login.html">Login</a>
<a class="tab" href="privacypolicy.html">Privacy Policy</a>
Expand Down
199 changes: 199 additions & 0 deletions ats_score_finder.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resume ATS Score Finder</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha384-k6RqeWeci5ZR/Lv4MR0sA0FfDOMR5aN2eW1u1a1G6T8G6Fz2F4zS3z7P8S5f5WJ" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.10.377/pdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.4.2/mammoth.browser.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f4f4f4;
color: #333;
}
h1 {
text-align: center;
}
.heading{
background-color:#045D5D ;
height:200px;
margin-bottom:60px;
color:white;
width:100%;
justify-content:center;
}
.container {
max-width: 800px;
margin: auto;
background: #d9c79e;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
color:#2f4f4f;
}
button {
width: 100%;
padding: 10px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #218838;
}
#score {
font-size: 24px;
font-weight: bold;
text-align: center;
margin-top: 20px;
}
#feedback {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="heading">
<br><br><br>
<h1>Resume ATS Score Finder</h1>
</div>

<div class="container">
<h1>Resume ATS Score Finder</h1>
<label for="job-description">Enter Job Description:</label>
<textarea id="job-description" rows="4" style="width: 100%;" placeholder="Enter the job description here..."></textarea>

<label for="resume-upload">Upload Your Resume (PDF or Word):</label>
<input type="file" id="resume-upload" accept=".pdf, .docx" />

<label for="resume-text">Or Paste Your Resume Text Here:</label>
<textarea id="resume-text" rows="4" style="width: 100%;" placeholder="Paste your resume text..."></textarea>

<button id="analyze-button">Analyze Resume</button>

<div id="score">ATS Compatibility Score: 0%</div>
<div id="feedback"></div>
</div>

<script>
// Event listener for the analyze button
document.getElementById("analyze-button").addEventListener("click", function() {
const jobDescription = document.getElementById("job-description").value;
const resumeText = document.getElementById("resume-text").value.trim();

// Handle file upload
const fileInput = document.getElementById("resume-upload");
const file = fileInput.files[0];

// If both fields are empty, alert the user
if (!jobDescription || (!resumeText && !file)) {
alert("Please enter the job description and provide either a resume text or upload a file.");
return;
}

// If there's a file, process it
if (file) {
const reader = new FileReader();

reader.onload = function(event) {
const arrayBuffer = event.target.result;

if (file.type === "application/pdf") {
// PDF file handling
pdfjsLib.getDocument(arrayBuffer).promise.then(function(pdf) {
pdf.getPage(1).then(function(page) {
page.getTextContent().then(function(textContent) {
const textItems = textContent.items;
const resumeTextFromFile = textItems.map(item => item.str).join(" ");
analyzeResume(jobDescription, resumeText || resumeTextFromFile);
});
});
});
} else if (file.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document") {
// Word file handling
mammoth.extractRawText({arrayBuffer: arrayBuffer})
.then(function(result) {
const resumeTextFromFile = result.value; // The plain text
analyzeResume(jobDescription, resumeText || resumeTextFromFile);
})
.catch(function(err) {
console.error("Error reading Word file:", err);
});
} else {
alert("Unsupported file type. Please upload a PDF or Word document.");
}
};

reader.readAsArrayBuffer(file);
} else {
analyzeResume(jobDescription, resumeText); // Analyze with pasted text
}
});

// Function to analyze resume text
function analyzeResume(jobDescription, resumeText) {
if (jobDescription && resumeText) {
const atsScore = calculateATSScore(jobDescription, resumeText);
const feedback = displayFeedback(atsScore);
const formatFeedback = checkFormattingAndStructure(resumeText);

document.getElementById("score").innerText = "ATS Compatibility Score: " + atsScore + "%";
document.getElementById("feedback").innerText = feedback + " " + formatFeedback;
} else {
document.getElementById("feedback").innerText = "Please enter both the job description and resume.";
}
}

// Function to calculate ATS score based on job description keywords
function calculateATSScore(jobDescription, resumeText) {
// Extract keywords from job description
const jobKeywords = jobDescription.toLowerCase().match(/\b\w+\b/g) || [];
const resumeKeywords = resumeText.toLowerCase().match(/\b\w+\b/g) || [];
let matchingKeywords = 0;

jobKeywords.forEach(keyword => {
if (resumeKeywords.includes(keyword)) {
matchingKeywords++;
}
});

// Calculate score based on matching keywords
return ((matchingKeywords / jobKeywords.length) * 100).toFixed(2);
}

// Function to display feedback based on ATS score
function displayFeedback(atsScore) {
if (atsScore >= 80) {
return "Great! Your resume matches well with the job description.";
} else if (atsScore >= 50) {
return "Good job! Consider adding more relevant keywords.";
} else {
return "Your resume needs improvement. Focus on matching key skills.";
}
}

// Function to check formatting and structure
function checkFormattingAndStructure(resumeText) {
const lines = resumeText.split('\n');
const hasHeading = lines.some(line => line.trim().toLowerCase().includes("education") || line.trim().toLowerCase().includes("experience"));
const hasBulletPoints = lines.some(line => line.trim().startsWith("-") || line.trim().startsWith("•"));

if (!hasHeading) {
return "Consider adding clear headings (e.g., Education, Experience).";
}
if (!hasBulletPoints) {
return "Using bullet points can improve readability.";
}
return "Your formatting looks good!";
}
</script>

</body>
</html>
47 changes: 47 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,52 @@
.scroll-to-top i {
font-size: 20px;
}

#progress-container {
width: 100%;
height: 5px;
background-color: white;
border-radius: 5px;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}

#progress-bar {
height: 100%;
background-color: #3f10ea;
}

</style>
</head>

<body>
<!-- header section starts -->

<div id="progress-container">
<div id="progress-bar"></div>
</div>

<script>
let lastScrollPercentage = 0;

function updateProgressBar() {
const scrollTop = window.scrollY;
const windowHeight = document.documentElement.scrollHeight - window.innerHeight;
const scrollPercentage = (scrollTop / windowHeight) * 100;


const progressBar = document.getElementById('progress-bar');


lastScrollPercentage += (scrollPercentage - lastScrollPercentage) * 0.1;
progressBar.style.width = lastScrollPercentage + '%';
}
window.addEventListener('scroll', updateProgressBar);

</script>

<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
Expand All @@ -696,6 +736,8 @@
<a href="#home">Home</a>
<a href="about.html">About</a>
<a href="resume.html">Build Resume</a>
<a href="resume_tips.html">Resume Tips</a>
<li><a href="ats_score_finder.html">ATS Score Finder</a></li>
<a href="login.html">Login</a>
<a href="privacypolicy.html">Privacy Policy</a>
</nav>
Expand Down Expand Up @@ -1177,14 +1219,19 @@ <h3>Services</h3>
<li><a href="#">Resume Builder</a></li>
<li><a href="#">CV Templates</a></li>
<li><a href="#">Career Advice</a></li>

</ul>
</div>
<div class="footer-section">
<h3>Support</h3>
<ul>
<li><a href="/Faqs.html">FAQ</a></li>
<li><a href="#">Contact Us</a></li>
privacy
<li><a href="privacypolicy.html">Privacy Policy</a></li>

<li><a href="/privacy-policy.html">Privacy Policy</a></li>
main
</ul>
</div>
<div class="footer-section">
Expand Down
Loading

0 comments on commit 308679a

Please sign in to comment.