-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathindex.html
executable file
·50 lines (37 loc) · 1.46 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
---
layout: page
title: The API Stack
---
<div align="center" id="summary-count" style="font-size: 18px; font-weight: bold; padding-top: 25px; padding-bottom: 25px;"></div>
<div id="stack-cloud" class="wordcloud"></div>
<script type="text/javascript">
$(document).ready(function(){
$.getJSON('data/companies.json', function(companies) {
$.getJSON('data/tags.json', function(data) {
tagcount = data['tags'].length;
companycount = companies['company'].length;
document.getElementById("summary-count").innerHTML = companycount + ' companies in ' + tagcount + ' categories';
$.each(data['tags'], function(key, val) {
tag = val['tag'];
name = val['name'];
slug = val['slug'];
companycount = val['company-count'];
html = '<span data-weight="' + companycount + '"><a href="stack.html?tag=' + slug + '">' + name + '</a></span>';
$('#stack-cloud').append(html);
});
$("#stack-cloud").awesomeCloud({
"size" : {
"grid" : 8,
"factor" : 3
},
"options" : {
"color" : "random-dark",
"rotationRatio" : 0
},
"font" : "'Times New Roman', Times, serif",
"shape" : "circle"
});
});
});
});
</script>