Files
purple-explorer/views/block.pug
T
joeuhren 2df8a3f994 Position non-sticky footer at bottom of viewport
-Fix footer height and position after datatables are populated/drawn
-Remove footer-padding css rule
-Remove unnecessary spacing on all applicable pages
2020-12-18 18:10:58 -07:00

105 lines
4.8 KiB
Plaintext

extends layout
block content
include ./includes/common.pug
- var time = format_unixtime(block.time);
- var block_difficulty = parseFloat(block.difficulty).toFixed(4);
.col-xs-12.col-md-12
.card.card-default.border-0.cardSpacer
.card-header(style='padding-left:25px;padding-right:25px;')
.row
if block.previousblockhash != null
a(href='/block/' + block.previousblockhash)
span.fa.fa-chevron-left.iquidus.block-last(data-toggle='tooltip', data-placement='top', title=settings.locale.block_previous)
strong.d-none.d-md-block #{settings.symbol} block: #{block.hash}
else
strong.d-none.d-md-block(style='margin-left:10px;') #{settings.symbol} #{settings.locale.ex_block}: #{block.hash}
if block.nextblockhash != null
a(href='/block/' + block.nextblockhash)
span.fa.fa-chevron-right.iquidus.block-next(data-toggle='tooltip', data-placement='top', title=settings.locale.block_next)
a(href='/api/getblock?hash=' + block.hash, style='margin-left: auto;')
span.fa.fa-info-circle.iquidus
table.table.table-bordered.summary-table
thead
tr
th #{settings.locale.height}
th #{settings.locale.difficulty}
th #{settings.locale.confirmations}
if settings.heavy == true
th.d-none.d-sm-table-cell Vote
th.d-none.d-sm-table-cell #{settings.locale.size} (kB)
th.d-none.d-md-table-cell #{settings.locale.bits}
th.d-none.d-sm-table-cell #{settings.locale.nonce}
th.d-none.d-sm-table-cell #{settings.locale.timestamp}
tbody
if block.confirmations >= confirmations
tr.bg-success.text-dark
- var block_size = block.size/1024
td=block.height
td=Number(block.difficulty).toFixed(4)
td=block.confirmations
if settings.heavy == true
td.d-none.d-sm-table-cell=block.vote
td.d-none.d-sm-table-cell=block_size.toFixed(2)
td.d-none.d-md-table-cell=block.bits
td.d-none.d-sm-table-cell=block.nonce
td.d-none.d-sm-table-cell=time
else
if block.confirmations < (confirmations / 2)
tr.bg-danger
- var block_size = block.size/1024
td=block.height
td=Number(block.difficulty).toFixed(4)
td=block.confirmations
if settings.heavy == true
td.d-none.d-sm-table-cell=block.vote
td.d-none.d-sm-table-cell=block_size.toFixed(2)
td.d-none.d-md-table-cell=block.bits
td.d-none.d-sm-table-cell=block.nonce
td.d-none.d-sm-table-cell=time
else
tr.table-warning
- var block_size = block.size/1024
td=block.height
td=Number(block.difficulty).toFixed(4)
td=block.confirmations
if settings.heavy == true
td.d-none.d-sm-table-cell=block.vote
td.d-none.d-sm-cell=block_size.toFixed(2)
td.d-none.d-md-table-cell=block.bits
td.d-none.d-sm-table-cell=block.nonce
td.d-none.d-sm-table-cell=time
if block.hash == settings.genesis_block
.alert.alert-info(role='alert', style='text-align:center;')
strong #{settings.locale.block_genesis}
else
.card.card-default.border-0
.card-header
strong #{settings.locale.ex_latest_transactions}
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
tr
th.d-none.d-sm-table-cell #{settings.locale.tx_hash}
th #{settings.locale.tx_recipients}
th #{settings.locale.mkt_amount}
span.small (#{settings.symbol})
th
tbody
each txn in txs
tr
td.d-none.d-sm-table-cell
a.breakWord(href='/tx/' + txn.txid) #{txn.txid}
td #{txn.vout.length}
if txn.vout.length > 0
- var total = (txn.total / 100000000).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
- var totalParts = total.split('.');
td #{totalParts[0]}.
span.decimal #{totalParts[1]}
else
- var total = (txn.total).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
- var totalParts = total.split('.');
td #{totalParts[0]}.
span.decimal #{totalParts[1]}
td.text-center
a(href='/tx/' + txn.txid)
span.fa.fa-eye