-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
69 lines (58 loc) · 2.62 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GLoBS : Github LOcal Backup Server</title>
<link rel="stylesheet"
href="/node_modules/material-components-web/dist/material-components-web.css" />
<link rel="stylesheet"
href="/index.css" />
</head>
<body class="mdc-typography">
<section>
<h2 class="mdc-typography--display1">Github organizations backuped</h2>
<ul class="mdc-list mdc-list--two-line">
<script id="index-item-template" type="text/x-custom-template">
<li class="mdc-list-item">
<span class="mdc-list-item__text">
<a class="globs-item-click" href="___/">___</a>
<span class="globs-item-nbchild mdc-list-item__secondary-text">___ dépôts</span>
<span class="globs-item-url mdc-list-item__secondary-text">https://github.com/___/</span>
</span>
<span class="globs-item-size mdc-list-item__meta">Taille : ___</span>
</li>
</script>
</ul>
</section>
<footer>
<hr />
<p>
<a href="https://github.com/Inist-CNRS/ezmaster-globs">GLoBS : Github LOcal Backup Server</a> version 2.0.0
</p>
</footer>
<script src="/node_modules/material-components-web/dist/material-components-web.js"></script>
<script>mdc.autoInit()</script>
<script src="/node_modules/jquery/dist/jquery.min.js"></script>
<script>
var templateHtml = $('#index-item-template').html();
$.get('/GITHUB_ORGANIZATIONS.txt', function (data) {
var GITHUB_ORGANIZATIONS = data.trim().split('\n');
GITHUB_ORGANIZATIONS.forEach(function (GITHUB_ORGANIZATION) {
var templateDom = $(templateHtml);
templateDom.find('.globs-item-click').text(GITHUB_ORGANIZATION);
templateDom.find('.globs-item-click').attr('href', GITHUB_ORGANIZATION + '/');
templateDom.find('.globs-item-url').text('https://github.com/' + GITHUB_ORGANIZATION + '/');
$.get('/' + GITHUB_ORGANIZATION + '/GITHUB_ORGANIZATION_SIZE.txt').done(function (data) {
templateDom.find('.globs-item-size').text('Taille : ' + data.trim());
}).always(function () {
$.get('/' + GITHUB_ORGANIZATION + '/GITHUB_ORGANIZATION_CONTENT.txt').done(function (data) {
templateDom.find('.globs-item-nbchild').text(data.trim().split('\n').length + ' dépôts');
}).always(function () {
$('section ul').append(templateDom);
});
});
});
});
</script>
</body>
</html>