forked from NLNOG/nlnogbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (68 loc) · 3.16 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
<html>
<head>
<title>NLNOGbook</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/flag-icon.min.css">
</head>
<body>
<div class="container">
<h1 class="page-header">NLNOGbook</h1>
<p>This page was created to keep track of the members in the <a href="https://nlnog.net/" target="_blank">NLNOG</a> community.</p>
<p>You can add yourself to the list by creating a Pull Request on <a href="https://github.com/casdr/nlnogbook" target="_blank">GitHub</a></p>
<table class="table table-sm table-striped">
<thead>
<tr>
<th>Nick</th>
<th>Full name</th>
<th>Company</th>
<th>Country</th>
</tr>
</thead>
<tbody id="list"></tbody>
</table>
<hr />
<p>Created by <a href="http://reuver.co/~cas">Cas de Reuver</a>. This page is not affiliated with Stichting NLNOG.</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js-yaml.min.js"></script>
<script>
var defaults = {full_name: '', companies: [], country: ''};
$(document).ready(function () {
$.get('data/companies.yml?' + (new Date()).getTime(), function (companies_yml) {
var companies = jsyaml.load(companies_yml);
$.get('data/users.yml?' + (new Date()).getTime(), function (users_yml) {
var users = jsyaml.load(users_yml);
for (var name in users) {
var newUser = $('<tr />');
var user = users[name];
for (var key in defaults) {
if (!user.hasOwnProperty(key)) {
user[key] = defaults[key];
}
}
newUser.append('<td>' + name + '</td>');
newUser.append('<td>' + user.full_name + '</td>');
var companyStr = $('<td />');
for (var comp in user.companies) {
var company = companies[user.companies[comp]];
if(company) {
companyStr.append(company.name + ' (<a href="https://apps.db.ripe.net/db-web-ui/lookup?source=ripe&key=AS' + company.asn + '&type=aut-num" target="_blank">AS' + company.asn + '</a>)<br />');
} else {
companyStr.append(user.companies[comp] + '<br />');
}
}
newUser.append(companyStr);
var flag = $('<td />');
if (user.country) {
flag.append('<span class="flag-icon flag-icon-' + user.country + '" title="' + user.country + '"></span>');
}
newUser.append(flag);
$('#list').append(newUser);
}
});
})
});
</script>
</body>
</html>