-
Notifications
You must be signed in to change notification settings - Fork 1
/
corporateJ.html
46 lines (42 loc) · 1.12 KB
/
corporateJ.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JOB SECTION</title>
<style>
#Job-Wrapper{
display: grid;
grid-template-columns: repeat(2, 1fr);
gap:10px;
}
.cup{
border:1px solid black;
width:80%;
margin:auto;
padding:40px;
}
</style>
</head>
<body>
<div id="Job-Wrapper"></div>
</body>
<script>
let JobWrapper = document.getElementById("Job-Wrapper");
fetch("https://6398026577359127a044d598.mockapi.io/data")
.then((resul)=>{resul.json().then((a)=>{
console.log(a);
let b = a;
b = b.map(element => {
return `<div class="cup">
<h2>${element.Job_Title}</h2>
<p>${element.Job_Type}</p>
<p>${element.Location}</p>
<p>$ ${element.Salary}</p>
</div>`
});
JobWrapper.innerHTML = (b.join(" "))
})})
</script>
</html>