blockbook/static/templates/blocks.html
2023-02-01 17:58:37 +01:00

32 lines
1.1 KiB
HTML

{{define "specific"}}{{$blocks := .Blocks}}{{$data := .}}
<div class="row">
<div class="col-md-6"><h1>Blocks</h1></div>
<div class="col-md-6">{{if $blocks.Blocks}}{{template "paging" $data }}{{end}}</div>
</row>
{{if $blocks.Blocks -}}
<div>
<table class="table table-hover data-table">
<thead>
<tr>
<th>Height</th>
<th class="col-md-6">Hash</th>
<th class="col-md-2">Timestamp</span></th>
<th class="text-end">Transactions</th>
<th class="text-end">Size</th>
</tr>
</thead>
<tbody>
{{- range $b := $blocks.Blocks -}}
<tr>
<td><a href="/block/{{$b.Height}}">{{formatUint32 $b.Height}}</a></td>
<td class="ellipsis">{{$b.Hash}}</td>
<td>{{formatUnixTime $b.Time}}</td>
<td class="text-end">{{formatUint32 $b.Txs}}</td>
<td class="text-end">{{formatUint32 $b.Size}}</td>
</tr>
{{- end -}}
</tbody>
</table>
</div>
{{template "paging" $data }}
{{end}}{{end}}