Files
purple-explorer/views/block.pug
T
joeuhren 03bff8c72f Sass support + layout/css cleanup
-Add sass support (Replace style.css with style.scss; add new sass_theme_reader.sh script; add sass:compile to package.json; add new dependencies for sass; compiled style.css is now minified)
-Claim address improvements (Better instructions; better error msgs)
-Fix for disappearing Network > Connections table
-Tons of layout and css fixes and tweaks (Improved mobile support)
-Remove old Exor theme
2020-12-12 20:21:49 -07:00

106 lines
4.9 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.cardSpacer
.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.cardSpacer
.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
.footer-padding