-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.ejs
68 lines (65 loc) · 2.27 KB
/
template.ejs
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
<!doctype html>
<html lang="en">
<head>
<title>Zig Milestone Monitor</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Jiacai Liu">
<link rel="stylesheet" href="https://unpkg.com/normalize.css">
<link rel="stylesheet" href="https://unpkg.com/magick.css">
<link rel="stylesheet" href="app.css">
<script>
const historiesById = <%- historiesByIdStr %>;
const repoHistories = <%- repoHistoriesStr %>;
window.onload = function() {
const charts = [
renderRepoChart(repoHistories, "repo-chart"),
<% for(const id of idsToShow) { %>
renderMilestoneChart(historiesById, <%= id %>),
<% } %>
];
window.addEventListener('resize', (event) => {
charts.forEach((chart) => {
chart.resize(event);
});
});
}
</script>
</head>
<body>
<main>
<h1><a href="https://github.com/ziglang/zig/milestones">Zig Milestone</a> Monitor</h1>
<h3><a href="https://github.com/ziglang/zig">Zig repository</a></h3>
<div class="chart" id="repo-chart"></div>
<% for(const id of idsToShow) { %>
<section>
<h3><a href="https://github.com/ziglang/zig/milestone/<%= id %>"><%= idToTitle[id] %></a></h3>
<div class="chart" id="chart-<%= id %>"></div>
<table>
<caption>Latest 10 histories</caption>
<tr>
<th>Date</th>
<th>Open issues</th>
<th>Closed issues</th>
</tr>
<% for(const row of historiesById[id].slice(0, 10)) { %>
<tr>
<td><%= new Date(row[0]).toLocaleString('en-GB') %></td>
<td><%= row[1] %></td>
<td><%= row[2] %></td>
</tr>
<% } %>
</table>
</section>
<% } %>
<footer> © 2024 <a href="https://ziglang.cc">ZigCC</a>
| <a href="https://github.com/zigcc/zig-milestone">GitHub</a>
| <a href="mailto:hello@ziglang.cc">Feedback</a>
<br/>
Last Update: <%= now %>(UTC)
</footer>
</main>
<script src="https://fastly.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"></script>
<script src="app.js"></script>
</body>
</html>