2019-05-27 10:33:22 -07:00
|
|
|
extends layout
|
|
|
|
|
|
|
|
|
|
block content
|
2020-12-25 15:01:03 -07:00
|
|
|
script.
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
$('.summary-table').dataTable({
|
|
|
|
|
info: false,
|
|
|
|
|
paging: false,
|
|
|
|
|
searching: false,
|
|
|
|
|
ordering: false,
|
|
|
|
|
responsive: true,
|
|
|
|
|
scrollX: true,
|
|
|
|
|
fnDrawCallback: function(settings) {
|
|
|
|
|
fixDataTableColumns();
|
|
|
|
|
}
|
2021-01-22 15:04:32 -07:00
|
|
|
});
|
2021-03-28 21:02:10 -06:00
|
|
|
|
2021-04-10 22:22:46 -06:00
|
|
|
if ('#{settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated}' == 'true') {
|
|
|
|
|
var lastUpdatedDate = #{(last_updated == null || last_updated == '0' ? 0 : last_updated)};
|
2021-03-28 21:02:10 -06:00
|
|
|
|
2021-04-10 22:22:46 -06:00
|
|
|
if (lastUpdatedDate != 0) {
|
|
|
|
|
$('span#lastUpdatedDate').html(' ' + format_unixtime(lastUpdatedDate));
|
2021-03-28 21:02:10 -06:00
|
|
|
|
2021-04-10 22:22:46 -06:00
|
|
|
if (#{settings.shared_pages.date_time.enable_alt_timezone_tooltips} == true) {
|
2022-03-12 18:24:24 -07:00
|
|
|
$('span#lastUpdatedDate').attr('data-bs-toggle', 'tooltip').attr('data-bs-placement', 'auto').attr('title', format_unixtime(lastUpdatedDate, true));
|
2021-04-10 22:22:46 -06:00
|
|
|
enableTooltips();
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
$('span#lastUpdatedDate').html(' N/A');
|
|
|
|
|
}
|
|
|
|
|
if (#{settings.shared_pages.page_header.page_title_image.enable_animation} == true && #{settings.blockchain_specific.heavycoin.reward_page.page_header.show_img} == true)
|
|
|
|
|
startRotateElement('img#header-img');
|
2020-12-25 15:01:03 -07:00
|
|
|
});
|
|
|
|
|
.row(style='margin-left:0;margin-right:0;')
|
2020-11-23 14:09:40 -07:00
|
|
|
.col-xs-12.col-md-12
|
2021-04-10 22:22:46 -06:00
|
|
|
if settings.blockchain_specific.heavycoin.reward_page.page_header.show_img == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_title == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true || settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true
|
|
|
|
|
#page-header-container(style='align-items:' + (settings.blockchain_specific.heavycoin.reward_page.page_header.show_img == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_title == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true ? 'flex-start' : 'center'))
|
|
|
|
|
if settings.blockchain_specific.heavycoin.reward_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.blockchain_specific.heavycoin.reward_page.page_header.show_title == true
|
2024-06-16 18:58:12 -06:00
|
|
|
h3#page-title #{settings.localization.heavy_title.replace('{1}', settings.coin.name)}
|
2021-04-10 22:22:46 -06:00
|
|
|
if settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated == true
|
|
|
|
|
if settings.blockchain_specific.heavycoin.reward_page.page_header.show_title != true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_description != true
|
|
|
|
|
#page-title-container
|
|
|
|
|
.sub-page-header
|
2024-06-16 18:58:12 -06:00
|
|
|
span.fw-bold=settings.localization.last_updated + ':'
|
2021-04-10 22:22:46 -06:00
|
|
|
span.text-muted#lastUpdatedDate
|
|
|
|
|
else
|
|
|
|
|
.sub-page-header(style='margin-bottom:' + (settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true ? '5' : '0') + 'px')
|
2024-06-16 18:58:12 -06:00
|
|
|
span.fw-bold=settings.localization.last_updated + ':'
|
2021-04-10 22:22:46 -06:00
|
|
|
span.text-muted#lastUpdatedDate
|
|
|
|
|
if settings.blockchain_specific.heavycoin.reward_page.page_header.show_description == true
|
|
|
|
|
if settings.blockchain_specific.heavycoin.reward_page.page_header.show_title != true && settings.blockchain_specific.heavycoin.reward_page.page_header.show_last_updated != true
|
|
|
|
|
#page-title-container
|
2024-06-16 18:58:12 -06:00
|
|
|
.sub-page-header.text-muted=settings.localization.heavy_description.replace('{1}', settings.coin.name)
|
2021-04-10 22:22:46 -06:00
|
|
|
else
|
2024-06-16 18:58:12 -06:00
|
|
|
.sub-page-header.text-muted=settings.localization.heavy_description.replace('{1}', settings.coin.name)
|
2021-04-10 22:22:46 -06:00
|
|
|
.cardSpacer.clearfix
|
2022-03-12 18:24:24 -07:00
|
|
|
.card.card-default.border-0.card-address-reward
|
2020-11-29 19:29:38 -07:00
|
|
|
.card-header(style='position:relative;')
|
2024-06-16 18:58:12 -06:00
|
|
|
strong #{settings.localization.heavy_reward_voting_info}
|
2022-03-12 18:24:24 -07:00
|
|
|
span.small.fw-normal (#{settings.coin.symbol})
|
|
|
|
|
table#reward-summary.table.table-bordered.table-striped.summary-table.single-row-table(style='border-top:0;border-bottom:0;margin-top:0 !important;')
|
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);
|
|
|
|
|
thead
|
|
|
|
|
tr(class=theadClasses)
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.ex_supply}
|
2022-03-12 18:24:24 -07:00
|
|
|
span.small.fw-normal (#{settings.coin.symbol})
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.heavy_cap}
|
2022-03-12 18:24:24 -07:00
|
|
|
span.small.fw-normal (#{settings.coin.symbol})
|
2024-06-16 18:58:12 -06:00
|
|
|
th.text-center #{settings.localization.heavy_phase}
|
|
|
|
|
th.text-center #{settings.localization.heavy_maxvote}
|
|
|
|
|
th.text-center #{settings.localization.heavy_reward}
|
|
|
|
|
th.text-center #{settings.localization.heavy_estnext}
|
2020-11-29 19:29:38 -07:00
|
|
|
tbody
|
2020-12-25 19:07:03 -07:00
|
|
|
- var supplyValue = Number(heavy.supply).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
|
|
|
- var splitSupply = supplyValue.split('.');
|
|
|
|
|
- var capValue = Number(heavy.cap).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
|
|
|
- var splitCap = capValue.split('.');
|
|
|
|
|
- var rewardValue = Number(heavy.reward).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
|
|
|
- var splitReward = rewardValue.split('.');
|
|
|
|
|
- var nextValue = Number(heavy.estnext).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true});
|
|
|
|
|
- var splitNext = nextValue.split('.');
|
2019-05-27 10:33:22 -07:00
|
|
|
tr
|
2020-12-25 19:07:03 -07:00
|
|
|
td.text-center #{splitSupply[0]}.
|
|
|
|
|
span.decimal #{splitSupply[1]}
|
|
|
|
|
td.text-center #{splitCap[0]}.
|
|
|
|
|
span.decimal #{splitCap[1]}
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center
|
2019-05-27 10:33:22 -07:00
|
|
|
=heavy.phase
|
2020-12-25 15:01:03 -07:00
|
|
|
td.text-center
|
2019-05-27 10:33:22 -07:00
|
|
|
=heavy.maxvote
|
2020-12-25 19:07:03 -07:00
|
|
|
td.text-center #{splitReward[0]}.
|
|
|
|
|
span.decimal #{splitReward[1]}
|
|
|
|
|
td.text-center #{splitNext[0]}.
|
|
|
|
|
span.decimal #{splitNext[1]}
|
2020-12-25 15:01:03 -07:00
|
|
|
.row(style='margin-left:0;margin-right:0;')
|
2020-11-29 19:29:38 -07:00
|
|
|
.col-md-3
|
2020-12-12 20:21:49 -07:00
|
|
|
.card.card-default.border-0
|
2020-11-23 14:09:40 -07:00
|
|
|
.card-body
|
2020-11-29 19:29:38 -07:00
|
|
|
div.text-center
|
2021-12-04 17:54:52 -07:00
|
|
|
canvas.d-inline(id="rewardChange", width="150", height="150" style="max-width:150px;max-height:150px;")
|
2020-11-29 19:29:38 -07:00
|
|
|
script.
|
2020-12-17 20:01:50 -07:00
|
|
|
var ctx = document.getElementById("rewardChange").getContext("2d");
|
|
|
|
|
var data = {
|
|
|
|
|
labels: [
|
|
|
|
|
"Est. Next",
|
|
|
|
|
"Current Reward"
|
|
|
|
|
],
|
|
|
|
|
datasets: [
|
|
|
|
|
{
|
|
|
|
|
data: [(((#{stats.count}/3600)%1)*100).toFixed(2), ((1-((#{stats.count}/3600)%1))*100).toFixed(2)],
|
|
|
|
|
backgroundColor: ["rgba(92,184,92,1.0)", "#222"]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
var options = {
|
2021-12-04 17:54:52 -07:00
|
|
|
plugins: {
|
|
|
|
|
legend: {
|
|
|
|
|
display: false
|
2022-04-11 01:37:27 -06:00
|
|
|
},
|
|
|
|
|
crosshair: false
|
2020-11-29 19:29:38 -07:00
|
|
|
}
|
2020-12-17 20:01:50 -07:00
|
|
|
};
|
|
|
|
|
new Chart(ctx, { type: 'doughnut', data: data, options: options });
|
2024-06-16 18:58:12 -06:00
|
|
|
h5 #{settings.localization.heavy_changein}
|
2020-11-29 19:29:38 -07:00
|
|
|
h5
|
|
|
|
|
=heavy.nextin
|
|
|
|
|
form
|
|
|
|
|
table.table
|
2020-12-20 18:13:24 -07:00
|
|
|
tbody
|
|
|
|
|
tr
|
2024-06-16 18:58:12 -06:00
|
|
|
th #{settings.localization.heavy_key}
|
2020-12-20 18:13:24 -07:00
|
|
|
td
|
|
|
|
|
tr
|
2024-06-16 18:58:12 -06:00
|
|
|
th #{settings.localization.heavy_vote}
|
2020-12-20 18:13:24 -07:00
|
|
|
td
|
|
|
|
|
div(style="width:20px;height:20px;background-color:#428bca")
|
|
|
|
|
tr
|
2024-06-16 18:58:12 -06:00
|
|
|
th #{settings.localization.heavy_current}
|
2020-12-20 18:13:24 -07:00
|
|
|
td
|
|
|
|
|
div(style="width:20px;height:20px;background-color:#222")
|
|
|
|
|
tr
|
2024-06-16 18:58:12 -06:00
|
|
|
th #{settings.localization.heavy_estnext}
|
2020-12-20 18:13:24 -07:00
|
|
|
td
|
|
|
|
|
div(style="width:20px;height:20px;background-color:rgba(92,184,92,1.0)")
|
2020-11-29 19:29:38 -07:00
|
|
|
.col-md-9
|
2020-12-12 20:21:49 -07:00
|
|
|
.card.card-default.border-0
|
2020-11-29 19:29:38 -07:00
|
|
|
.card-body
|
|
|
|
|
div.text-center
|
|
|
|
|
.div
|
2024-06-16 18:58:12 -06:00
|
|
|
strong #{settings.localization.heavy_lastxvotes}
|
2020-11-29 19:29:38 -07:00
|
|
|
.div
|
2020-12-17 20:01:50 -07:00
|
|
|
canvas.d-inline(id="lastVotes", width="800", height="300", style="margin-left:-30px;margin-top:30px;max-width:800px;")
|
2019-05-27 10:33:22 -07:00
|
|
|
script.
|
2020-12-17 20:01:50 -07:00
|
|
|
var ctx = document.getElementById("lastVotes").getContext("2d");
|
2020-11-29 19:29:38 -07:00
|
|
|
var options = {
|
2021-12-04 17:54:52 -07:00
|
|
|
plugins: {
|
|
|
|
|
legend: {
|
|
|
|
|
display: false
|
2022-04-11 01:37:27 -06:00
|
|
|
},
|
|
|
|
|
crosshair: false
|
2020-12-17 20:01:50 -07:00
|
|
|
},
|
|
|
|
|
scales: {
|
2021-12-04 17:54:52 -07:00
|
|
|
y: {
|
|
|
|
|
beginAtZero: true,
|
|
|
|
|
min: 0,
|
|
|
|
|
suggestedMax: 8,
|
2020-12-17 20:01:50 -07:00
|
|
|
ticks: {
|
|
|
|
|
stepSize: 1,
|
|
|
|
|
maxTicksLimit: 8
|
|
|
|
|
}
|
2021-12-04 17:54:52 -07:00
|
|
|
},
|
2020-12-17 20:01:50 -07:00
|
|
|
},
|
|
|
|
|
line: {
|
|
|
|
|
tension: 0
|
|
|
|
|
}
|
|
|
|
|
};
|
2020-11-29 19:29:38 -07:00
|
|
|
var data = {
|
2020-12-17 20:01:50 -07:00
|
|
|
labels: [#{(votes.length > 0 ? votes[0].count : 0)},#{(votes.length > 1 ? votes[1].count : 0)},#{(votes.length > 2 ? votes[2].count : 0)},#{(votes.length > 3 ? votes[3].count : 0)},#{(votes.length > 4 ? votes[4].count : 0)},#{(votes.length > 5 ? votes[5].count : 0)},#{(votes.length > 6 ? votes[6].count : 0)},#{(votes.length > 7 ? votes[7].count : 0)},#{(votes.length > 8 ? votes[8].count : 0)},#{(votes.length > 9 ? votes[9].count : 0)},#{(votes.length > 10 ? votes[10].count : 0)},#{(votes.length > 11 ? votes[11].count : 0)},#{(votes.length > 12 ? votes[12].count : 0)},#{(votes.length > 13 ? votes[13].count : 0)},#{(votes.length > 14 ? votes[14].count : 0)},#{(votes.length > 15 ? votes[15].count : 0)},#{(votes.length > 16 ? votes[16].count : 0)},#{(votes.length > 17 ? votes[17].count : 0)},#{(votes.length > 18 ? votes[18].count : 0)},#{(votes.length > 19 ? votes[19].count : 0)}],
|
2020-11-29 19:29:38 -07:00
|
|
|
datasets: [
|
|
|
|
|
{
|
2020-12-17 20:01:50 -07:00
|
|
|
backgroundColor: "rgba(66,139,202,0.5)",
|
|
|
|
|
borderColor: "rgba(66,139,202,0.8)",
|
|
|
|
|
pointBackgroundColor: '#428bca',
|
|
|
|
|
pointBorderColor: "#fff",
|
|
|
|
|
data: [#{(votes.length > 0 ? votes[0].vote : 0)},#{(votes.length > 1 ? votes[1].vote : 0)},#{(votes.length > 2 ? votes[2].vote : 0)},#{(votes.length > 3 ? votes[3].vote : 0)},#{(votes.length > 4 ? votes[4].vote : 0)},#{(votes.length > 5 ? votes[5].vote : 0)},#{(votes.length > 6 ? votes[6].vote : 0)},#{(votes.length > 7 ? votes[7].vote : 0)},#{(votes.length > 8 ? votes[8].vote : 0)},#{(votes.length > 9 ? votes[9].vote : 0)},#{(votes.length > 10 ? votes[10].vote : 0)},#{(votes.length > 11 ? votes[11].vote : 0)},#{(votes.length > 12 ? votes[12].vote : 0)},#{(votes.length > 13 ? votes[13].vote : 0)},#{(votes.length > 14 ? votes[14].vote : 0)},#{(votes.length > 15 ? votes[15].vote : 0)},#{(votes.length > 16 ? votes[16].vote : 0)},#{(votes.length > 17 ? votes[17].vote : 0)},#{(votes.length > 18 ? votes[18].vote : 0)},#{(votes.length > 19 ? votes[19].vote : 0)}]
|
2020-11-29 19:29:38 -07:00
|
|
|
},
|
|
|
|
|
{
|
2020-12-17 20:01:50 -07:00
|
|
|
backgroundColor: "rgba(151,187,205,0.0)",
|
|
|
|
|
borderColor: '#222',
|
|
|
|
|
pointBackgroundColor: "rgba(0,0,0,0)",
|
|
|
|
|
pointBorderColor: "rgba(0,0,0,0.0)",
|
|
|
|
|
data: [#{(votes.length > 0 ? votes[0].reward : 0)},#{(votes.length > 1 ? votes[1].reward : 0)},#{(votes.length > 2 ? votes[2].reward : 0)},#{(votes.length > 3 ? votes[3].reward : 0)},#{(votes.length > 4 ? votes[4].reward : 0)},#{(votes.length > 5 ? votes[5].reward : 0)},#{(votes.length > 6 ? votes[6].reward : 0)},#{(votes.length > 7 ? votes[7].reward : 0)},#{(votes.length > 8 ? votes[8].reward : 0)},#{(votes.length > 9 ? votes[9].reward : 0)},#{(votes.length > 10 ? votes[10].reward : 0)},#{(votes.length > 11 ? votes[11].reward : 0)},#{(votes.length > 12 ? votes[12].reward : 0)},#{(votes.length > 13 ? votes[13].reward : 0)},#{(votes.length > 14 ? votes[14].reward : 0)},#{(votes.length > 15 ? votes[15].reward : 0)},#{(votes.length > 16 ? votes[16].reward : 0)},#{(votes.length > 17 ? votes[17].reward : 0)},#{(votes.length > 18 ? votes[18].reward : 0)},#{(votes.length > 19 ? votes[19].reward : 0)}]
|
2020-11-29 19:29:38 -07:00
|
|
|
}
|
|
|
|
|
]
|
2020-12-17 20:01:50 -07:00
|
|
|
};
|
|
|
|
|
var myNewChart = new Chart(ctx, { type: 'line', data: data, options: options });
|