-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathhtml-bootstrap.ejs
76 lines (70 loc) · 3 KB
/
html-bootstrap.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
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<title>Release Notes</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/dt-1.10.13/datatables.min.css"/>
</head>
<body>
<div class="container" role="main">
<div class="row">
<h1>Release Notes</h1>
</div>
<div class="row">
<div class="header title">
<h2>Commits</h2>
</div>
<table id="commitTable" class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Date</th>
<th>Author</th>
<th>Commit</th>
</tr>
</thead>
<tbody>
<%
commits.forEach(function (commit) {
var commitDate = new Date(Date.parse(commit.committerDate))
var formattedDate = dateFnsFormat(commitDate, [format='DD-MMM-YYYY HH:mm'])
var sortableDate = dateFnsFormat(commitDate, [format='YYYY-MM-DDTHH:mm:ss'])
messageLines = commit.messageLines.join("\n")
%>
<tr>
<td nowrap="nowrap"><span style="display:none"><%= sortableDate %> </span><%= formattedDate %></td>
<td><%= commit.authorName %></td>
<td>
<%= commit.title %>
<%
if (messageLines.length > 0)
{
%>
<pre><%= messageLines %></pre>
<%
}
%>
</td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</div>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs-3.3.7/jqc-1.12.4/dt-1.10.13/datatables.min.js"></script>
<script>
$(document).ready(function() {
$('#commitTable').DataTable({
'iDisplayLength':25,
"order": [[ 0, "desc" ]]
});
} );
</script>
</body>
</html>