Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
added
  • Loading branch information
gfggithubleet authored Sep 28, 2023
1 parent 355aa37 commit e8561e0
Show file tree
Hide file tree
Showing 4 changed files with 494 additions and 0 deletions.
139 changes: 139 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@


var Address = 1
var phone = 0
var email = 0
var tr = 2
var skl = 1;
function new_skill(skill,name){
skl = skl + 1;
let id = 's'+skl;
return `<span class="badge badge-primary m-5" id=${id} onmouseenter="show_d('${id}')" onmouseleave="hide_d('${id}')">${name}<span class="glyphicon glyphicon-remove" onclick="del('${id}')"></span></span>`;
}
function new_address(address){
Address = Address + 1;
let id = 'addr'+Address;
return `<span onmouseenter="show('${id}')" onmouseleave="hide('${id}')" id=${id}><input type="text" class="col-sm-9" placeholder="Address" maxlength="18">
<button class="btn btn-success" onclick="add('address')"><span class="glyphicon glyphicon-plus-sign"></span></button><button class="btn btn-danger" onclick="del('${id}')"><span class="glyphicon glyphicon-trash"></span></button><br></span>`;
}
function new_email(email){
email = email + 1;
let id = 'email' + email;
return `<span onmouseenter="show('${id}')" onmouseleave="hide('${id}')" id=${id}><input type="email" class="col-sm-9" placeholder="email" >
<button class="btn btn-success" onclick="add('email')"><span class="glyphicon glyphicon-plus-sign"></span></button><button class="btn btn-danger" onclick="del('${id}')"><span class="glyphicon glyphicon-trash"></span></button><br></span>`;
}

function new_phone(phone){
phone = phone +1;
let id = 'phone'+phone;
return `<span onmouseenter="show('${id}')" onmouseleave="hide('${id}')" id=${id}><input type="tel" class="col-sm-9" placeholder="phone" maxlength="13"><button class="btn btn-success" onclick="add('phone')"><span class="glyphicon glyphicon-plus-sign"></span></button><button class="btn btn-danger" onclick="del('${id}')"><span class="glyphicon glyphicon-trash"></span></button><br></span>`;
}

function addelement(id){
id = 'td'+id;
var elem = document.getElementById(id);
var str = `<p class="heading2">Heading</p>
<ul>
<li>About</li>
<li>About</li>
</ul>
`;
elem.insertAdjacentHTML("beforeend",str);
}


function new_tr(tr_no){
tr = tr + 1;
let id = 'tr'+tr;
return `<tr id=${id} onmouseenter="show('${id}')" onmouseleave="hide('${id}')">
<td class="col-sm-3"><p class="heading1" contenteditable="true">HEADING</p></td>
<td class="col-sm-8" contenteditable="true" id="td${tr}"><p class="heading2">heading<button class="btn btn-success" contenteditable="false" onclick="addelement('${tr}')"><span class="glyphicon glyphicon-plus-sign"></span></button></p>
<ul>
<li>about</li>
<li>About</li>
</ul>
</td>
<td class="col-sm-1">
<button class="btn btn-success" onclick="add('tr')"><span class="glyphicon glyphicon-plus-sign"></span></button><button class="btn btn-danger" onclick="del('${id}')"><span class="glyphicon glyphicon-trash"></span></button></td>
</tr>`;
}



function show(e) {
var ele = document.getElementById(e)
console.log('show')
var btn = ele.getElementsByTagName('button')
for(let button of btn){
button.style.visibility="visible";
}
if(e=='skills'){
document.getElementById('sk').style.borderBottom="thin solid blueviolet";
}

}
function hide(e){
var ele = document.getElementById(e)
var btn = ele.getElementsByTagName('button')
for(let button of btn){
button.style.visibility="hidden";
}
if(e=='skills'){
document.getElementById('sk').style.border="none";
}
console.log('hide')
}
function add(type){
var new_add = document.getElementById('add');
var new_ph = document.getElementById('ph');
var new_em = document.getElementById('em');
var new_trow = document.getElementById('table');
var skill = document.getElementById('skill')
var t = document.getElementById('sk');
if(type=='address'){
new_add.insertAdjacentHTML("beforeend", new_address(Address));
}
else if(type=='email'){
new_em.insertAdjacentHTML("beforeend", new_email(email));
}
else if(type=='phone'){
new_ph.insertAdjacentHTML("beforeend", new_phone(phone));
}
else if(type=='tr'){
new_trow.insertAdjacentHTML("afterbegin", new_tr(tr));
}
else{
if(t.value.trim().length>=1){
skill.insertAdjacentHTML("beforeend",new_skill(skl,t.value));
t.value='';
}
}

}
function del(id){
var elem = document.getElementById(id);
elem.parentNode.removeChild(elem);
}

function show_d(id){
let elem = document.getElementById(id).getElementsByTagName('span')[0]
elem.style.visibility = "visible";
}

function hide_d(id){
let elem = document.getElementById(id).getElementsByTagName('span')[0]
elem.style.visibility = "hidden";
}

/*
* in PDF function i am swaping content of body with content of resume while printing it.
* after that i am swaping back.
*/

