first commit
This commit is contained in:
65
articles/20170301/content.html
Normal file
65
articles/20170301/content.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<style>
|
||||
.fond {
|
||||
margin:auto;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.texte {
|
||||
color:black;
|
||||
margin:auto;
|
||||
position:absolute;
|
||||
z-index:2;
|
||||
top:0;
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container-fluid" id="BlocksBrowser"></div>
|
||||
|
||||
<div class="container-fluid bg-grey">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
Drawing the treemap
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
Drawing the block hashes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/browse_blocks.js"></script>
|
||||
|
||||
<script>
|
||||
function afficherBlock(block, index)
|
||||
{
|
||||
|
||||
var methode = $("#selectMethod").val();
|
||||
html = '<img src="twitterbot/image.php?methode='+methode+'&block_hash='+block.hash+'" style="opacity: 0.5;image-orientation: 90deg" width="100%; height: auto"></img>';
|
||||
$('#block0'+index+'_img').html(html);
|
||||
|
||||
html = '';
|
||||
html += '<table width="100%">'
|
||||
html += '<tr><td width="10%"> </td><td width="30%">Height</td><td width="50%" align="right"><strong>HEIGHT</strong></td><td width="10%"> </td></tr>';
|
||||
html += '<tr><td width="10%"> </td><td width="30%">Outputs</td><td width="50%" align="right"><strong>OUTPUT</strong> <span class="glyphicon glyphicon-bitcoin"></span></td><td width="10%"> </td></tr>';
|
||||
//html += '<tr><td width="10%"> </td><td width="30%">Inputs</td><td width="50%" align="right"><strong>INPUT</strong> <span class="glyphicon glyphicon-bitcoin"></span></td><td width="10%"> </td></tr>';
|
||||
html += '<tr><td width="10%"> </td><td width="30%">Reward</td><td width="50%" align="right"><strong>REWARD</strong> <span class="glyphicon glyphicon-bitcoin"></span></td><td width="10%"> </td></tr>';
|
||||
//html += '<tr><td width="10%"> </td><td width="30%">Fees</td><td width="50%" align="right"><strong>FEE</strong> <span class="glyphicon glyphicon-bitcoin"></span></td><td width="10%"> </td></tr>';
|
||||
html += '</table>'
|
||||
|
||||
html = html.replace(new RegExp('INDEX', 'g'),block.block_index);
|
||||
html = html.replace(new RegExp('HEIGHT', 'g'),block.height);
|
||||
html = html.replace(new RegExp('OUTPUT', 'g'),block.topisto_outputs/Math.pow(10,8));
|
||||
html = html.replace(new RegExp('INPUT', 'g'),block.topisto_inputs/Math.pow(10,8));
|
||||
html = html.replace(new RegExp('REWARD', 'g'),(block.topisto_outputs-block.topisto_inputs)/Math.pow(10,8));
|
||||
html = html.replace(new RegExp('FEE', 'g'),block.topisto_fees/Math.pow(10,8));
|
||||
|
||||
$('#block0'+index+'_txt').html(html);
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
37
articles/20170301/header.html
Normal file
37
articles/20170301/header.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="container-fluid bg-grey">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<br><img id="logo_ARTICLE" src="images/block_image.php?methode=treemap" width="100%; height: auto"></img>
|
||||
<br><p>ARTICLE</p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<h2>Blockchain as a Treemap</h2>
|
||||
<h4 class="text-justify">Draw a Treemap where each rectangle is a transaction's inputs sum. Then add block's hashes on top and previous block's invert hash on bottom. This way we can draw the blockchain by putting images last's one above the others.</h4>
|
||||
<p>That way, we can "see" the Blockchain...</p>
|
||||
<p>You can choose an alternative drawing method.
|
||||
<select id="selectMethod_ARTICLE" onchange="javascript:DrawLastBlock_ARTICLE()">
|
||||
<option value=4>Random method</option>
|
||||
<option value=4>Gradient 2 random colors</option>
|
||||
<option value=1>Grey</option>
|
||||
<option value=2>Mondrian</option>
|
||||
<option value=3>Pink</option>
|
||||
<option value=0>Random colors</option>
|
||||
</select>
|
||||
</p>
|
||||
####BUTTON####
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function DrawLastBlock_ARTICLE()
|
||||
{
|
||||
var methode = $("#selectMethod_ARTICLE").val();
|
||||
var downloadingImage = new Image();
|
||||
downloadingImage.onload = function(){
|
||||
$('#logo_ARTICLE').attr('src', this.src);
|
||||
};
|
||||
$('#logo_ARTICLE').attr('src','images/loading.gif');
|
||||
downloadingImage.src='images/block_image.php?strict=1&methode=treemap&mode='+methode;
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user