2025-02-13 15:32:48 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>AI Cover Letter Generator</title>
|
2025-02-18 16:22:27 -05:00
|
|
|
<!-- <link rel="stylesheet" href="css/styles.css"> -->
|
|
|
|
<!-- Used for Testing purposes only -->
|
|
|
|
<link rel="stylesheet" href="css/base_styles.css">
|
2025-02-13 15:32:48 -05:00
|
|
|
</head>
|
|
|
|
<body>
|
2025-02-18 16:22:27 -05:00
|
|
|
<h1 class="text-2xl text-center">Generate Your Cover Letter</h1>
|
2025-02-13 15:32:48 -05:00
|
|
|
<br>
|
|
|
|
<form id="uploadForm" enctype="multipart/form-data">
|
2025-02-14 09:25:16 -05:00
|
|
|
<label for="resume">Upload Resume (pdf or docx):</label>
|
2025-02-18 16:22:27 -05:00
|
|
|
<input type="file" id="resume" name="resume" accept=".pdf,.docx,.doc" required><br><br>
|
2025-02-17 15:00:00 -05:00
|
|
|
<button type="submit" id="generateBtn">Read Resume</button>
|
2025-02-13 15:32:48 -05:00
|
|
|
</form>
|
|
|
|
|
2025-02-17 16:22:13 -05:00
|
|
|
<div id="resumePreviewSection">
|
2025-02-18 16:39:38 -05:00
|
|
|
<label for="profileJson">Candidate Profile (Editable JSON):</label>
|
|
|
|
<textarea id="profileJson" style="width: 100%; height: 200px; font-family: monospace;"></textarea>
|
|
|
|
<p id="jsonError" style="color: red; display: none;">Invalid JSON! Please correct it.</p>
|
2025-02-17 14:45:43 -05:00
|
|
|
<label for="jobDescription">Paste Job Description:</label>
|
|
|
|
<textarea id="jobDescription" rows="5" required></textarea>
|
2025-02-17 16:12:28 -05:00
|
|
|
<label for="keyPoints">Key Points for Letter (optional):</label>
|
|
|
|
<textarea id="keyPoints" rows="5" required></textarea>
|
2025-02-17 14:45:43 -05:00
|
|
|
<button id="generateCoverLetterBtn">Generate Cover Letter</button>
|
|
|
|
</div>
|
2025-02-13 15:32:48 -05:00
|
|
|
|
2025-02-17 14:45:43 -05:00
|
|
|
<!-- Hidden To Start With -->
|
2025-02-17 16:22:13 -05:00
|
|
|
<div id="coverLetterSection">
|
2025-02-17 14:45:43 -05:00
|
|
|
<h3>Generated Cover Letter:</h3>
|
2025-02-18 16:22:27 -05:00
|
|
|
<textarea id="coverLetterOutput" rows="15" cols="80"></textarea>
|
2025-02-20 15:57:38 -05:00
|
|
|
<button id="downloadCoverLetterBtn">Download as DOCX</button>
|
2025-02-13 15:32:48 -05:00
|
|
|
</div>
|
2025-02-20 09:19:20 -05:00
|
|
|
<div id="tailoredResumeSection">
|
|
|
|
<h3>Tailored Resume:</h3>
|
|
|
|
<textarea id="tailoredResumeOutput" rows="15" cols="80"></textarea>
|
2025-02-20 15:57:38 -05:00
|
|
|
<button id="downloadResumeBtn">Download Resume as DOCX</button>
|
2025-02-20 09:19:20 -05:00
|
|
|
<h3>Key Updates</h3>
|
|
|
|
<pre id="keyResumeUpdates"></pre>
|
|
|
|
</div>
|
2025-02-13 15:32:48 -05:00
|
|
|
<!-- End Hidden Section -->
|
|
|
|
|
|
|
|
|
2025-02-13 15:56:40 -05:00
|
|
|
<script src="js/script.js"></script> <!-- External JS file -->
|
2025-02-13 15:32:48 -05:00
|
|
|
|
2025-02-22 06:31:01 -05:00
|
|
|
<script>
|
|
|
|
fetch('/env')
|
|
|
|
.then(response => response.json())
|
|
|
|
.then(data => {
|
|
|
|
if (data.TEST_MODE === 'true') {
|
|
|
|
const testScript = document.createElement("script");
|
|
|
|
testScript.src = "js/test.js";
|
|
|
|
document.body.appendChild(testScript);
|
|
|
|
console.log("🚀 Test mode enabled");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => console.error("Error fetching environment variables:", error));
|
|
|
|
</script>
|
|
|
|
|
2025-02-13 15:32:48 -05:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|