2019-05-27 10:33:22 -07:00
|
|
|
extends layout
|
|
|
|
|
|
|
|
|
|
block content
|
2020-11-29 20:05:42 -07:00
|
|
|
include ./includes/common.pug
|
2020-11-29 19:29:38 -07:00
|
|
|
- var block_difficulty = parseFloat(block.difficulty).toFixed(4);
|
2020-12-20 18:13:24 -07:00
|
|
|
- var theadClasses = [];
|
2021-01-22 15:04:32 -07:00
|
|
|
if settings.shared_pages.table_header_bgcolor != null && settings.shared_pages.table_header_bgcolor != ''
|
2022-03-12 18:24:24 -07:00
|
|
|
- theadClasses.push('table-' + settings.shared_pages.table_header_bgcolor);
|
2020-12-25 15:01:03 -07:00
|
|
|
script.
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('#block-summary').dataTable({
|
|
|
|
|
info: false,
|
|
|
|
|
paging: false,
|
|
|
|
|
searching: false,
|
|
|
|
|
ordering: false,
|
|
|
|
|
responsive: true,
|
|
|
|
|
scrollX: true,
|
|
|
|
|
fnDrawCallback: function(settings) {
|
|
|
|
|
fixDataTableColumns();
|
|
|
|
|
}
|
2021-03-28 21:02:10 -06:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('span#timestampCol').html(format_unixtime(#{block.time}));
|
|
|
|
|
|
|
|
|
|
if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) {
|
2022-03-12 18:24:24 -07:00
|
|
|
$('span#timestampCol').attr('data-bs-toggle', 'tooltip').attr('data-bs-placement', 'auto').attr('title', format_unixtime(#{block.time}, true));
|
2021-03-28 21:02:10 -06:00
|
|
|
enableTooltips();
|
|
|
|
|
}
|
2021-04-10 22:22:46 -06:00
|
|
|
if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.block_page.page_header.show_img} == true)
|
|
|
|
|
startRotateElement('img#header-img');
|
2020-12-25 15:01:03 -07:00
|
|
|
});
|
2020-12-18 18:10:58 -07:00
|
|
|
.col-xs-12.col-md-12
|
2023-05-06 12:36:35 -06:00
|
|
|
if orphan != null && orphan == true
|
|
|
|
|
.col-12
|
|
|
|
|
.alert.alert-warning.alert-dismissible.fade.show(role='alert')
|
|
|
|
|
button.btn-close(type='button', data-bs-dismiss='alert')
|
|
|
|
|
.cardSpacer
|
2023-10-19 20:26:27 -06:00
|
|
|
span.fa-solid.fa-triangle-exclamation(style='margin-right:5px')
|
2024-06-16 18:58:12 -06:00
|
|
|
strong=settings.localization.ex_warning
|
2023-05-06 12:36:35 -06:00
|
|
|
div="This is an orphaned block"
|
2021-04-10 22:22:46 -06:00
|
|
|
if settings.block_page.page_header.show_img == true || settings.block_page.page_header.show_title == true || settings.block_page.page_header.show_description == true
|
|
|
|
|
#page-header-container(style='align-items:' + (settings.block_page.page_header.show_img == true && settings.block_page.page_header.show_title == true && settings.block_page.page_header.show_description == true ? 'flex-start' : 'center'))
|
|
|
|
|
if settings.block_page.page_header.show_img == true
|
|
|
|
|
#header-img-container
|
|
|
|
|
img#header-img(src=(settings.shared_pages.page_header.page_title_image == null || settings.shared_pages.page_header.page_title_image.image_path == null || settings.shared_pages.page_header.page_title_image.image_path == '' ? '/img/page-title-img.png' : settings.shared_pages.page_header.page_title_image.image_path))
|
|
|
|
|
#page-title-container
|
|
|
|
|
if settings.block_page.page_header.show_title == true
|
2024-06-16 18:58:12 -06:00
|
|
|
h3#page-title #{settings.localization.block_title.replace('{1}', settings.coin.name)}
|
2021-04-10 22:22:46 -06:00
|
|
|
if settings.block_page.page_header.show_description == true
|
|
|
|
|
if settings.block_page.page_header.show_title != true
|
|
|
|
|
#page-title-container
|
2024-06-16 18:58:12 -06:00
|
|
|
.sub-page-header.text-muted=settings.localization.block_description.replace('{1}', settings.coin.name).replace('{2}', block.height)
|
2021-04-10 22:22:46 -06:00
|
|
|
else
|
2024-06-16 18:58:12 -06:00
|
|
|
.sub-page-header.text-muted=settings.localization.block_description.replace('{1}', settings.coin.name).replace('{2}', block.height)
|
2021-04-10 22:22:46 -06:00
|
|
|
.cardSpacer.clearfix
|
2020-12-12 20:21:49 -07:00
|
|
|
.card.card-default.border-0.cardSpacer
|
2022-03-12 18:24:24 -07:00
|
|
|
.card-header
|
|
|
|
|
div(style='display: flex;flex-wrap: wrap;')
|
2019-05-27 10:33:22 -07:00
|
|
|
if block.previousblockhash != null
|
|
|
|
|
a(href='/block/' + block.previousblockhash)
|
2024-06-16 18:58:12 -06:00
|
|
|
span.fa-solid.fa-chevron-left.block-last(data-bs-toggle='tooltip', data-bs-placement='top', title=settings.localization.block_previous, style='color: var(--bs-body-color);')
|
|
|
|
|
strong.d-none.d-md-block #{settings.localization.tx_block_hash}: #{block.hash}
|
|
|
|
|
strong.d-block.d-md-none #{settings.localization.ex_summary}
|
2019-05-27 10:33:22 -07:00
|
|
|
else
|
2024-06-16 18:58:12 -06:00
|
|
|
strong.d-none.d-md-block(style='margin-left:10px;') #{settings.localization.tx_block_hash}: #{block.hash}
|
|
|
|
|
strong.d-block.d-md-none(style='margin-left:10px;') #{settings.localization.ex_summary}
|
2020-11-29 19:29:38 -07:00
|
|
|
if block.nextblockhash != null
|
2019-05-27 10:33:22 -07:00
|
|
|
a(href='/block/' + block.nextblockhash)
|
2024-06-16 18:58:12 -06:00
|
|
|
span.fa-solid.fa-chevron-right.block-next(data-bs-toggle='tooltip', data-bs-placement='top', title=settings.localization.block_next, style='color: var(--bs-body-color);')
|
2021-01-22 15:04:32 -07:00
|
|
|
if settings.api_page.public_apis.rpc.getblock.enabled == true
|
2024-06-16 18:58:12 -06:00
|
|
|
a.d-none.d-md-block(href='/api/getblock?hash=' + block.hash, style='margin-left:auto;', data-bs-toggle='tooltip', data-bs-placement='top', title=settings.localization.view_raw_block_data)
|
2023-10-19 20:26:27 -06:00
|
|
|
span.fa-solid.fa-circle-info(style='color: var(--bs-body-color);')
|
2022-03-12 18:24:24 -07:00
|
|
|
table#block-summary.table.table-bordered.summary-table.bottom-border-0.single-row-table(style='border-top:0;margin-top:0 !important;')
|
|
|
|
|
thead
|
|
|
|
|
tr(class=theadClasses)
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.height}
|
|
|
|
|
th.text-center #{settings.localization.difficulty}
|
2024-02-06 19:44:11 -07:00
|
|
|
if settings.block_page.multi_algorithm.show_algo == true
|
|
|
|
|
th.text-center='Algorithm'
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.confirmations}
|
2021-01-22 15:04:32 -07:00
|
|
|
if settings.blockchain_specific.heavycoin.enabled == true
|
2020-12-25 15:01:03 -07:00
|
|
|
th.text-center Vote
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.size} (kB)
|
|
|
|
|
th.text-center #{settings.localization.bits}
|
|
|
|
|
th.text-center #{settings.localization.nonce}
|
|
|
|
|
th.text-center #{settings.localization.timestamp}
|
2019-05-27 10:33:22 -07:00
|
|
|
tbody
|
2020-12-25 19:07:03 -07:00
|
|
|
- var difficulty = Number(block.difficulty).toLocaleString('en',{'minimumFractionDigits':4,'maximumFractionDigits':4,'useGrouping':true});
|
|
|
|
|
- var splitDifficulty = difficulty.split('.');
|
|
|
|
|
- var block_size = Number(block.size/1024).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':2,'useGrouping':true});
|
2021-03-17 17:54:09 -06:00
|
|
|
- var splitBlockSize = block_size.split('.');
|
2022-03-12 18:24:24 -07:00
|
|
|
tr
|
|
|
|
|
td.text-center=block.height
|
|
|
|
|
td.text-center #{splitDifficulty[0]}.
|
|
|
|
|
span.decimal #{splitDifficulty[1]}
|
2024-02-06 19:44:11 -07:00
|
|
|
if settings.block_page.multi_algorithm.show_algo == true
|
|
|
|
|
td.text-center=block[settings.block_page.multi_algorithm.key_name]
|
2022-03-12 18:24:24 -07:00
|
|
|
if block.confirmations >= confirmations
|
|
|
|
|
td.text-center.table-success=block.confirmations
|
|
|
|
|
else if block.confirmations < (confirmations / 2)
|
|
|
|
|
td.text-center.table-danger=block.confirmations
|
2019-05-27 10:33:22 -07:00
|
|
|
else
|
2022-03-12 18:24:24 -07:00
|
|
|
td.text-center.table-warning=block.confirmations
|
|
|
|
|
if settings.blockchain_specific.heavycoin.enabled == true
|
|
|
|
|
td.text-center=block.vote
|
|
|
|
|
td.text-center #{splitBlockSize[0]}.
|
|
|
|
|
span.decimal #{splitBlockSize[1]}
|
|
|
|
|
td.text-center=block.bits
|
|
|
|
|
td.text-center=block.nonce
|
|
|
|
|
td.text-center
|
|
|
|
|
span#timestampCol
|
2021-01-22 15:04:32 -07:00
|
|
|
if block.hash == settings.block_page.genesis_block
|
2020-11-29 19:29:38 -07:00
|
|
|
.alert.alert-info(role='alert', style='text-align:center;')
|
2024-06-16 18:58:12 -06:00
|
|
|
strong #{settings.localization.block_genesis}
|
2019-05-27 10:33:22 -07:00
|
|
|
else
|
2020-12-18 18:10:58 -07:00
|
|
|
.card.card-default.border-0
|
2020-11-23 14:09:40 -07:00
|
|
|
.card-header
|
2024-06-16 18:58:12 -06:00
|
|
|
strong #{settings.localization.ex_latest_transactions}
|
2022-03-12 18:24:24 -07:00
|
|
|
table.table.table-bordered.table-striped.table-hover.summary-table.mobile-border-right
|
|
|
|
|
thead
|
|
|
|
|
tr(class=theadClasses)
|
2020-12-25 15:01:03 -07:00
|
|
|
th.text-center.d-table-cell.d-md-none
|
2024-06-16 18:58:12 -06:00
|
|
|
th.d-none.d-md-table-cell #{settings.localization.tx_hash}
|
|
|
|
|
th.text-center #{settings.localization.tx_recipients}
|
|
|
|
|
th.text-center #{settings.localization.mkt_amount}
|
2022-03-12 18:24:24 -07:00
|
|
|
span.small.fw-normal (#{settings.coin.symbol})
|
2019-05-27 10:33:22 -07:00
|
|
|
tbody
|
|
|
|
|
each txn in txs
|
|
|
|
|
tr
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center.d-table-cell.d-md-none
|
|
|
|
|
a(href='/tx/' + txn.txid)
|
2024-06-16 18:58:12 -06:00
|
|
|
span.fa-regular.fa-eye(data-bs-toggle='tooltip', data-bs-placement='top', title=settings.localization.view_tx)
|
2020-12-25 15:01:03 -07:00
|
|
|
td.d-none.d-md-table-cell
|
2020-11-29 19:29:38 -07:00
|
|
|
a.breakWord(href='/tx/' + txn.txid) #{txn.txid}
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center #{txn.vout.length}
|
2019-05-27 10:33:22 -07:00
|
|
|
if txn.vout.length > 0
|
2020-12-25 19:07:03 -07:00
|
|
|
- var total = Number(txn.total / 100000000).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
2020-11-29 19:29:38 -07:00
|
|
|
- var totalParts = total.split('.');
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center #{totalParts[0]}.
|
2020-11-20 17:13:30 -07:00
|
|
|
span.decimal #{totalParts[1]}
|
2019-05-27 10:33:22 -07:00
|
|
|
else
|
2020-12-25 19:07:03 -07:00
|
|
|
- var total = Number(txn.total).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
2020-11-29 19:29:38 -07:00
|
|
|
- var totalParts = total.split('.');
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center #{totalParts[0]}.
|
|
|
|
|
span.decimal #{totalParts[1]}
|