-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (94 loc) · 4.71 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bioschemas Registry & Validator</title>
<link rel="icon" type="icon/png" href="img/favicon.png">
<!-- d3.js framework -->
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- Google Font -->
<link href='https://fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="stylesheet.css" media="screen" title="no title" charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div style="display: inline-block; padding: 1em 0;">
<a href="index.html"><img class="rotation" src="img/square_logo2.png" alt="Bioschemas" style="width: 10%; height: 10%;"></a>
<a href="index.html"><img src="img/logo_3.png" alt="Bioschemas" style="width: 40%; height: 40%;"></a>
</div>
<div class="navbar">
<div class="navbar_links">
<a href="index.html" class="page-link">
<div class="nav_buttons" id="nav_active">Home</div>
</a>
<a href="websites_registry/index.html" class="page-link">
<div class="nav_buttons">Registry</div>
</a>
<a href="tester.html" class="page-link">
<div class="nav_buttons">Test Website</div>
</a>
<a href="validate.html" class="page-link">
<div class="nav_buttons">Submit Website</div>
</a>
</div>
</div>
<h1>Bioschemas Registry & Validator</h1>
<h3>This webtool allows to test any website for their compliance with Bioschemas specifications, and then submit them to our registry of Bioschemas-compliant websites.</h3>
<div id="report_div">
<p>The registry currently contains <strong><span id="tot_props"></span></strong> properties, coming from <strong><span id="tot_websites"></span></strong> websites and belonging to <strong><span id="tot_types"></span></strong> different Bioschemas types.</p>
<p>Last registry update: <span id="last_update"></span>.</p>
</div>
<div>
You can either browse the
<button type="button" class="buttons" name="web_btn" onclick="window.location.href='websites_registry/index.html'">Registry</button>
or test a website for its Bioschemas compliance with the
<button type="button" class="buttons" name="test_btn" onclick="window.location.href='tester.html'">Tester</button>
tool, or submit a website to the registry with the
<button type="button" class="buttons" name="val_btn" onclick="window.location.href='validate.html'">Validator</button>
tool.
</div>
<!--<footer class="footerBar">
<a href="http://bioschemas.org" title="Bioschemas Website"><img class="img_bottom rotation" src="img/square_logo2.png" alt="Bioschemas"></a>
<a href="mailto:[email protected]">[email protected]</a>
</footer>-->
<!-- jQuery -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script type="text/javascript">
window.onload = function () {
var tot_props = document.getElementById("tot_props");
var tot_web = document.getElementById("tot_websites");
var tot_type = document.getElementById("tot_types");
var last_up = document.getElementById("last_update");
var typeSet = new Set();
var propSet = new Set();
d3.json("registry.json", function (data) {
var siti = Object.keys(data);
tot_web.innerHTML = siti.length;
for (var i in siti) {
var primaCella = siti[i];
var typeDict = data[primaCella][0];
var tipi = Object.keys(typeDict);
for (var j in tipi) {
var secondaCella = tipi[j];
typeSet.add(secondaCella);
var toPush = data[primaCella][0][secondaCella];
for (var k in toPush) {
propSet.add(toPush[k]);
}
}
}
tot_type.innerHTML = Array.from(typeSet).length;
tot_props.innerHTML = Array.from(propSet).length;
});
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
if (dd < 10) { dd = '0'+dd; }
if (mm < 10) { mm = '0'+mm; }
today = mm + '/' + dd + '/' + yyyy;
last_up.innerHTML = today;
};
</script>
</body>
</html>