Browse Source

testing block info gen

pull/1/head
dan_s 2 years ago
parent
commit
cf6dd64276
  1. 7
      var/www/dragonx.is/explorer.css
  2. 50
      var/www/explorer.dragonx.is/bin/update_blocks_redis.pl
  3. 40
      var/www/explorer.dragonx.is/block/template.html

7
var/www/dragonx.is/explorer.css

@ -947,7 +947,7 @@ span {
width: 20vh;
height: 4vh;
background-color: rgba(255, 0, 0, 0.143);
border: 0.25vh solid rgb(255, 0, 0);
border: 0.25vh solid var(--shielded-col);
border-radius: 2.5vh 2.5vh 0vh 0vh;
}
@ -966,8 +966,11 @@ span {
height: 22vh;
background-color: var(--item-bg-dark-grey);
border-radius: 1.5vh 1.5vh 0vh 0vh;
border: 0.25vh solid var(--tx-outline);
border-bottom: var(--tx-border-bot);
}
.tx-container-top > h3 {
display: flex;
position: absolute;
@ -1036,6 +1039,8 @@ span {
height: 12vh;
background-color: var(--item-bg-light);
border-radius: 0vh 0vh 1.5vh 1.5vh;
border: 0.25vh solid var(--tx-outline);
border-top: var(--tx-border-top);
}
.tx-in-out {

50
var/www/explorer.dragonx.is/bin/update_blocks_redis.pl

@ -38,7 +38,7 @@ $STATS->{BLOCKS_TABLE} = "";
$STATS->{TX_TABLE} = "";
my $mineraddress = "";
for my $h ($height-250 .. $height) {
for my $h (1 .. $height) {
#for my $h (910265 .. 910270) {
#last if($h < 0);
my $thisminer = "";
@ -270,18 +270,42 @@ STUFF
}
my $tx_table = <<HTML;
<table>
<tr>
<td style="font-size: 14px"><a href="/tx/$tx" class="mainlinkexplorer">$tx</a></td>
<td style="font-size: 14px">vins: $vins, vouts: $vouts</td>
<td style="font-size: 14px">zins: $zins, zouts: $zouts</td>
</tr>
<tr>
<td style="font-size: 14px">$stuff</td>
<td style="font-size: 14px">$txtime</td>
<td style="font-size: 14px">$valueBalance $ticker</td>
</tr>
</table>
<div class="transaction">
<div class="shielded" style="--shielded-text: shielded; --shielded-col: rgba(255, 0, 0, 0.507);">
<span>Unshielded</span>
</div>
<div class="tx-container-top" style="--tx-outline: rgba(255, 0, 0, 0.507); --tx-border-bot: none;">
<h3>Transaction</h3>
<div class="tx-reward">${coinbase} DRGX</div>
<span>$locktime</span>
<div class="tx-id-bar">
<h3>TX ID</h3>
<span class=""><a href="/tx/$tx">$tx</a></span>
</div>
<div class="tx-id-bar" style="--miner-id-margin: 17.5vh">
<h3>Miner</h3>
<span class="">$to</span>
</div>
</div>
<div class="tx-container-bot" style="--tx-outline: rgba(255, 0, 0, 0.507); --tx-border-top: none;">
<div class="tx-in-out" style="--tx-io-margin-L: 45vh;">
<div class="v-in-out">
<h3 style="--v-mg-top: -4vh; --v-mg-l: -12vh; --just-con: right;">Zins</h3>
<h3 style="--v-mg-top: 1.5vh; --v-mg-l: -12vh; --just-con: right;">Zouts</h3>
<h3 class="in-out-num" style="--v-mg-top: -5vh; --v-mg-l: -1vh; --just-con: center;">$zins</h3>
<h3 class="in-out-num" style="--v-mg-top: 0.5vh; --v-mg-l: -1vh; --just-con: center;">$zouts</h3>
</div>
</div>
<div class="tx-in-out" style="--tx-io-margin-L: 25vh;">
<div class="v-in-out">
<h3 style="--v-mg-top: -4vh; --v-mg-l: -12vh; --just-con: right;">Vins</h3>
<h3 style="--v-mg-top: 1.5vh; --v-mg-l: -12vh; --just-con: right;">Vouts</h3>
<h3 class="in-out-num" style="--v-mg-top: -5vh; --v-mg-l: -1vh; --just-con: center;">$vins</h3>
<h3 class="in-out-num" style="--v-mg-top: 0.5vh; --v-mg-l: -1vh; --just-con: center;">$vouts</h3>
</div>
</div>
</div>
</div>
HTML
$STATS->{TX_TABLE} .= $tx_table;
$txi++;

40
var/www/explorer.dragonx.is/block/template.html

@ -74,7 +74,7 @@
<div class="block-info-bar">
<div class="block-info-height">
<h3>Block</h3>
<a href="/block/$height/" class="">#BLOCKS#</a>
<a href="/block/#BLOCKS#/" class="">#BLOCKS#</a>
</div>
<div class="block-info-main">
<h3>Difficulty</h3>
@ -129,11 +129,12 @@
<span class="">#FINALSAPLINGROOT#</span>
</div>
<div class="block-info-spacing"></div>
<div class="transaction">
<!-- <div class="shielded">
#TX_TABLE#
<!-- <div class="transaction">
<div class="shielded" style="--shielded-text: shielded; --shielded-col: rgba(255, 0, 0, 0.507);">
<span>Unshielded</span>
</div> -->
<div class="tx-container-top">
</div>
<div class="tx-container-top" style="--tx-outline: rgba(255, 0, 0, 0.507); --tx-border-bot: none;">
<h3>Transaction</h3>
<div class="tx-reward">${coinbase} DRGX</div>
<span>$locktime</span>
@ -146,7 +147,7 @@
<span class="">$to</span>
</div>
</div>
<div class="tx-container-bot">
<div class="tx-container-bot" style="--tx-outline: rgba(255, 0, 0, 0.507); --tx-border-top: none;">
<div class="tx-in-out" style="--tx-io-margin-L: 45vh;">
<div class="v-in-out">
<h3 style="--v-mg-top: -4vh; --v-mg-l: -12vh; --just-con: right;">Zins</h3>
@ -164,7 +165,7 @@
</div>
</div>
</div>
</div>
</div> -->
</div>
</section>
</div>
@ -187,31 +188,6 @@
</div>
</section>
<table>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKS#" class="mainlinkexplorer">Block Height: #BLOCKS#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/block/#BLOCKHASH#" class="mainlinkexplorer">Block Hash: #BLOCKHASH#</a></td></tr>
<tr><td style="font-size: 14px"><a href="/block/#PREVIOUSBLOCKHASH#" class="mainlinkexplorer">Previous Block Hash: #PREVIOUSBLOCKHASH#</a></td></tr>
</table>
<table>
<tr>
<td style="font-size: 14px">Block Reward: #BLOCKREWARD#</td>
<td style="font-size: 14px">Block Time: #BLOCKTIME#</td>
<td style="font-size: 14px">Block Difficulty: #DIFFICULTY#</td>
</tr>
<tr>
<td style="font-size: 14px">Block size: #BLOCKSIZE# bytes</td>
<td style="font-size: 14px">Block Version: #VERSION#</td>
<td style="font-size: 14px">Block Bits: #BITS#</td>
</tr>
</table>
<table>
<tr><td style="font-size: 14px">Block Nonce: #BLOCKNONCE#</td></tr>
<tr><td style="font-size: 14px">Block Anchor: #ANCHOR#</td></tr>
<tr><td style="font-size: 14px">Chainwork: #CHAINWORK#</td></tr>
<tr><td style="font-size: 14px">Merkle Root: #MERKLEROOT#</td></tr>
<tr><td style="font-size: 14px">Final Sapling Root: #FINALSAPLINGROOT#</td></tr>
</table>
#TX_TABLE#
</body>
</html>

Loading…
Cancel
Save