-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvalidation.html
100 lines (99 loc) · 3.22 KB
/
validation.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
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<title>{{.FileName}} - SPDX Validation</title>
<style>
pre {margin:0; padding:0; }
body {font-family: "Lucida Console", Monaco, monospace; margin:0; }
table { width: 100% }
td { vertical-align: top; }
.content, .lineNumber {
padding: 5px;
height: 15px;
font-size: 12px;
white-space: nowrap;
}
.lineNumber { text-align: right; }
.content:hover {
background-color: #eee;
}
.col-numbers { background-color: #efefef; border-right: 1px solid #ddd; width:1%; white-space:nowrap; }
.notif {
position: relative;
width: 5px;
margin: 0px 1px 0px 1px;
height: 12px;
display: inline-block;
}
.err1 { background: #933; }
.err1 p { background: #fee; }
.err0 { background: #993; }
.err0 p { background: #ffe; }
.notif p, .errlink p {
position: absolute;
top: 15px;
left: -5px;
display: none;
padding: 5px;
border: 1px solid #333;
}
.notif:hover p, .errlink:hover p { display: inline-block; }
.number { display: inline-block; }
.invalid { font-weight: bold; color: #933; background: #fee; }
header { background-color: #dfdfdf; padding: 10px; }
#errLineSummary{ padding: 5px 10px; background:#efefef; font-size:10px; border-bottom: 1px solid #ddd; }
#noMetaErrors{ padding: 5px 10px; font-size: 12px; border-bottom: #afafaf; }
.errlink { position: relative; }
.errlink p { white-space: nowrap; background: #fff; font-size:12px; z-index: 5; }
.lb { display: block; margin: 3px 0px;}
.lct { display: block; border-bottom: 1px solid #ccc; font-weight: bold; color: #333;}
.lberr1 { color: #933; }
.lberr0 { color: #993; }
</style>
</head>
<body>
<header>
This document has {{.NoOfErrors}} errors and {{.NoOfWarnings}} warnings.
<span style="float:right">{{.FileName}}</span>
</header>
<div id='errLineSummary'>
{{range .Lines}}{{if .Errors}}
<a href="#L{{.Number}}" class="errlink">#{{.Number}}<p>
<span class="lct">{{.Content}}</span>
{{range .Errors}}
<span class="lb lberr{{.Type}}">{{.}}</span>
{{end}}
</p></a>
{{end}}{{end}}
</div>
{{if .OtherErrors}}
<div id="noMetaErrors">
{{range .OtherErrors}}
<div class="noMetaError">{{.}}</div>
{{end}}
</div>
{{end}}
<table cellpadding="0" cellspacing="0">
<tr>
<td class="col-numbers">
{{range .Lines}}
<div class="lineNumber" id="L{{.Number}}">
<!-- Small red/yellow notifications -->
{{range .Errors}}<div class="notif err{{.Type}}"><p>{{.}}</p></div>{{end}}
<div class="number">{{.Number}}</div>
</div>
{{end}}
</td>
<td class="col-content">
{{with .Lines}}
{{range .}}
<div id="LC{{.Number}}" class="content {{.Classname}}">
<pre>{{.Content}}</pre>
</div>
{{end}}
{{end}}
</td>
</tr>
</table>
</body>
</html>