-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
89 lines (87 loc) · 3.64 KB
/
template.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<title>{{.Title}}</title>
</head>
<body class="bg-[#282828] text-xl">
<div class="container mx-auto p-4">
<h1 class="text-[#fbf1c7] text-2xl mb-4 font-bold">{{.Title}}</h1>
{{if .CurrentRepo}}
<p class="text-stone-400">{{.CurrentRepo}}</p>
{{end}}
<p class="text-stone-300 italic mb-4 mt-8">Generated at {{.Timestamp}}</p>
<table class="table-auto w-full text-left">
<thead>
<tr class="font-bold text-[#fbf1c7] bg-[#3c3836]">
{{range .Columns -}}
<th class="px-4 py-2">{{.}}</th>
{{end -}}
</tr>
</thead>
<tbody>
{{range .Rows -}}
<tr>
<td class="font-bold px-4 py-2 text-[#d3869b] truncate">{{.Key}}</td>
{{range .Data -}}
{{if .Error}}
<td class="px-4 py-2 font-mono">
<p class="font-bold inline text-[#fabd2f]">{{.Details.NumberFormatted}}</p>
<p class="inline text-[#fabd2f]">{{.Details.Indicator}}</p>
<p class="px-1 inline italic text-[#fabd2f]">{{.Details.Context}}</p>
</td>
{{else}}
<td class="px-4 py-2 font-mono">
{{if .URL}}
<a class="no-underline" href="{{.URL}}" target="_blank">
<p class="font-bold inline text-[{{.Color}}]">{{.Details.NumberFormatted}}</p>
<p class="inline text-[{{.Color}}]">{{.Details.Indicator}}</p>
<p class="px-1 inline italic text-[#7c6f64]">{{.Details.Context}}</p>
</a>
{{else}}
<p class="font-bold inline text-[{{.Color}}]">{{.Details.NumberFormatted}}</p>
<p class="inline text-[{{.Color}}]">{{.Details.Indicator}}</p>
<p class="px-1 inline italic text-[#7c6f64]">{{.Details.Context}}</p>
{{end}}
</td>
{{end}}
{{end -}}
</tr>
{{end -}}
</tbody>
</table>
{{if .Failures }}
<br>
<hr>
<br>
<p class="text-[#fb4934] font-bold">Non Successful Runs</p>
<br>
<table class="table-auto text-left">
{{range $key, $value := .Failures -}}
<tr>
<td class="text-[#a89984] px-2 py-1">{{$key}}</td>
<td class="text-[#a89984] px-2 py-1"><a class="underline" href="{{$value}}" target="_blank">{{$value}}</a></td>
</tr>
{{end -}}
</table>
{{end -}}
{{if .Errors }}
<br>
<hr>
<br>
<p class="text-[#fabd2f] font-bold">Errors</p>
<br>
<table class="table-auto text-left">
{{range $index, $error := .Errors -}}
<tr>
<td class="text-[#a89984] px-2 py-1">{{$index}}</td>
<td class="text-[#a89984] px-2 py-1">{{$error}}</td>
</tr>
{{end -}}
</table>
{{end -}}
</div>
</body>
</html>