-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
index.html
37 lines (34 loc) · 1005 Bytes
/
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
<!doctype html>
<html>
<head>
<title>AMD</title>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"/>
</head>
<body class="container">
<h1>AMD</h1>
<div>
<h3>User</h3>
<div class="row">
<img id="useravatar" src="" class="col-md-1"/>
<div class="col-md-3">
<strong id="username"></strong>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js"></script>
<script>
requirejs.config({
paths: {
axios: '/axios.min'
}
});
requirejs(['axios'], function (axios) {
axios.get('https://api.github.com/users/mzabriskie')
.then(function (user) {
document.getElementById('useravatar').src = user.data.avatar_url;
document.getElementById('username').innerHTML = user.data.name;
});
});
</script>
</body>
</html>