-
Notifications
You must be signed in to change notification settings - Fork 128
/
explorer.tmpl
75 lines (71 loc) · 3.08 KB
/
explorer.tmpl
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
{{define "explorer"}}
<!DOCTYPE html>
<html lang="en">
{{template "html-head" "Decred Blocks"}}
<body class="{{ theme }}">
{{template "navbar" . }}
<div class="container main" data-controller="main">
<h4><span>Blocks</span></h4>
<div class="row fs13">
<div class="col d-flex justify-content-between">
{{ if ge (index .Data 0).Height .Rows }}
<a
id="prev"
class="no-underline"
href="/blocks?height={{ subtract (index .Data 0).Height (int64 (len .Data)) }}&rows={{.Rows}}"
data-keynav-priority
>◄ Older</a>
{{end}}
{{ if lt (index .Data 0).Height .BestBlock }}
<a
id="next"
class="no-underline"
href="/blocks?height={{ add (index .Data 0).Height (int64 (len .Data)) }}&rows={{.Rows}}"
data-preserve-keynav-index="true"
>Newer ►</a>
{{end}}
</div>
</div>
<div class="row">
<div class="col-md-12">
<table class="table striped table-responsive" id="explorertable">
<thead>
<tr>
<th>Height</th>
<th>
<span class="d-none d-md-inline">Transactions</span>
<span class="d-md-none">Txn</span>
</th>
<th>Vote<span class="d-none d-md-inline">s</span></th>
<th>Ticket<span class="d-none d-md-inline">s</span></th>
<th>
<span class="d-none d-md-inline">Revocations</span>
<span class="d-md-none">Revoke</span>
</th>
<th>Size</th>
<th>Age</th>
<th>Time ({{timezone}})</th>
</tr>
</thead>
<tbody>
{{range .Data}}
<tr id="{{ .Height }}">
<td><a href="/block/{{.Height}}" class="fs16 height">{{if not .Valid}}<span class="attention">⚠</span>{{end}}{{ .Height }}</a></td>
<td {{if not .Valid}}class="grayed" title="Regular transactions invalidated by stakeholders."{{end}}>{{.Transactions}}</td>
<td>{{.Voters}}</td>
<td>{{.FreshStake}}</td>
<td>{{.Revocations}}</td>
<td>{{.FormattedBytes}}</td>
<td data-target="main.age" data-age="{{.BlockTime}}"></td>
<td>{{.FormattedTime}}</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
</div>
{{ template "footer" . }}
</body>
</html>
{{ end }}