-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
284 lines (273 loc) · 9.1 KB
/
main.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
let navToggle = document.querySelector(".nav__toggle");
let navWrapper = document.querySelector(".nav__wrapper");
navToggle.addEventListener("click", function () {
if (navWrapper.classList.contains("active")) {
// this.setAttribute("aria-expanded", "false");
// this.setAttribute("aria-label", "menu");
navWrapper.classList.remove("active");
} else {
navWrapper.classList.add("active");
// this.setAttribute("aria-label", "close menu");
// this.setAttribute("aria-expanded", "true");
}
});
// nav bar toggle functionality
let mainNav = document.getElementById("js-menu");
let navBarToggle = document.getElementById("slider");
let mainmenu = document.getElementById("main");
// document.addEventListener('DOMContentLoaded', function () {
// navBarToggle.addEventListener('click', function () {
// mainNav.classList.toggle('active');
// });
// });
function navbarToggle() {
mainNav.classList.toggle("closed");
// mainmenu.classList.toggle('opened');
}
// navv bar toggle functionality ends here
// about us page dom manipulation
/* Storing multi-line JSON string in a JS variable
using the new ES6 template literals */
var json = `{
"Advisory Team": [
{
"name": "Dr. Malvika Neeraj",
"Qualification": "MBBS | MBA(Pharmaceutical Management)",
"Picture": "https://i.ibb.co/sVx5n9F/malvika.jpg",
"Linkedin": "https://www.linkedin.com/in/dr-malvika-neeraj-671967b9/"
},
{
"name": "Dr.Harshvardhan Bansode",
"Qualification": "MBBS | AFIH",
"Picture": "https://i.ibb.co/1LGHj5K/Harsh.jpg",
"Linkedin": "https://www.linkedin.com/in/harshvardhan-bansode-1bb731111/"
},
{
"name": "Dr. Vivek Waghela",
"Qualification": "MBBS | MD(Medicine)",
"Picture": "https://i.ibb.co/6WJphLj/Dr-Vivek-Waghela.jpg",
"Linkedin": "https://www.linkedin.com/in/vivek-waghela-a45ab388/"
},
{
"name": "Dr. Dipika Shah",
"Qualification": "MBBS | MD",
"Picture": "https://i.ibb.co/r5x0zLL/dr-dipika.jpg",
"Linkedin": "link"
}
],
"HealthCare Team": [
{
"name": "Priyancka Mertia",
"Qualification": "MSc(Biochemistry) | MBA(Pharmaceutical Management)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Uddhao Zambhare ",
"Qualification": "MBBS | MD(Skin & VD)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Afreen Mulla",
"Qualification": "MBBS | MS(OBGY)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Himani Murdeshwar",
"Qualification": "MBBS",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Pooja Shah",
"Qualification": "MBBS, MD (Ophthalmology), DNB, FICO(Retina), FAICO(Retina)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Eshan Dabhade",
"Qualification": "MBBS, MD (Pediatrics)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Vaishal Shah",
"Qualification": "MBBS,MD(Cardiology),IDCCM",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Salman Patel",
"Qualification": "MBBS,MD(Ophthalmology)",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Preeti Yadav",
"Qualification": "MBBS",
"Picture": "",
"Linkedin": ""
},
{
"name": "Dr Bijal Sangoi",
"Qualification": "MBBS, MD (Psychiatry)",
"Picture": "",
"Linkedin": ""
}
],
"Tech And Design": [
{
"name": "Abhi Saxena",
"Qualification": "",
"Picture": "https://i.ibb.co/09QtdcM/Abhi-Saxena.jpg",
"Linkedin": "https://www.linkedin.com/in/abhi-saxena-722b0b142/"
},
{
"name": "Manat Singh",
"Qualification": "",
"Picture": "",
"Linkedin": "https://www.linkedin.com/in/manat-singh-7a8420121"
},
{
"name": "Rishi Arya Juturu",
"Qualification": "M.Eng Internetworking",
"Picture": "https://i.ibb.co/wWMhbwf/Rishi-Arya-Juturu.jpg",
"Linkedin": "https://www.linkedin.com/in/jutururishiarya/"
},
{
"name": "Mahika",
"Qualification": "",
"Picture": "",
"Linkedin": ""
},
{
"name": "Navyata Neeraj",
"Qualification": "",
"Picture": "",
"Linkedin": "https://www.linkedin.com/in/navyata-neeraj/"
}
],
"Project Design And Development": [
{
"name": "Vaishnavi Kanuganti",
"Qualification": "",
"Picture": "https://i.ibb.co/k1FKX3r/Vaishnavi.jpg",
"Linkedin": "https://www.linkedin.com/in/vaishnavikanuganti"
},
{
"name": "Shubhang Luniya",
"Qualification": "",
"Picture": "",
"Linkedin": "https://www.linkedin.com/in/shubhang-luniya-895a91159/"
}
],
"Community Engagement": [
{
"name": "Dr Rashika Anand",
"Qualification": "",
"Picture": "",
"Linkedin": "https://www.linkedin.com/in/rashika-anand-777853154/"
},
{
"name": "Jennifer Collins",
"Qualification": "",
"Picture": "",
"Linkedin": "https://www.linkedin.com/in/jennifer-collins-a0480a204//"
},
{
"name": "Mahek Shaikh",
"Qualification": "",
"Picture": "",
"Linkedin": ""
},
{
"name": "Riya Sharma ",
"Qualification": "",
"Picture": "",
"Linkedin": ""
},
{
"name": "Anjali Ujjainwal ",
"Qualification": "",
"Picture": "",
"Linkedin": ""
}
]
}`;
// Converting JSON object to JS object
var obj = JSON.parse(json);
var main_div = document.getElementsByClassName("team_listing")[0];
for (var key in obj) {
var div = document.createElement("div");
div.className = "departmentName";
div.id = "departmentName";
var dept_name = document.createElement("p");
dept_name.innerHTML = key;
dept_name.className = "heading__4";
let hr = document.createElement("hr");
hr.className = "line";
var row_div = document.createElement("div");
row_div.className = "row";
for (key1 in obj[key]) {
var our_team = document.createElement("div");
our_team.className = "our-team";
// div picture in card
var div_pic = document.createElement("div");
div_pic.className = "picture";
var div_pic_img = document.createElement("IMG");
div_pic_img.className = "img-fluid";
if (obj[key][key1]["Picture"].length != 0) {
div_pic_img.setAttribute("src", obj[key][key1].Picture);
div_pic_img.setAttribute("alt", obj[key][key1].name);
} else {
div_pic_img.setAttribute("src", "./images/dummy-image.jpg");
div_pic_img.setAttribute("alt", obj[key][key1].name);
}
// memeber information in "team-contnet"
var team_content = document.createElement("div");
team_content.className = "team-content";
const name = document.createElement("H2");
name.className = "name";
name.innerHTML = obj[key][key1]["name"];
const qualification = document.createElement("H4");
qualification.className = "title";
if (obj[key][key1]["Qualification"].length != 0) {
qualification.innerHTML = obj[key][key1]["Qualification"];
}
team_content.append(name, qualification);
const ul = document.createElement("UL");
ul.className = "social";
const li = document.createElement("LI");
if (obj[key][key1]["Linkedin"].length != 0) {
const a = document.createElement("a");
a.setAttribute("href", obj[key][key1]["Linkedin"]);
a.setAttribute("class", "fab fa-linkedin");
a.setAttribute("aria-hidden", "true");
a.setAttribute("target", "_blank");
li.appendChild(a);
ul.appendChild(li);
}
div_pic.appendChild(div_pic_img);
our_team.append(div_pic, team_content, ul);
our_team.classList.add("our-team");
row_div.appendChild(our_team);
div.append(dept_name, hr, row_div);
}
main_div.append(div);
}
// ------------------------------------
// ------------------------------------
//
// Seekh Page Script Starts
//
// ------------------------------------
// ------------------------------------
// ------------------------------------
// ------------------------------------
//
// Seekh Page Script Ends
//
// ------------------------------------
// ------------------------------------