-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (35 loc) · 1.01 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
29
30
31
32
33
34
35
36
37
<html>
<head>
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
line-height: 1.5;
margin-left: auto;
margin-right: auto;
max-width: 500px;
}
a {
text-decoration: none;
font-size: large;
color: hsl(199deg 100% 28%);
}
</style>
</head>
<body>
<h1>file list</h1>
<script>
(async () => {
const response = await fetch('https://api.github.com/repos/goethe-tcs/algo121-exercises/contents/?ref=gh-pages');
const data = await response.json();
let htmlString = '<ul>';
for (let file of data) {
if (file.path.endsWith('.pdf')) {
htmlString += `<li><a href="${file.path}">${file.path}</a></li>`;
}
}
htmlString += '</ul>';
document.getElementsByTagName('body')[0].innerHTML += htmlString;
})()
</script>
<body>
</html>