forked from muan/hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (43 loc) · 1.11 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
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<head>
<title>Hello, world.</title>
<style>
body {
font-family: courier, monospace;
padding: 10%;
text-align: center;
font-size: 13px;
line-height: 1.65em;
}
img {
margin: 20px 10px 0;
}
</style>
</head>
<body>
<p>Hello, world.</p>
<p>
<a href="human.txt">Check out human.txt</a><br>
<a href="https://github.com/muan/hello-world">Contribute</a>
</p>
<script type="text/javascript">
fetch('./human.txt').then(function (data) {
return data.text()
}).then(function (data) {
const logins = data.split('\n')
logins.forEach(function (login) {
if(!login) return
const a = document.createElement('a')
a.href = 'https://github.com/' + login
const image = new Image(50, 50)
image.src = 'https://github.com/' + login + '.png?size=100'
a.appendChild(image)
document.body.appendChild(a)
image.onerror = function () {
a.remove()
}
})
})
</script>
</body>
</html>