Skip to content

Commit

Permalink
Merge pull request #854 from Mohitranag18/dropdown
Browse files Browse the repository at this point in the history
Add Collapsible Categories with Dropdown for Step 1 in Resume Builder
  • Loading branch information
GarimaSingh0109 authored Oct 23, 2024
2 parents fdc4db8 + 938a950 commit 443ceed
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 17 deletions.
1 change: 1 addition & 0 deletions Resume.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ h2{
h3{
font-size: 2rem;
margin-bottom: 1rem;
font-weight: 400;
}

.section {
Expand Down
6 changes: 0 additions & 6 deletions Resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,3 @@ document.getElementById('reset').addEventListener('click', function() {
});


// nextstep1.addEventListener('click',()=>{
// step1p.classList.remove('active')
// step1p.classList.add('completed');
// step2p.classList.add('active');
// console.log("click")
// });
24 changes: 13 additions & 11 deletions resume.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resume Builder - Step 1</title>
<title>Build Resume</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="Resume.css">
</head>
<body>
<!-- header section starts -->
<!-- header section starts -->
<header>
<a href="#" class="logo">Resum Resume<span>.</span></a>

Expand Down Expand Up @@ -65,7 +66,7 @@ <h2>Fill Your Information</h2>

<!-- Personal Information -->
<div class="section" id="personal-info">
<h3>Personal Information</h3>
<h3>Personal Information <i id="caret1" class="fa-solid fa-caret-down"></i></h3>
<div class="pInfo">
<div class="pInfoLeft">
<label>Name:</label>
Expand All @@ -89,7 +90,7 @@ <h3>Personal Information</h3>

<!-- Education -->
<div class="section" id="education">
<h3>Education</h3>
<h3>Education <i id="caret2" class="fa-solid fa-caret-down"></i></h3>
<div id="education-fields">
<div class="education-entry">
<label>Institute:</label>
Expand All @@ -113,14 +114,14 @@ <h3>Education</h3>

<!-- Skills -->
<div class="section" id="skills">
<h3>Skills</h3>
<label>Skills (Comma Separated) :</label>
<h3>Skills <i id="caret3" class="fa-solid fa-caret-down"></i></h3>
<label id="skill-label">Skills (Comma Separated) :</label>
<input type="text" id="skills-input" placeholder="e.g., C, C++, Python">
</div>

<!-- Experience -->
<div class="section" id="experience">
<h3>Experience</h3>
<h3>Experience <i id="caret4" class="fa-solid fa-caret-down"></i></h3>
<div id="experience-fields">
<div class="experience-entry">
<div class="expLeft">
Expand All @@ -147,7 +148,7 @@ <h3>Experience</h3>

<!-- Achievements and Certifications -->
<div class="section" id="achievements">
<h3>Achievements and Certifications</h3>
<h3>Achievements and Certifications <i id="caret5" class="fa-solid fa-caret-down"></i></h3>
<div class="achive">
<div class="achiveLeft">
<label>Heading:</label>
Expand All @@ -162,7 +163,7 @@ <h3>Achievements and Certifications</h3>

<!-- Projects (Optional) -->
<div class="section" id="projects">
<h3>Projects (Optional)</h3>
<h3>Projects (Optional) <i id="caret6" class="fa-solid fa-caret-down"></i></h3>
<div id="project-fields">
<div class="project-entry">
<div class="projectLeft">
Expand All @@ -186,8 +187,8 @@ <h3>Projects (Optional)</h3>

<!-- Languages (Optional) -->
<div class="section" id="languages">
<h3>Languages (Optional)</h3>
<label>Languages (Comma Separated):</label>
<h3>Languages (Optional) <i id="caret7" class="fa-solid fa-caret-down"></i></h3>
<label id="langlabel">Languages (Comma Separated):</label>
<input type="text" id="languages-input" placeholder="e.g., English, Hindi, French">
</div>

Expand Down Expand Up @@ -279,5 +280,6 @@ <h3>Connect With Us</h3>

<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.min.js"></script>
<script src="Resume.js"></script>
<script src="resume2.js"></script>
</body>
</html>
115 changes: 115 additions & 0 deletions resume2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// this js file is part 2 for the collectResumeData.js

// dropdown info in step 1 section logic
const caret1 = document.querySelector('#caret1');
const caret2 = document.querySelector('#caret2');
const caret3 = document.querySelector('#caret3');
const caret4 = document.querySelector('#caret4');
const caret5 = document.querySelector('#caret5');
const caret6 = document.querySelector('#caret6');
const caret7 = document.querySelector('#caret7');
const pinfo = document.querySelector('.pInfo');
pinfo.style.display = 'none';
const education = document.querySelector('#education-fields');
const edubtn = document.querySelector('#add-education');
education.style.display = 'none';
edubtn.style.display = 'none';
const slabel = document.querySelector('#skill-label')
const sinput = document.querySelector('#skills-input')
slabel.style.display = 'none';
sinput.style.display = 'none';
const expfield = document.querySelector('#experience-fields');
const expbtn = document.querySelector('#add-experience');
expfield.style.display = 'none';
expbtn.style.display = 'none';
const achive = document.querySelector('.achive');
achive.style.display = 'none';
const projfield = document.querySelector('#project-fields');
const projbtn = document.querySelector('#add-project');
projfield.style.display = 'none';
projbtn.style.display = 'none';
const lnglabel = document.querySelector('#langlabel');
const lnginput = document.querySelector('#languages-input');
lnglabel.style.display = 'none';
lnginput.style.display = 'none';

caret1.addEventListener('click',()=>{
if(pinfo.style.display === 'none'){
pinfo.style.display = '';
caret1.style.transform = 'rotate(180deg)';
}
else{
pinfo.style.display = 'none';
caret1.style.transform = 'rotate(0)';
}
})
caret2.addEventListener('click',()=>{
if(education.style.display === 'none'){
education.style.display = '';
edubtn.style.display = '';
caret2.style.transform = 'rotate(180deg)';
}
else{
education.style.display = 'none';
edubtn.style.display = 'none';
caret2.style.transform = 'rotate(0)';
}
})
caret3.addEventListener('click',()=>{
if(slabel.style.display === 'none'){
slabel.style.display = '';
sinput.style.display = '';
caret3.style.transform = 'rotate(180deg)';
}
else{
slabel.style.display = 'none';
sinput.style.display = 'none';
caret3.style.transform = 'rotate(0)';
}
})
caret4.addEventListener('click',()=>{
if(expfield.style.display === 'none'){
expfield.style.display = '';
expbtn.style.display = '';
caret4.style.transform = 'rotate(180deg)';
}
else{
expfield.style.display = 'none';
expbtn.style.display = 'none';
caret4.style.transform = 'rotate(0)';
}
})
caret5.addEventListener('click',()=>{
if(achive.style.display === 'none'){
achive.style.display = '';
caret5.style.transform = 'rotate(180deg)';
}
else{
achive.style.display = 'none';
caret5.style.transform = 'rotate(0)';
}
})
caret6.addEventListener('click',()=>{
if(projfield.style.display === 'none'){
projfield.style.display = '';
projbtn.style.display = '';
caret6.style.transform = 'rotate(180deg)';
}
else{
projfield.style.display = 'none';
projbtn.style.display = 'none';
caret6.style.transform = 'rotate(0)';
}
})
caret7.addEventListener('click',()=>{
if(lnglabel.style.display === 'none'){
lnglabel.style.display = '';
lnginput.style.display = '';
caret7.style.transform = 'rotate(180deg)';
}
else{
lnglabel.style.display = 'none';
lnginput.style.display = 'none';
caret7.style.transform = 'rotate(0)';
}
})

0 comments on commit 443ceed

Please sign in to comment.