doctype html
html(lang='en')
head
meta(charset='UTF-8')
meta(name='viewport' content='width=device-width, initial-scale=1')
meta(http-equiv='Content-Language', content='en')
title=settings.title
link(rel='stylesheet', href='/css/themes/' + settings.theme + '/bootstrap.min.css')
link(rel='stylesheet', href='//use.fontawesome.com/releases/v5.15.1/css/all.css')
if active == 'markets' || active == 'richlist'
link(rel='stylesheet', href='/css/jquery.jqplot.min.css')
if active == 'network'
link(rel='stylesheet', href='/css/flag-icon.min.css')
link(rel='stylesheet', type='text/css', href='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.css')
link(rel='stylesheet', href='/css/style.min.css')
script(type='text/javascript', src='//cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js', integrity='sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==', crossorigin='anonymous')
script(type='text/javascript', src='//cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js', integrity='sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx', crossorigin='anonymous')
if active == 'markets' || active == 'richlist'
script(type='text/javascript', src='/js/jquery.jqplot.min.js')
if active == 'markets'
script(type='text/javascript', src='/js/jqplot.dateAxisRenderer.min.js')
script(type='text/javascript', src='/js/jqplot.ohlcRenderer.min.js')
script(type='text/javascript', src='/js/jqplot.highlighter.min.js')
if active == 'richlist'
script(type='text/javascript', src='/js/jqplot.pieRenderer.min.js')
script(type='text/javascript', src='//cdn.datatables.net/v/bs4/dt-1.10.22/datatables.min.js')
if active == 'reward'
script(type='text/javascript', src='/js/Chart.min.js')
script.
/* Special thanks to the stackoverflow community for the getParameterByName function: https://stackoverflow.com/a/901144/3038650 */
function getParameterByName(name, url = window.location.href) {
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
function fixFooterHeightAndPosition() {
var screenWidth = $(window).width();
if (screenWidth <= 575) {
// Mobile
$('#footer-container').css('height', '!{settings.footer_height_mobile}');
} else if (screenWidth >= 576 && screenWidth <= 991) {
// Tablet
$('#footer-container').css('height', '!{settings.footer_height_tablet}');
} else {
// Desktop
$('#footer-container').css('height', '!{settings.footer_height_desktop}');
}
if (!#{settings.sticky_footer}) {
// Wait a tick before fixing footer position to give time for elements to be rendered
var nonStickyFooterSetIntervalID = setInterval(function() {
// Stop setInterval from running again
clearInterval(nonStickyFooterSetIntervalID);
// Ensure footer is shown at the bottom of the viewport
var offset = (window.innerHeight - $('#footer-container').position().top - $('#footer-container').outerHeight());
$('#footer-container').css('margin-top', (offset > 0 ? offset : '10') + 'px');
}, 1, "tmrFixFooter");
} else {
// Add spacing to the bottom of the body for the sticky footer
$('body').css('margin-bottom', ($('#footer-container').outerHeight() + 10) + 'px');
}
fixSocialLinkFontSize();
}
function fixSocialLinkFontSize() {
var fontSize = $('#footer-container').height() * (getSocialLinkHeight() / 100);
$('#footer-container .social-link').css('font-size', fontSize);
}
function getSocialLinkHeight() {
var retVal = 70;
var screenWidth = $(window).width();
if (screenWidth <= 575) {
// Mobile
retVal = !{settings.social_link_percent_height_mobile};
} else if (screenWidth >= 576 && screenWidth <= 991) {
// Tablet
retVal = !{settings.social_link_percent_height_tablet};
} else {
// Desktop
retVal = !{settings.social_link_percent_height_desktop};
}
return retVal;
}
function enableTooltips() {
if ($().tooltip) {
// Enable tooltips only if browser supports them
$('[data-toggle="tooltip"]').tooltip();
}
}
function fixDataTableColumns() {
// Wait 2 ticks before adjusting table columns to give time for elements to be rendered (1 tick doesn't seem to be enough for some tables)
var ColumnAdjustSetIntervalID = setInterval(function() {
// Stop setInterval from running again
clearInterval(ColumnAdjustSetIntervalID);
// Ensure columns are properly aligned
$($.fn.dataTable.tables(true)).DataTable().columns.adjust();
}, 2, 'adjustTableColumns');
}
$(document).ready(function() {
if ('#{active}' != '')
$('##{active}').addClass('active');
function showTopPanelData(dataElement, loadingElement) {
if ($('#' + loadingElement).length) {
$('#' + loadingElement).fadeOut('slow', function() {
$('#' + loadingElement).remove();
$('#' + dataElement).fadeIn();
});
}
}
function update_stats() {
$.ajax({url: '/ext/summary', success: function(json) {
var mnOnlineText = json.data[0].masternodeCountOnline+" node"+(json.data[0].masternodeCountOnline == 1 ? "" : "s")+" online";
var mnOfflineText = json.data[0].masternodeCountOffline+" unreachable node"+(json.data[0].masternodeCountOffline == 1 ? "" : "s");
$("#masternodeCountOnline").text(json.data[0].masternodeCountOnline).prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText);
$("#masternodeCountOffline").text(json.data[0].masternodeCountOffline).prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText);
$("#spnMasternodeCountOnline").prop("alt", mnOnlineText).prop("title", mnOnlineText).attr("data-original-title", mnOnlineText);
$("#spnMasternodeCountOffline").prop("alt", mnOfflineText).prop("title", mnOfflineText).attr("data-original-title", mnOfflineText);
showTopPanelData('masternodepanel', 'masternodePanelLoading');
var supplyString = json.data[0].supply;
var diffString = json.data[0].difficulty;
var hashrateString = json.data[0].hashrate;
var splitValue, splitParts;
if (!isNaN(json.data[0].difficulty))
diffString = Number(json.data[0].difficulty).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':2,'useGrouping':true});
if (!isNaN(json.data[0].supply))
supplyString = parseInt(parseFloat(json.data[0].supply).toFixed(0)).toLocaleString('en');
if (!isNaN(json.data[0].hashrate))
hashrateString = Number(json.data[0].hashrate).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
$("#lblX1").text(' ');
$("#supply").text(supplyString);
splitValue = Number(parseFloat(json.data[0].lastPrice).toFixed(8) * parseInt(parseFloat(json.data[0].supply).toFixed(0))).toLocaleString('en');
splitParts = splitValue.split('.');
showTopPanelData('supplypanel', 'supplyPanelLoading');
$("#marketCap").html(splitParts[0] + '.' + splitParts[1] + '');
showTopPanelData('marketCapPanel', 'marketCapPanelLoading');
splitParts = diffString.split('.');
$("#difficulty").html(splitParts[0] + '.' + splitParts[1] + '');
if (json.data[0].difficultyHybrid == null || json.data[0].difficultyHybrid == '') {
$("#difficultyHybrid").html('0.00');
} else {
splitValue = Number(json.data[0].difficultyHybrid).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
splitParts = splitValue.split('.');
$("#difficultyHybrid").html(splitParts[0] + '.' + splitParts[1] + '');
}
showTopPanelData('difficultypanel', 'difficultyPanelLoading');
splitParts = hashrateString.split('.');
$("#hashrate").html(splitParts[0] + '.' + splitParts[1] + '');
showTopPanelData('hashratepanel', 'hashratePanelLoading');
splitValue = Number(json.data[0].lastPrice).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
splitParts = splitValue.split('.');
$("#lastPrice").html(splitParts[0] + '.' + splitParts[1] + '');
showTopPanelData('pricepanel', 'pricePanelLoading');
$("#lblConnections").text(json.data[0].connections + ' connections');
$("#lblBlockcount").text(json.data[0].blockcount + ' blocks');
}});
}
$('.iquidus').css('color',$('.table').css('color'));
$(window).resize(function () {
fixDataTableColumns();
fixFooterHeightAndPosition();
});
setInterval(function() {
update_stats();
}, 60000);
update_stats();
function getNetworkPanel() {
var networkSuffix='';
switch ('#{settings.nethash_units}') {
case "K":
networkSuffix='(KH/s)';
break;
case "M":
networkSuffix='(MH/s)';
break;
case "G":
networkSuffix='(GH/s)';
break;
case "T":
networkSuffix='(TH/s)';
break;
case "P":
networkSuffix='(PH/s)';
break;
case "H":
networkSuffix='(H/s)';
break;
}
var hashRateType='';
if ('#{settings.index.difficulty}' == 'Hybrid') hashRateType+='
';
return '