-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
93 lines (76 loc) · 3.3 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<html>
<head>
<title>CMV on GitHub</title>
<link rel="stylesheet" href="./css/isotope.css" />
<link rel="stylesheet" href="./css/style.css" />
<link rel="stylesheet" href="https://download.dojotoolkit.org/release-1.13.0/dojo-release-1.13.0/dijit/themes/tundra/tundra.css" />
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.13.0/dojo/dojo.js"data-dojo-config="async: true"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="./js/jquery.isotope.min.js"></script>
<script type="text/javascript">
require(["dojo/dom", "dojo/request/xhr", "dojo/_base/array", "dojo/dom-construct", "dojo/dom-class", "dojo/on", "dijit/Tooltip", "dojo/domReady!"], function(dom, xhr, array, constr, dClass, on, Tooltip){
on(dom.byId("profile-circle"), "click", function(){
window.location.href = "https://cmv.io";
});
new Tooltip({
connectId: dom.byId("profile-circle"),
label: "Visit project page",
position: ["below", "after"]
});
xhr("https://api.github.com/users/cmv/repos?sort=full_name?type=all", {
handleAs: "json"
}).then(function(data){
//-- Sort through all github repos --//
array.forEach(data, function(repo){
if (!repo.fork) {
//-- If repo is not a fork, add it to the list --//
repoBox = constr.create("div", { id: repo.name }, dom.byId("results"));
dClass.add(repoBox, "repo ");
repoHeader = constr.create("div", { }, repoBox);
dClass.add(repoHeader, "repo-header " + repo.language);
repoTitle = constr.create("h2", { }, repoHeader);
dClass.add(repoTitle, "repo-title");
repoLink = constr.create("a", { href: repo.html_url, innerHTML: repo.name }, repoTitle);
repoLanguage = constr.create("h3", { innerHTML: repo.language }, repoHeader);
dClass.add(repoLanguage, "repo-language " + repo.language);
constr.create("p", { innerHTML: repo.description }, repoBox);
if (repo.homepage !== null && repo.homepage != "" /*&& !repo.homepage.match(/cmv.github.io\/$/)*/) {
projectPage = constr.create("a", { innerHTML: "visit project page", href: repo.homepage }, repoBox);
dClass.add(projectPage, "project-link");
}
statsBox = constr.create("p", {}, repoBox);
dClass.add(statsBox, "stats");
forkedBox = constr.create("span", { innerHTML: repo.forks_count }, statsBox);
dClass.add(forkedBox, "icon-fork");
starredBox = constr.create("span", { innerHTML: repo.watchers_count }, statsBox);
dClass.add(starredBox, "icon-star");
console.debug(repo);
}
});
//-- Activate jQuery Isotope --//
$('#results').isotope({
itemSelector : '.repo',
layoutMode : 'masonry'
});
});
});
</script>
</head>
<body>
<div class="header">
<div id="profile-circle" class="profile-border"><img class="profile-photo" src="https://avatars2.githubusercontent.com/u/8619062?v=2&s=200"></div>
<h1>Configurable Map Viewer</h1>
<h2>make it your own</h2>
</div>
<div id="results">
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-510540-7', 'cmv.github.io');
ga('send', 'pageview');
</script>
</body>
</html>