-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (66 loc) · 2.64 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>eclion.github.io</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/css/materialize.min.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/js/materialize.min.js"></script>
</head>
<script>
function displayDropdown(){
return $('#menuList').html(
'<li><a id="githubPages" class="dropdown-button" href="#!" data-activates="dropdown1">' +
'Github Projects'+
'<i class="material-icons right">arrow_drop_down</i>'+
'</a></li>');
}
$(document).ready(function(){
$.get("./home.html").done(function(data){
$('#pageContent').html(data);
});
$.get("https://api.github.com/users/eclion/repos").done(function(data){
var dropdownContent = data
.filter(function(repo){return repo.has_pages;})
.filter(function(repo){return repo.url != "https://api.github.com/repos/Eclion/eclion.github.io";})
.map(function(repo){return '<li><a href="#'+repo.name+'">' + repo.name + '</a></li>';})
.join("");
$('#dropdown1').html(dropdownContent);
if(dropdownContent){
//displayDropdown() // doesn't display the dropdown...
}
});
});
</script>
<body>
<div class="navbar-fixed">
<ul id="dropdown1" class="dropdown-content"></ul>
<nav>
<div class="nav-wrapper">
<div class="col s12">
<a href="/" class="brand-logo"><!--<img src="/images/full-logo-no-neck.png" class="logo-img" alt="">-->
eclion.github.io
</a>
<a href="#" data-activates="mobile-demo" class="button-collapse">
<i class="material-icons">menu</i>
</a>
<ul id="menuList" class="right hide-on-med-and-down">
<li><a id="githubPages" class="dropdown-button" href="#!" data-activates="dropdown1">
Github Projects
<i class="material-icons right">arrow_drop_down</i>
</a></li>
</ul>
<!-- <ul class="side-nav" id="mobile-demo" style="transform: translateX(-100%);">
<li><a href="/github">Github projects</a></li>
</ul> -->
</div>
</div>
</nav>
</div>
<center>
<br/>
<div id="pageContent"></div>
</center>
</body>
</html>