NAC_Blockchain/nac-quantum-browser/view/index/blocks.html

85 lines
3.8 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{include file="index/layout_header" title="区块列表"}
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="mb-0 fw-bold">区块列表</h5>
<span class="text-secondary small">共 {$total|default=0} 个区块</span>
</div>
<div class="card bg-dark border-secondary">
<div class="table-responsive">
<table class="table table-dark table-hover mb-0">
<thead>
<tr class="text-secondary small">
<th class="ps-3">区块号</th>
<th>区块哈希SHA3-384</th>
<th>类型</th>
<th>出块时间</th>
<th>交易数</th>
<th>确认数</th>
<th>出块节点</th>
<th>大小</th>
<th>CBPP 轮次</th>
</tr>
</thead>
<tbody>
{volist name="blocks" id="block"}
<tr style="{if condition='$block.isHeartbeat'}background:rgba(255,193,7,0.05);{/if}">
<td class="ps-3">
<a href="/block?n={$block.number}" class="{if condition='$block.isHeartbeat'}text-warning{else}text-primary{/if} fw-bold">#{$block.number}</a>
</td>
<td>
<a href="/block?n={$block.number}" class="text-info font-monospace small">{$block.shortHash}</a>
</td>
<td>
<span class="badge bg-{$block.blockTypeBadge}" title="{$block.blockTypeNote}">{$block.blockTypeLabel}</span>
</td>
<td class="text-secondary small">
{$block.formatTime}
<br><span class="text-muted" style="font-size:0.75em">{$block.timeAgo}</span>
</td>
<td>
{if condition='$block.isHeartbeat'}<span class="text-muted"></span>{else}{$block.txCount|default=0}{/if}
</td>
<td class="text-secondary small">{$block.confirmations|default=0}</td>
<td class="font-monospace small text-secondary">{$block.shortValidator}</td>
<td class="text-secondary small">{$block.size|default=0} B</td>
<td class="text-secondary small">{$block.cbppRound|default='—'}</td>
</tr>
{/volist}
{empty name="blocks"}
<tr>
<td colspan="9" class="text-center text-secondary py-5">暂无区块数据</td>
</tr>
{/empty}
</tbody>
</table>
</div>
<!-- 分页 -->
{if condition="$totalPages > 1"}
<div class="card-footer bg-black border-secondary">
<nav>
<ul class="pagination pagination-sm justify-content-center mb-0">
{if condition="$page > 1"}
<li class="page-item">
<a class="page-link bg-dark text-light border-secondary" href="/blocks?page={$page-1}">上一页</a>
</li>
{/if}
{for start="1" end="$totalPages+1" name="p"}
<li class="page-item {if condition='$p == $page'}active{/if}">
<a class="page-link bg-dark border-secondary {if condition='$p == $page'}text-primary{else}text-light{/if}"
href="/blocks?page={$p}">{$p}</a>
</li>
{/for}
{if condition="$page < $totalPages"}
<li class="page-item">
<a class="page-link bg-dark text-light border-secondary" href="/blocks?page={$page+1}">下一页</a>
</li>
{/if}
</ul>
</nav>
</div>
{/if}
</div>
{include file="index/layout_footer"}