forked from WebCon-2023/WebCon-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
28 lines (27 loc) · 1.21 KB
/
index.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
<!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>WebCon Portfolios</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yegor256/tacit@gh-pages/tacit-css-1.5.5.min.css"/>
<script defer>
fetch("https://api.github.com/repos/WebCon-2023/WebCon-2023/contents/Introduction%20to%20web%20and%20Github/Task%20%231")
.then(res=>(res.json()))
.then((data)=>{
data.forEach(element => {
console.log(element);
if(element.name.split(".").pop() ){
console.log(element.name)
document.querySelector("#holder").innerHTML+=`<a style="font-size:3rem;margin:1.5rem auto;" href="https://webcon-2023.github.io/WebCon-2023/Introduction%20to%20web%20and%20Github/Task%20%231/${element.name.split('.').slice(0, -1).join('.')}"><strong>${element.name.split('.').slice(0, -1).join('.')}</strong></a>`
}
});
})
</script>
</head>
<body>
<main style="display:flex;flex-direction: column;" id="holder">
</main>
</body>
</html>