-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
122 lines (116 loc) · 4.72 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
(function () {
[...document.querySelectorAll(".control")].forEach(button => {
button.addEventListener("click", function () {
document.querySelector(".active-btn").classList.remove("active-btn");
this.classList.add("active-btn");
document.querySelector(".active").classList.remove("active");
document.getElementById(button.dataset.id).classList.add("active");
})
});
document.querySelector(".theme-btn").addEventListener("click", () => {
document.body.classList.toggle("light-mode");
})
})();
$(document).ready(function () {
$(".theme-btn").click(function () {
$("body").toggleClass("light-mode");
}
);
$.getJSON("data/RxResume_JSONExport_FsM-pxr5YhuWW7F9cG7cQ.json", function (data) {
$("#name-data").text(data.basics.name);
$("#headline-data").text(data.basics.headline);
$("#summery-data").text(data.basics.summary);
$("#image-data").attr("src", data.basics.photo.url);
$("#about-me").text(data.basics.about);
$("#email-data").text(data.basics.email);
$("#phone-data").text(data.basics.phone);
$("#website-data").text(data.basics.website);
$("#location-data").text(data.basics.location.city);
$("#address-data").text(data.basics.location.address);
$("#country-data").text(data.basics.location.country);
$("#postal-code-data").text(data.basics.location.postalCode);
$("#Total-projects").text(data.basics.NoOfProjects);
$("#Total-reviews").text(data.basics.NoOfReviews);
$("#Total-clients").text(data.basics.NoOfClients);
$("#Total-experience").text(data.basics.yearsOfExperience);
data.sections.skills.items.forEach(element => {
$("#skills-list").append(
`<div class="progress-bar">
<p class="prog-title">${element.name}</p><span>${element.level}</span>
<div class="progress-con">
<p class="prog-text">${element.levelNum}0%</p>
<div class="progress">
<span class="${element.name}" style="width:${element.levelNum}0%"></span>
</div>
</div>
</div>`
);
});
data.sections.work.items.forEach(element => {
var dateStart = element.date.start;
var dateEnd = element.date.end;
if (dateEnd == "") {
dateEnd = "Present";
}
$("#timeline").append(
`<div class="timeline-item">
<div class="tl-icon">
<i class="fas fa-briefcase"></i>
</div>
<p class="tl-duration">${dateStart} - ${dateEnd}</p>
<h5>Web Developer<span> -${element.name}</span></h5>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Saepe quasi vero fugit.
</p>
</div>`
);
}
);
data.sections.education.items.forEach(element => {
var dateStart = element.date.start.substring(0, 7);
var dateEnd = element.date.end.substring(0, 7);
if (dateEnd == "") {
dateEnd = "Present";
}
if (dateEnd == "") {
dateEnd = "Present";
}
$("#timeline").append(
`<div class="timeline-item">
<div class="tl-icon">
<i class="fas fa-graduation-cap"></i>
</div>
<p class="tl-duration">${dateStart} - ${dateEnd}</p>
<h5>${element.degree}<span> -${element.institution}</span></h5>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Saepe quasi vero fugit.
</p>
</div>`
);
}
);
data.sections.projects.items.forEach(element => {
$("#projects").append(
`<div class="portfolio-item">
<div class="image">
<img src="img/port1.jpg" alt="">
</div>
<div class="hover-items">
<h3>${element.name}</h3>
<div class="icons" >
<a href="${element.urls[0].url}" class="icon">
<i class="fab fa-${element.urls[0].type.toLowerCase()}"></i>
</a>
</div>
</div>
</div>`
);
}
);
data.sections.languages.items.forEach(element => {
$("#language-data").append(element.name + " : ");
}
);
//send ip address to email
});
});