forked from github/personal-website
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
40 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
38
39
40
---
---
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ site.github.project_title }}</title>
<link href="/assets/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
{% assign user = site.github.organization_members[0] %}
<div class="container-lg p-responsive">
<h1>{{ site.github.project_title }}</h1>
<p>{{ user.login }}</p>
<img src="{{ user.avatar_url }}">
</div>
<!--//header></header>
<script>
var body = document.querySelector('body');
var requestURL = 'https://api.github.com/users/brandonrosage';
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function() {
populateBody(request.response);
}
function populateBody(jsonObj) {
var myH1 = document.createElement('h1');
myH1.textContent = jsonObj['name'];
body.appendChild(myH1);
}
</script //-->
</body>
</html>