-
Notifications
You must be signed in to change notification settings - Fork 0
/
modal.js
132 lines (128 loc) · 5.83 KB
/
modal.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
const myModal = document.getElementById('myModal');
const seeProject = document.querySelectorAll('.see-details');
const Projects = [
{
id: 1,
name: 'Tonic',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essent',
image: 'Images/Snapshoot Portfolio__1.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
{
id: 2,
name: 'Multi-Post Stories',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essene',
image: 'Images/Snapshoot__Portfolio.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
{
name: 'Multi-Post Stories',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essent',
image: 'Images/Snapshoot Portfolio__1.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
{
name: 'Multi-Post Stories',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essent',
image: 'Images/Snapshoot Portfolio__.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
{
name: 'Uber Navigation',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it 1960s with the releaLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it 1960s with the release',
image: 'Images/Snapshoot Portfolio.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
{
name: 'Uber Navigation',
description:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it 1960s with the releaLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it 1960s with the release',
image: 'Images/Snapshoot Portfolio.png',
technologies: [
'html',
'css',
'JavaScript',
'github',
'ruby',
'Bootstrap',
],
Live: 'https://github.com/belaymit/Portfolio-microverse',
Source: 'https://github.com/belaymit/Portfolio-microverse',
},
];
// eslint-disable-next-line no-console
seeProject.forEach((el) => el.addEventListener('click', (e) => {
const i = e.target.classList[0];
document.querySelector('.project-image').src = Projects[i].image;
document.querySelector('.modal-project-title').innerText = Projects[i].name;
document.querySelector('.modal-project-description').innerHTML = Projects[i].description;
document.querySelector('.button-container')
.innerHTML = ` <button onclick="${Projects[i].Live}" type="button" class="btn">see live <span><i class="fa-solid fa-arrow-up-right-from-square"></i></span></button>
<button onclick="${Projects[i].Source}" type="button" class="btn">see source <span> <i class="fa-brands fa-github"></i></button>`;
document.querySelector('.languages-used')
.innerHTML = `<li>
${Projects[i].technologies[0]}</li>
<li>${Projects[i].technologies[1]}</li>
<li> ${Projects[i].technologies[2]}</li>
<li>${Projects[i].technologies[3]}</li>
<li>${Projects[i].technologies[4]}</li>
<li>${Projects[i].technologies[5]}</li>`;
}));
// eslint-disable-next-line no-unused-vars
function openPopUp() {
myModal.classList.add('open-popup');
}
// eslint-disable-next-line no-unused-vars
function closePopUp() {
myModal.classList.remove('open-popup');
}