generated from microverseinc/readme-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
75 lines (65 loc) · 3 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
const programQuest = document.querySelector('.program-quests');
const questSpeakers = [
{
name: 'Ryan Merkley',
image: './images/reagan.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
{
name: 'Julia Leda',
image: './images/julia.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
{
name: 'Kelnam Chon',
image: './images/kilnam.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
{
name: 'Lila Tretkov',
image: './images/lila.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
{
name: 'Sohyeong Noh',
image: './images/sohyeong.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
{
name: 'Yochai Benkler',
image: './images/yochai.png',
description: 'Berkman Professor of Enterpreneurial Legal Studies at Harvard Law School',
studies: 'Benkler studies commons-based peer production, and publish his seminal book The Wealth of Networks in 2006.',
},
];
questSpeakers.forEach((quest) => {
const programContainer = document.createElement('div');
programContainer.className = 'program-container';
programContainer.innerHTML = `<div class="speaker-description"> <img src=${quest.image} alt="speaker image" class="speaker-picture">
<div class="name-descrip"> <h3><strong>${quest.name}</strong></h3> <p class="guest-descrip"> ${quest.description}</p></div></div> <h3 class="studies">${quest.studies}</h3>`;
programQuest.appendChild(programContainer);
});
const menuNavMobile = document.querySelector('.menu-nav-mobile');
const menuBar = document.querySelector('.menu-nav-mobile #menu');
const advertPage = document.querySelector('.advert-page');
const body = document.querySelector('body');
menuBar.addEventListener('click', () => {
menuNavMobile.classList.toggle('show');
body.classList.toggle('show');
advertPage.classList.toggle('show');
menuBar.classList.toggle('show');
});
const mobileLinks = document.querySelectorAll('.mobile-link a');
Array.from(mobileLinks).forEach((link) => {
link.addEventListener('click', () => {
menuNavMobile.classList.remove('show');
body.classList.remove('show');
advertPage.classList.remove('show');
menuBar.classList.remove('show');
});
});