mirror of
https://github.com/number571/blockchain.git
synced 2026-09-12 19:50:00 +05:00
36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
{{define "title"}}
|
|
BlockChain
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="col-md-9 mx-auto">
|
|
<div class="jumbotron">
|
|
<div class="col-12 mx-auto">
|
|
<form method="POST" action="/blockchain">
|
|
<div class="form-group">
|
|
{{ if .Address }}
|
|
<input readonly class="form-control bg-light" type="text" name="coins" value="Address: {{ .Address }}">
|
|
<input disabled class="form-control bg-light" type="text" name="coins" value="Balance: {{ .Balance }} coins;">
|
|
{{ end }}
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" name="address" placeholder="Address">
|
|
</div>
|
|
<input type="submit" class="btn btn-success w-100" name="submit" value="Balance">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="jumbotron">
|
|
{{ if .Error }}
|
|
Error: {{ .Error }}
|
|
{{ else }}
|
|
{{ range $i, $e := .Size }}
|
|
<div class="card">
|
|
<a class="btn btn-info" href="/blockchain/{{$i}}">[Block {{ $i }}]</a>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{end}}
|