function PDF(){
var body = document.body.innerHTML;
var content = document.getElementById('resume').innerHTML;
document.body.innerHTML = content;
window.print();
document.body.innerHTML = body;
}
Binary file added images/favicon.ico
Binary file not shown.
229 changes: 229 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
<!DOCTYPE html>
<html>
<head>
<title>Resume</title>

<link rel="icon" type="image/png" href="images\favicon.ico">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="./style.css">

</head>
<body>
<!-- download button -->
<button class="buttonClass" id="download" onclick="PDF()" >Download</button>

<div class="container" id="resume">
<div class="row">
<!-- top left resume section begin -->

<div class="col-sm-5 r">

<!-- address section begin -->

<span id="add">
<span onmouseenter="show('addr')" onmouseleave="hide('addr')" id="addr">
<input type="text" class="col-sm-9" placeholder="Address" maxlength="18">
<button class="btn btn-success" onclick="add('address')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
<button class="btn btn-danger" onclick="del('addr')">
<span class="glyphicon glyphicon-trash"></span>
</button><br>
</span>
<span onmouseenter="show('addr1')" onmouseleave="hide('addr1')" id="addr1">
<input type="text" class="col-sm-9" placeholder="Address" maxlength="18">
<button class="btn btn-success" onclick="add('address')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button><button class="btn btn-danger" onclick="del('addr1')">
<span class="glyphicon glyphicon-trash"></span>
</button><br>
</span>
</span>

<!-- address section end -->

<!-- email section begin -->

<span id="em">
<span onmouseenter="show('email')" onmouseleave="hide('email')" id="email">
<input type="email" class="col-sm-9" placeholder="email" >
<button class="btn btn-success" onclick="add('email')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
<button class="btn btn-danger" onclick="del('email')">
<span class="glyphicon glyphicon-trash"></span>
</button><br>
</span>
</span>

<!-- email section end -->

<!-- phone number section begin -->

<span id="ph">
<span onmouseenter="show('phone')" onmouseleave="hide('phone')" id="phone">
<input type="tel" class="col-sm-9" placeholder="phone" maxlength="13">
<button class="btn btn-success" onclick="add('phone')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
<button class="btn btn-danger" onclick="del('phone')">
<span class="glyphicon glyphicon-trash"></span>
</button><br>
</span>
</span>

<!-- phone number section end -->

</div>

<!-- top left resume section end -->

<!-- top right resume section begin -->

<div class="col-sm-7">
<input type="text" id="name" placeholder="Name" maxlength="19"><br>
</div>

<!-- top right resume section end -->

</div>
<div class="row">
<div class="col-sm-12">

<!-- table begin -->


<table width="100%" id="table">

<!-- Row 1 begin -->

<tr id="tr1" onmouseenter="show('tr1')" onmouseleave="hide('tr1')" >

<!-- right section begin -->

<td class="col-sm-3">
<p class="heading1" contenteditable="true">WORK EXPERIENCE</p>
</td>

<!-- right section end -->

<!-- left section begin -->

<td contenteditable="true" id="td1" class="col-sm-8">
<p class="heading2"> Company Name
<button class="btn btn-success" contenteditable="false" onclick="addelement('1')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
</p>
<ul>
<li>Position</li>
<li>About</li>
</ul>
</td>
<td class="col-sm-1">
<button class="btn btn-success" onclick="add('tr')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
<button class="btn btn-danger" onclick="del('tr1')">
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>

<!-- left section end -->

</tr>

<!-- Row 1 end -->

<!-- Row 2 begin -->


<tr id="tr2" onmouseenter="show('tr2')" onmouseleave="hide('tr2')">

<!-- right section begin -->

<td class="col-sm-3">
<p class="heading1" contenteditable="true">EDUCATION</p>
</td>

<!-- right section end -->

<!-- left section begin -->

<td class="col-sm-8"contenteditable="true" id="td2">
<p class="heading2">Collage Name
<button class="btn btn-success" contenteditable="false" onclick="addelement('2')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
</p>
<ul>
<li>Major</li>
<li>About</li>
</ul>
</td>
<td class="col-sm-1">
<button class="btn btn-success" onclick="add('tr')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
<button class="btn btn-danger" onclick="del('tr1')">
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>




<!-- left section end -->

</tr>

<!-- Row 2 end -->

<!-- Row 3 begin -->

<tr>

<!-- right section begin -->


<td class="col-sm-3" onmouseenter="show('skills')" onmouseleave="hide('skills')">
<p class="heading1" >SKILLS</p>
<span id="skills">
<input type="text" id="sk" >
<button class="btn btn-primary" onclick="add('skill')">
<span class="glyphicon glyphicon-plus-sign"></span>
</button>
</span>
</td>

<!-- right section end -->

<!-- left section begin -->

<td class="col-sm-9" id="skill">
<span class="badge badge-primary m-5" id="s1" onmouseenter="show_d('s1')" onmouseleave="hide_d('s1')">Skill
<span class="glyphicon glyphicon-remove" onclick="del('s1')"></span>
</span>
</td>

<!-- left section begin -->

</tr>

<!-- Row 3 end -->


</table>

<!-- table end -->

</div>
</div>

</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
</html>
Loading

0 comments on commit e8561e0

Please sign in to comment.