-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c8ed64
commit 15fb567
Showing
4 changed files
with
321 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Resume Studio</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<header class="header"> | ||
<h1>Resume Studio</h1> | ||
<button id="themeSwitcher" title="Switch Theme">🌙</button> | ||
</header> | ||
<main> | ||
<section class="builder"> | ||
<h2>Resume Builder</h2> | ||
<form id="resumeForm"> | ||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" placeholder="Enter your name"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="email">Email:</label> | ||
<input type="email" id="email" placeholder="Enter your email"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="phone">Phone:</label> | ||
<input type="tel" id="phone" placeholder="Enter your phone number"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="education">Education:</label> | ||
<input type="text" id="education" placeholder="Enter your education details"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="summary">Summary:</label> | ||
<textarea id="summary" placeholder="Brief about yourself"></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<label for="projects">Projects:</label> | ||
<textarea id="projects" placeholder="Brief about projects develope by you"></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<label for="skills">Skills:</label> | ||
<textarea id="skills" placeholder="Separate skills with commas"></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<label for="experience">Experience:</label> | ||
<textarea id="experience" placeholder="Describe your past experiences"></textarea> | ||
</div> | ||
<button type="button" id="previewBtn">Live Preview</button> | ||
<button type="button" id="downloadBtn">Download Resume</button> | ||
</form> | ||
</section> | ||
<section class="preview"> | ||
<h2>Live Preview</h2> | ||
<div id="resumePreview"> | ||
<p class="placeholder">Fill the form to see live preview...</p> | ||
</div> | ||
</section> | ||
</main> | ||
<footer> | ||
|
||
</footer> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
document.addEventListener("DOMContentLoaded", () => { | ||
const themeSwitcher = document.getElementById("themeSwitcher"); | ||
const resumeForm = document.getElementById("resumeForm"); | ||
const resumePreview = document.getElementById("resumePreview"); | ||
const previewBtn = document.getElementById("previewBtn"); | ||
const downloadBtn = document.getElementById("downloadBtn"); | ||
|
||
// Toggle theme | ||
themeSwitcher.addEventListener("click", () => { | ||
document.body.classList.toggle("dark"); | ||
themeSwitcher.textContent = document.body.classList.contains("dark") ? "☀️" : "🌙"; | ||
}); | ||
|
||
// Update live preview | ||
const updatePreview = () => { | ||
const name = document.getElementById("name").value; | ||
const email = document.getElementById("email").value; | ||
const phone = document.getElementById("phone").value; | ||
const education = document.getElementById("education").value; | ||
const summary = document.getElementById("summary").value; | ||
const projects = document.getElementById("projects").value; | ||
const skills = document.getElementById("skills").value; | ||
const experience = document.getElementById("experience").value; | ||
|
||
resumePreview.innerHTML = ` | ||
<h3>${name || "Your Name"}</h3> | ||
<p><strong>Email:</strong> ${email || "[email protected]"}</p> | ||
<p><strong>Phone:</strong> ${phone || "123-456-7890"}</p> | ||
<h4>Education</h4> | ||
<p>${education || "State your educational details."}</p> | ||
<h4>Summary</h4> | ||
<p>${summary || "Write a brief summary about yourself."}</p> | ||
<h4>Projects</h4> | ||
<p>${projects || "write about projects developed by you."}</p> | ||
<h4>Skills</h4> | ||
<ul>${skills.split(",").map(skill => `<li>${skill.trim()}</li>`).join("")}</ul> | ||
<h4>Experience</h4> | ||
<p>${experience || "Add your work experience here."}</p> | ||
`; | ||
}; | ||
|
||
previewBtn.addEventListener("click", updatePreview); | ||
|
||
// Download resume as PDF | ||
downloadBtn.addEventListener("click", () => { | ||
const element = document.createElement("a"); | ||
const content = resumePreview.innerHTML; | ||
const blob = new Blob([content], { type: "text/html" }); | ||
const url = URL.createObjectURL(blob); | ||
element.href = url; | ||
element.download = "resume.html"; | ||
element.click(); | ||
URL.revokeObjectURL(url); | ||
}); | ||
}); |
Oops, something went wrong.