-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.html
executable file
·70 lines (57 loc) · 2.15 KB
/
code.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
---
layout: default
title: Code
overview: true
---
<ul class="toolbar">
<li>{"<a href="json/code.json" title="JSON" target="_blank">JSON</a>"}</li>
</ul>
<h2>Code</h2>
<p>Here are some code samples available for use against APIs and datasets, currently these are just samples to act as placeholders and show what is possible.</p>
<p align="center"><span style="color:#FF0000; font-size:14px; font-weight: bold:"><strong><i>This page is still having issues displaying and mixing gists</i></strong></span></p>
<!-- Begin List Code Samples--->
{% raw %}
<script id="codeListingTemplate" type="text/template">
<tr>
<td width="25%" valign="top">
<strong>{{Name}}</strong> ({{Language}}) - {{Description}}
</td>
<td width="75%" id="code-{{Code_ID}}">
</td>
</tr>
</script>
{% endraw %}
<div style="">
<table id="codeListing" border="0" width="100%" align="left"></table>
</div>
<script type="text/javascript">
function listCode()
{
$.getJSON('json/code.json', function(data) {
toggle = 0;
$.each(data['Code'], function(key, val) {
var template = $('#codeListingTemplate').html();
var html = Mustache.to_html(template, val);
$('#codeListing').append(html);
});
});
}
listCode();
function addGists()
{
$.getJSON('json/code.json', function(data) {
toggle = 0;
$.each(data['Code'], function(key, val) {
id = val['Code_ID'];
// alert(id);
gist = val['Gist'];
html = "<script type='text/javascript' src='" + gist + "'></" + "script>";
var container = document.getElementById('code-' + id);
var injector = new Injector({container: container});
injector.insert(html);
});
});
}
addGists();
</script>
<!-- End List Code Simples--->