-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
234 lines (165 loc) · 5.98 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<html>
<head>
<title>{{cco: dc:title ?o}}</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="http://xmlns.com/xmlns-style.css" rel="stylesheet" type="text/css" />
<link href="http://smiy.sourceforge.net/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="http://bioversity.github.io/cco/turtle.js"></script>
<script type="text/javascript" src="http://bioversity.github.io/cco/mustache-rdf.js"></script>
<script>
$(function(){
var url = 'https://api.github.com/repos/bioversity/cco/contents/cco.ttl?callback=?';
$.getJSON(url, function(data) {
// atob() breaks with newlines, so remove them
var ttl = atob(data.data.content.replace(/\s/g, ''));
//var ttl = data;
var turtle = new ParseTurtle();
// do parsing and get namespaces
var rdf = turtle.parse(ttl);
var ns = turtle.ns;
// now, with these two piece of info.
// use jquery to find {{..}} elements
// and modify them directly
new MustacheRDF(rdf, ns);
run();
})
});
function run() {
$('img[src=undefined]').remove();
$('script').remove();
$('.specterm').each(function() {
$this = $(this);
var id = $this.attr('id');
var ids = id.split('#');
$this.attr('id', ids[1]);
});
$('title').text($('span.title').text());
setTimeout(function(){
if(window.location.hash) {
var tmp = window.location.hash;
window.location.hash = '#foo';
window.location.hash = tmp;
}
}, 1000);
}
</script>
</head>
<body>
<h1><span class="title">{{cco: dc:title ?o}} <i>[DRAFT]</i></span></h1>
<h2>{{cco: dc:hasVersion ?o}}</h2>
<table width="100%" border="0">
<tbody><tr>
<td>
<dl>
<dt>Latest version:</dt>
<dd><a href="{{cco: foaf:page ?o}}">{{cco: foaf:page ?o}}</a> (<a href="{{cco: foaf:page ?o}}.ttl">RDF Turtle</a>)</dd>
<dt>Editors:</dt>
<dd>
{{#cco: foaf:authors ?author}}
<a href="{{?author foaf:homepage ?homepage}}">{{?author foaf:name ?name}}</a><br>
{{/}}
</dd>
<dt>Contributors:</dt>
<dd>
{{#cco: dc:contributor ?cont}}
{{.}},
{{/}}
</dd>
</dl>
<p class="copyright">Copyright © 2013</p>
</td>
<td>
<table style="border:2px dashed #FFCC00; font-size:small; padding:10px;" width="400" border="0" align="center">
<center>
<a href="{{cco: rdfs:seeAlso ?o}}"><img width="300" src="http://www.agrobiodiversity.org/files/cco-logo.png" /></a>
</center>
<tbody><tr>
<td rowspan="2">
<img src="https://github.global.ssl.fastly.net/images/modules/logos_page/GitHub-Logo.png" width="120" alt="Github">
</td>
<td align="center"><b>{{cco: dc:title ?o}} Github project</b></td>
</tr>
<tr><td align="center">
<a href="https://github.com/bioversity/cco">Source code, Tools</a></td>
</tr>
<tr>
<td rowspan="2">
<img src="http://groups.google.com/groups/img/groups_medium.gif" height="58" width="150" alt="Google Groups">
</td>
<td align="center"><b>Discussion Group</b></td>
</tr>
<tr><td align="center"><a href="http://groups.google.com/group/#">Browse Archives</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div about="" resource="http://www.w3.org/TR/rdfa-syntax" rel="dct:conformsTo" />
<p about=""><a href="http://validator.w3.org/check?uri=referer"><img style="border: 0; float: right; padding: 5px;"
src="http://www.w3.org/Icons/valid-xhtml-rdfa-blue" alt="Valid XHTML + RDFa" /></a>
<!-- Creative Commons License -->
<a href="http://creativecommons.org/licenses/by/1.0/"></a> This work is licensed under a <a rel="license" href=
"http://creativecommons.org/licenses/by/1.0/">Creative Commons Attribution License</a>. This copyright applies to the <em>{{cco: dc:title ?o}}</em> and accompanying documentation in RDF. Regarding underlying technology, {{cco: dc:title ?o}} uses W3C's <a href="http://www.w3.org/RDF/">RDF</a> technology, an open Web standard that can be freely used by anyone.</p>
<hr />
<h2>Abstract</h2>
<p>{{cco: dc:description ?o}}</p>
<hr />
<h2>{{cco: dc:title ?o}} At A Glance</h2>
<p>An alphabetical index of the terms, by class (categories or types), by
property and by individuals. All the terms are hyperlinked to their detailed description for quick reference.</p>
<div class="glance" id="glance">
<p>Classes:
{{#?s a rdfs:Class}}
| <a href="{{.}}">{{?s rdfs:label ?label}}</a>
{{/}}
</p>
<p>Properties:
{{#?s a rdf:Property}}
| <a href="{{.}}">{{?s rdfs:label ?label}}</a>
{{/}}
</p>
</div>
<hr />
<h2>{{cco: dc:title ?o}}: Classes and Properties</h2>
<br>
{{#?s a rdfs:Class}}
<div class="specterm" id="{{.}}"><h3>Class: {{?s rdfs:label ?label}}</h3>
<b>Label:</b> {{?s rdfs:label ?label}}
<br><br>
<img src="{{?s foaf:depiction ?depiction}}" />
<br>
<br>
<b>Page:</b> <a href="{{?s foaf:page ?page}}">{{?s foaf:page ?page}}</a>
<br>
<b>ISBN:</b> {{?s book:isbn ?isbn}}
</div>
{{/}}
{{#?s a rdf:Property}}
<div class="specterm" id="{{.}}"><h3>Property: {{?s rdfs:label ?label}}</h3>
{{?s rdfs:comment ?comment}}
<br>
<br>
<img src="{{?s foaf:depiction ?depiction}}" />
<br><br>
<table style="th { float: top; }">
<tbody>
<tr>
<th>ID:</th>
<td><a href="{{.}}">{{.}}</a></td>
</tr>
<tr>
<th>Domain:</th>
<td><a href="{{?s rdfs:domain ?domain}}">{{?s rdfs:domain ?domain}}</a></td>
</tr>
<tr>
<th>Range:</th>
<td><a href="http://www.w3.org/2001/XMLSchema#string">xsd:string</a></td>
</tr>
</tbody></table>
</div>
{{/}}
<h2>Acknowledgments</h2>
<p>{{cco: dc:acknowledgments ?o}}</p>
</body>
</html>