-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (81 loc) · 3.09 KB
/
index.html
File metadata and controls
94 lines (81 loc) · 3.09 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IT202</title>
<!-- Bootstrap CSS -->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://bluuarc.github.io/old/css/bacc.css" type="text/css" />
<link rel="stylesheet" href="css/it202.css" type="text/css" />
<style>
/*body {*/
/* background-color: #DDD;*/
/*}*/
</style>
</head>
<body>
<div class="container-fluid body-content" id="app">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="row">
<b class="col-md-6">IT202 Assignments</b><span class="col-md-6 text-right">Updated {{ updateTime }}</span>
</div>
</div>
<div class="panel-body no-padding">
<div class="list-group no-margin">
<project-item v-for="f in folders" :project="f" :key="f.name"></project-item>
</div>
</div>
</div>
</div>
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="https://unpkg.com/vue"></script>
<script type="text/javascript" src="https://bluuarc.github.io/old/js/bacc.js"></script>
<script type="text/javascript">
Vue.component('project-item', {
props: ['project'],
template: '<a :href="project.path" target="_blank" class="list-group-item">{{ project.name }}</a>'
})
var app = new Vue({
el: "#app",
data: {
folders: [],
updateTimeData: new Date("1/1/1990")
},
computed: {
updateTime: function(){
return new Date(this.updateTimeData).toDateString();
}
}
});
(function() {
onLoad('Projects', function(){
//get repo info
d3.json("https://api.github.com/repos/BluuArc/IT202", (err,data) => {
if(err) {
console.log(err);
return;
}
app.updateTimeData = data.pushed_at;
});
//get folder list
d3.json("https://api.github.com/repos/BluuArc/IT202/contents/", (err,data) => {
if(err) {
console.log(err);
return;
}
const blacklisted_folders = ['js', 'css'];
for(let d of data){
if(d.type !== "dir" || blacklisted_folders.indexOf((d.path)) > -1)
continue;
app.folders.push(d);
}
})
});
})();
</script>
</body>
</html>