alterNERDtive.github.io/index.html
Brandon Rosage 95e19861f5 init repo
2019-01-24 18:39:31 -06:00

34 lines
877 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Home</title>
</head>
<body>
{{ site.title }}
{% jsonball feed from url https://api.github.com/users/brandonrosage %}
{% for user in feed %}
<h1 style="color:red;">{{ user.name }}</h1>
{% endfor %}
<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>