Selaa lähdekoodia

index est juste une liste des blocks

develop
MEUNIER Thibaud 6 vuotta sitten
vanhempi
commit
c0239d260e
4 muutettua tiedostoa jossa 477 lisäystä ja 295 poistoa
  1. +144
    -0
      about.php
  2. +67
    -80
      blog.php
  3. +246
    -0
      home.php
  4. +20
    -215
      index.php

+ 144
- 0
about.php Näytä tiedosto

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TOPISTO</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Bangers" rel="stylesheet" type="text/css">
<link href="css/topisto.css" rel="stylesheet" type="text/css">
<link href="css/fonts.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/console.js" defer></script>
<script src="js/lastblock.js" defer></script>
<script src="js/blockexplorer.js" defer></script>
<script>
$(document).ready(function(){
$('#myNavbar').on('show.bs.collapse', function () {
$('#logo_topisto').css({'height' : '30px','width' : '30px'});
$('#titre_topisto').css({'font-size' : '30px'});
});
$('#myNavbar').on('hidden.bs.collapse', function () {
$('#logo_topisto').css({'height' : '72px','width' : '72px'});
$('#titre_topisto').css({'font-size' : '60px'});
});
// Add smooth scrolling to all links in navbar + footer link
$("footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
d = new Date();
$("#gargoyle").attr("src", "images/logo.php?ts="+d.getTime());
});
});
});
</script>
</head>
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">
<img id="logo_topisto" src="images/topisto_vert.png" style="border-radius:6px;display:inline-block;height:72px;;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)">
<span id="titre_topisto" style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 60px;text-shadow: 2px 2px #ffffff">TOPISTO</span>
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
<li><a href="index.php">Explorer</a></li>
<li><a href="blog.php">Blog</a></li>
</ul>
</div>
</div>
</nav>
<div id="about" class="container-fluid">
<div class="row">
<div class="col-sm-8">
<br><br><br>
<h4>This site is a hobby.<br>It's also a testing place where i can do <a href="blog.php">things</a> that are impossible at work.</h4>
<p class="text-justify">I like <b>surfing</b> and sailing on the ocean. But during longs winter nights, computing is fun. I'm interested into <b>cryptocurrencies</b>, computationnal art, datavisualisation. I know that <b>42</b> is the answer to <b>the Life, Universe and Everything Else</b>. As <b>Eto Demerzel</b> said to me, the <b>Seldon's Plan</b> will save the Galaxy. My favorites books are the <b>House of leaves</b>, the <b>Necronomicron</b> and the <b>DarkHold</b>. I also know that <b>great power comes with great responsibility</b>. I'm still in <b>the search of Captain Zero</b>, because <b>the Truth is out there</b>.</p>
</div>
<div class="col-sm-4">
<img id="gargoyle" src="images/logo.php" alt="avatar dragon gargoyle" width="100%; height: auto"></img>
</div>
</div>
</div>
<div id="contact" class="container-fluid bg-grey">
<div class="row slideanim">
<div class="col-sm-4">
Bookmarks : <br>
<a href="http://inconvergent.net/" target="_blank">Inconvergent</a><br>
<a href="http://www.datasketch.es/" target="_blank">Data Sketches</a><br>
<a href="https://bit101.github.io/lab/dailies/170310.html" target="_blank">bit101-github</a><br>
<a href="http://www.imdb.com/title/tt1508021/" target="_blank">being captain zero</a><br>
</div>
<div class="col-sm-4">
<p>Contact me :</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Shambala</p>
<p><span class="glyphicon glyphicon-globe"></span> Employer : Mutiny</p>
<p><span class="glyphicon glyphicon-phone"></span> +33 4 8 15 16 23 42</p>
<p>
<span class="glyphicon glyphicon-envelope"></span>
<!--Place the code below where you want the link to be displayed-->
<span id="obf"><script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:nyoreg.frnaquvyf@gbcvfgb.arg?fhowrpg=pbagnpg\" gnetrg=\"_oynax\">nyoreg.frnaquvyf@gbcvfgb.arg</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});</script>
<noscript><span style="unicode-bidi:bidi-override;direction:rtl;">ten.otsipot@slihdnaes.trebla</span></noscript></span>
</p>
</div>
<div class="col-sm-4">
BTC adresss : <br>
<a href="https://www.blockchain.com/btc/address/15V7XfBX2Xn5uKpK3VuVngDg44TSKLtTSh">15V7XfBX2Xn5uKpK3VuVngDg44TSKLtTSh</a>
</div>
</div>
</div>
<footer class="container-fluid bg-white text-center">
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
</footer>
</body>
</html>

+ 67
- 80
blog.php Näytä tiedosto

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="fr">
<html lang="en">
<head>
<title>TOPISTO</title>
<meta charset="utf-8">
@ -17,6 +17,63 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/console.js" defer></script>
<script src="js/lastblock.js" defer></script>
<!--
-- From https://highlightjs.org
-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/atom-one-dark.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
$(document).ready(function(){
$('#myNavbar').on('show.bs.collapse', function () {
$('#logo_topisto').css({'height' : '30px','width' : '30px'});
$('#titre_topisto').css({'font-size' : '30px'});
});
$('#myNavbar').on('hidden.bs.collapse', function () {
$('#logo_topisto').css({'height' : '72px','width' : '72px'});
$('#titre_topisto').css({'font-size' : '60px'});
});
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
blockchainExplorer.ajouterPreviousBlock();
$(this).addClass("slide");
}
});
});
});
</script>
</head>
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
@ -28,32 +85,31 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">
<a class="navbar-brand" href="index.php">
<img id="logo_topisto" src="images/topisto_vert.png" style="border-radius:6px;display:inline-block;height:72px;;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)">
<span style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 70px;">TOPISTO</span>
<span id="titre_topisto" style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 60px;text-shadow: 2px 2px #ffffff">TOPISTO</span>
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="about.php">About</a></li>
<li><a href="index.php">Explorer</a></li>
<li><a href="#blog">Blog</a></li>
</ul>
</div>
</div>
</nav>
<div id="about" class="container-fluid">
<div id="blog" class="container-fluid bg-white" style="padding-top:50px;align:right">
<div class="row">
<div class="col-sm-12">
<br><br>
</div>
<div class="col-sm-12 text-right">&nbsp;</div>
</div>
</div>
<?php
$odd_even = 0;
$liste = '';
foreach (glob("articles/*/header.html") as $filename) {
foreach (glob("articles/20*/header.html") as $filename) {
$article = basename(dirname($filename));
$odd_even = 1 - $odd_even;
$header = file_get_contents($filename);
@ -62,7 +118,7 @@ foreach (glob("articles/*/header.html") as $filename) {
$header = str_replace('ARTICLE',$article,$header);
if (!file_exists('articles/'.$article.'/content.html'))
if (!file_exists('articles/'.$article.'/content.html'))
{
$header = str_replace('####BUTTON####','',$header);
} else {
@ -81,79 +137,10 @@ foreach (glob("articles/*/header.html") as $filename) {
echo $liste;
?>
<div id="contact" class="container-fluid bg-grey">
<h4 class="text-center">CONTACT</h4>
<div class="row slideanim">
<div class="col-sm-5">
<p>Contact me</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Shambala</p>
<p><span class="glyphicon glyphicon-globe"></span> Employer : Mutiny</p>
<p><span class="glyphicon glyphicon-phone"></span> +33 4 8 15 16 23 42</p>
<p>
<span class="glyphicon glyphicon-envelope"></span>
<!--Place the code below where you want the link to be displayed-->
<span id="obf"><script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:nyoreg.frnaquvyf@gbcvfgb.arg?fhowrpg=pbagnpg\" gnetrg=\"_oynax\">nyoreg.frnaquvyf@gbcvfgb.arg</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});</script>
<noscript><span style="unicode-bidi:bidi-override;direction:rtl;">ten.otsipot@slihdnaes.trebla</span></noscript></span>
</p>
</div>
<div class="col-sm-5">
bookmarks : <br>
<a href="http://inconvergent.net/" target="_blank">Inconvergent</a><br>
<a href="http://www.datasketch.es/" target="_blank">Data Sketches</a><br>
<a href="https://bit101.github.io/lab/dailies/170310.html" target="_blank">bit101-github</a><br>
<a href="http://www.beingcaptainzero.com/" target="_blank">being captain zero</a><br>
</div>
<div class="col-sm-2">
PGP : <br>
<a href="page.php?id=00000000"><img src="articles/00000000/public_key_qrcode.png" width="100%; height: auto"></img></a>
</div>
</div>
</div>
<footer class="container-fluid bg-grey text-center">
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<p>Bootstrap Theme Made By <a href="https://www.w3schools.com" title="Visit w3schools">www.w3schools.com</a></p>
</footer>
<script>
$(document).ready(function(){
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
// if (winTop < 400) $('#logo_topisto').css('visibility', 'hidden');
// else $('#logo_topisto').css('visibility', 'visible');
});
});
})
</script>
</body>
</html>

+ 246
- 0
home.php Näytä tiedosto

@ -0,0 +1,246 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>TOPISTO</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Bangers" rel="stylesheet" type="text/css">
<link href="css/topisto.css" rel="stylesheet" type="text/css">
<link href="css/fonts.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/console.js" defer></script>
<script src="js/lastblock.js" defer></script>
<script src="js/blockexplorer.js" defer></script>
<!--
-- From https://highlightjs.org
-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/atom-one-dark.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
$(document).ready(function(){
// tooltips activation
$('[data-toggle="tooltip"]').tooltip();
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
if (winTop < 400) $('#logo_topisto').css('visibility', 'hidden');
else {
d = new Date();
$("#gargoyle").attr("src", "images/logo.php?ts="+d.getTime());
$('#logo_topisto').css('visibility', 'visible');
}
});
});
});
</script>
</head>
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">
<img id="logo_topisto" src="images/topisto_vert.png" style="border-radius:6px;display:inline-block;visibility:hidden;height:72px;;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)">
<span style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 60px;text-shadow: 2px 2px #ffffff">TOPISTO</span>
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
<li><a href="#explorer">Explorer</a></li>
<li><a href="blog.php">Blog</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div id="about" class="container-fluid">
<div class="row">
<div class="col-sm-8">
<br><br><br>
<h4>This site is a hobby.<br>It's also a testing place where i can do <a href="#blog">things</a> that are impossible at work.</h4>
<p class="text-justify">I like <b>surfing</b> and sailing on the ocean. But during longs winter nights, computing is fun. I'm interested into <b>cryptocurrencies</b>, computationnal art, datavisualisation. I know that <b>42</b> is the answer to <b>the Life, Universe and Everything Else</b>. As <b>Eto Demerzel</b> said to me, the <b>Seldon's Plan</b> will save the Galaxy. My favorites books are the <b>House of leaves</b>, the <b>Necronomicron</b> and the <b>DarkHold</b>. I also know that <b>great power comes with great responsibility</b>. I'm still in <b>the search of Captain Zero</b>, because <b>the Truth is out there</b>.</p>
</div>
<div class="col-sm-4">
<img id="gargoyle" src="images/logo.php" alt="avatar dragon gargoyle" width="100%; height: auto"></img>
</div>
</div>
</div>
<script>
var lastBlockTime = null;
function changeExploreBlock()
{
$('#img_explorer').attr('src', 'images/loading.gif');
block_name = $('#blockSelector').val();
block_url = 'data/getBlockInfo.php';
if (block_name != 'LAST') block_url += '?block_hash='+blockchainExplorer.getblocHashFromName(block_name);
$.getJSON(block_url, function( data ) {
changeExploreBlockDrawing(data);
});
}
function changeExploreBlockDrawing(le_block)
{
var downloadingImage = new Image();
downloadingImage.onload = function(){
$('#img_explorer').attr('src', this.src);
};
downloadingImage.src = 'images/block_image.php?methode=hasard&hash='+le_block.hash;
lastBlockTime = le_block.time;
topistoConsole.log('Time last block : '+lastBlockTime);
compteurTemps();
}
function formatNumber(myNumber, digits)
{
return ('0' + myNumber).slice(-1*digits);
}
function getBlockDate(str_date)
{
return new Date(
str_date.slice(0,4),
str_date.slice(5,7)-1,
str_date.slice(8,10),
str_date.slice(11,13),
str_date.slice(14,16),
str_date.slice(17,19)
);
}
function compteurTemps()
{
if (lastBlockTime == null) return false;
var d1 = getBlockDate(lastBlockTime);
var d2 = new Date();
var msec = d2 - d1;
var yyyy = Math.floor(msec / 365 / 24 / 1000 / 60 / 60);
msec -= yyyy * 365 * 24 * 1000 * 60 * 60;
var jj = Math.floor(msec / 24 / 1000 / 60 / 60);
msec -= jj * 24 * 1000 * 60 * 60;
var hh = formatNumber(Math.floor(msec / 1000 / 60 / 60),2);
msec -= hh * 1000 * 60 * 60;
var mm = formatNumber(Math.floor(msec / 1000 / 60),2);
msec -= mm * 1000 * 60;
var ss = formatNumber(Math.floor(msec / 1000),2);
msec -= ss * 1000;
var libel = 'Elapsed Time since that block : ';
if (yyyy > 0) libel += yyyy+' year(s) ';
if (jj > 0) libel += jj+' day(s) ';
if (hh > 0) libel += hh+' hour(s) ';
if (mm > 0) libel += mm+ ' min ';
libel += ss+' s';
$('#showElapsedTime').html(libel);
return true;
}
$(document).ready(function(){
blockchainListener.addBlockHook(changeExploreBlockDrawing);
setInterval(compteurTemps, 1000);
});
</script>
<div id="explorer" class="container-fluid bg-grey" style="padding-top:10px">
<div class="row">
<div class="col-sm-12">&nbsp;</div>
</div>
</div>
<div class="container-fluid bg-grey" style="padding-top:0px;padding-bottom:10px">
<div class="row">
<div class="col-sm-4">
<br><img id="img_explorer" src="images/loading.gif" width="100%; height: auto">
</div>
<div class="col-sm-8">
<br>
<h2>Explore the Bitcoin's Blockchain</h2>
<h4>This is a drawing of the <select id="blockSelector" onchange="javascript:changeExploreBlock()"><option selected value="LAST">LAST</option></select> block of the Bitcoin's Blockchain.</h4>
<div id="showElapsedTime">&nbsp;</div><br><a href="explorer.php">Click here to see the other blocks</a>
</div>
</div>
</div>
<div id="contact" class="container-fluid bg-grey">
<h4 class="text-center">CONTACT</h4>
<div class="row slideanim">
<div class="col-sm-5">
<p>Contact me</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Shambala</p>
<p><span class="glyphicon glyphicon-globe"></span> Employer : Mutiny</p>
<p><span class="glyphicon glyphicon-phone"></span> +33 4 8 15 16 23 42</p>
<p>
<span class="glyphicon glyphicon-envelope"></span>
<!--Place the code below where you want the link to be displayed-->
<span id="obf"><script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:nyoreg.frnaquvyf@gbcvfgb.arg?fhowrpg=pbagnpg\" gnetrg=\"_oynax\">nyoreg.frnaquvyf@gbcvfgb.arg</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});</script>
<noscript><span style="unicode-bidi:bidi-override;direction:rtl;">ten.otsipot@slihdnaes.trebla</span></noscript></span>
</p>
</div>
<div class="col-sm-5">
bookmarks : <br>
<a href="http://inconvergent.net/" target="_blank">Inconvergent</a><br>
<a href="http://www.datasketch.es/" target="_blank">Data Sketches</a><br>
<a href="https://bit101.github.io/lab/dailies/170310.html" target="_blank">bit101-github</a><br>
<a href="http://www.imdb.com/title/tt1508021/" target="_blank">being captain zero</a><br>
</div>
<div class="col-sm-2">
PGP : <br>
<a href="page.php?id=00000000"><img src="articles/00000000/public_key_qrcode.png" width="100%; height: auto"></img></a>
</div>
</div>
</div>
<footer class="container-fluid bg-grey text-center">
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<p>Bootstrap Theme Made By <a href="https://www.w3schools.com" title="Visit w3schools">www.w3schools.com</a></p>
</footer>
</body>
</html>

+ 20
- 215
index.php Näytä tiedosto

@ -17,62 +17,31 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/console.js" defer></script>
<script src="js/lastblock.js" defer></script>
<script src="js/blockexplorer.js" defer></script>
<!--
-- From https://highlightjs.org
-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/atom-one-dark.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
$(document).ready(function(){
// tooltips activation
$('[data-toggle="tooltip"]').tooltip();
// Add smooth scrolling to all links in navbar + footer link
$(".navbar a, footer a[href='#myPage']").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 900, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
$('#myNavbar').on('show.bs.collapse', function () {
$('#logo_topisto').css({'height' : '30px','width' : '30px'});
$('#titre_topisto').css({'font-size' : '30px'});
});
$('#myNavbar').on('hidden.bs.collapse', function () {
$('#logo_topisto').css({'height' : '72px','width' : '72px'});
$('#titre_topisto').css({'font-size' : '60px'});
});
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
blockchainExplorer.ajouterPreviousBlock();
$(this).addClass("slide");
}
if (winTop < 400) $('#logo_topisto').css('visibility', 'hidden');
else {
d = new Date();
$("#gargoyle").attr("src", "images/logo.php?ts="+d.getTime());
$('#logo_topisto').css('visibility', 'visible');
}
});
});
});
});
</script>
</head>
@ -86,199 +55,35 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">
<img id="logo_topisto" src="images/topisto_vert.png" style="border-radius:6px;display:inline-block;visibility:hidden;height:72px;;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)">
<span style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 60px;text-shadow: 2px 2px #ffffff">TOPISTO</span>
<a class="navbar-brand" href="index.php">
<img id="logo_topisto" src="images/topisto_vert.png" style="border-radius:6px;display:inline-block;height:72px;;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)">
<span id="titre_topisto" style="vertical-align:text-bottom;display:inline-block;color:black;font-family: Bangers, sans-serif;font-size: 60px;text-shadow: 2px 2px #ffffff">TOPISTO</span>
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
<li><a href="about.php">About</a></li>
<li><a href="#explorer">Explorer</a></li>
<li><a href="#blog">Blog</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="blog.php">Blog</a></li>
</ul>
</div>
</div>
</nav>
<div id="about" class="container-fluid">
<div class="row">
<div class="col-sm-8">
<br><br><br>
<h4>This site is a hobby.<br>It's also a testing place where i can do <a href="#blog">things</a> that are impossible at work.</h4>
<p class="text-justify">I like <b>surfing</b> and sailing on the ocean. But during longs winter nights, computing is fun. I'm interesting into <b>cryptocurrencies</b>, computationnal art, datavisualisation. I know that <b>42</b> is the answer to <b>the Life, Universe and Everything Else</b>. As <b>Eto Demerzel</b> said to me, the <b>Seldon's Plan</b> will save the Galaxy. My favorites books are the <b>House of leaves</b>, the <b>Necronomicron</b> and the <b>DarkHold</b>. I also know that <b>great power comes with great responsibility</b>. I'm still in <b>the search of Captain Zero</b>, because <b>the Truth is out there</b>.</p>
</div>
<div class="col-sm-4">
<img id="gargoyle" src="images/logo.php" alt="avatar dragon gargoyle" width="100%; height: auto"></img>
</div>
</div>
</div>
<script>
var lastBlockTime = null;
function changeExploreBlock()
{
$('#img_explorer').attr('src', 'images/loading.gif');
block_name = $('#blockSelector').val();
block_url = 'data/getBlockInfo.php';
if (block_name != 'LAST') block_url += '?block_hash='+blockchainExplorer.getblocHashFromName(block_name);
$.getJSON(block_url, function( data ) {
changeExploreBlockDrawing(data);
});
}
function changeExploreBlockDrawing(le_block)
{
var downloadingImage = new Image();
downloadingImage.onload = function(){
$('#img_explorer').attr('src', this.src);
};
downloadingImage.src = 'images/block_image.php?methode=hasard&hash='+le_block.hash;
lastBlockTime = le_block.time;
topistoConsole.log('Time last block : '+lastBlockTime);
compteurTemps();
}
function formatNumber(myNumber, digits)
{
return ('0' + myNumber).slice(-1*digits);
}
function getBlockDate(str_date)
{
return new Date(
str_date.slice(0,4),
str_date.slice(5,7)-1,
str_date.slice(8,10),
str_date.slice(11,13),
str_date.slice(14,16),
str_date.slice(17,19)
);
}
function compteurTemps()
{
if (lastBlockTime == null) return false;
var d1 = getBlockDate(lastBlockTime);
var d2 = new Date();
var msec = d2 - d1;
var yyyy = Math.floor(msec / 365 / 24 / 1000 / 60 / 60);
msec -= yyyy * 365 * 24 * 1000 * 60 * 60;
var jj = Math.floor(msec / 24 / 1000 / 60 / 60);
msec -= jj * 24 * 1000 * 60 * 60;
var hh = formatNumber(Math.floor(msec / 1000 / 60 / 60),2);
msec -= hh * 1000 * 60 * 60;
var mm = formatNumber(Math.floor(msec / 1000 / 60),2);
msec -= mm * 1000 * 60;
var ss = formatNumber(Math.floor(msec / 1000),2);
msec -= ss * 1000;
var libel = 'Elapsed Time since that block : ';
if (yyyy > 0) libel += yyyy+' year(s) ';
if (jj > 0) libel += jj+' day(s) ';
if (hh > 0) libel += hh+' hour(s) ';
if (mm > 0) libel += mm+ ' min ';
libel += ss+' s';
$('#showElapsedTime').html(libel);
return true;
}
$(document).ready(function(){
blockchainListener.addBlockHook(changeExploreBlockDrawing);
setInterval(compteurTemps, 1000);
});
</script>
<div id="explorer" class="container-fluid bg-grey" style="padding-top:10px">
<div class="row">
<div class="col-sm-12">&nbsp;</div>
</div>
</div>
<div class="container-fluid bg-grey" style="padding-top:0px;padding-bottom:10px">
<div id="explorer" class="container-fluid bg-grey" style="padding-bottom:10px">
<div class="row">
<div class="col-sm-4">
<br><img id="img_explorer" src="images/loading.gif" width="100%; height: auto">
<div class="col-sm-12 text-right">
<br>A BTC blockchain explorer<br>Scroll down to see the previous blocks<br>
</div>
<div class="col-sm-8">
<br>
<h2>Explore the Bitcoin's Blockchain</h2>
<h4>This is a drawing of the <select id="blockSelector" onchange="javascript:changeExploreBlock()"><option selected value="LAST">LAST</option></select> block of the Bitcoin's Blockchain.</h4>
<div id="showElapsedTime">&nbsp;</div><br><a href="explorer.php">Click here to see the other blocks</a>
</div>
</div>
</div>
<div id="blog" class="container-fluid bg-white" style="padding-top:50px;align:right">
<div class="row">
<div class="col-sm-4">&nbsp;</div>
<div class="col-sm-8 text-right"><h2>Blog</h2></div>
</div>
</div>
<?php
$odd_even = 0;
$liste = '';
foreach (glob("articles/20*/header.html") as $filename) {
$article = basename(dirname($filename));
$odd_even = 1 - $odd_even;
$header = file_get_contents($filename);
if ($odd_even == 0) $header = str_replace('bg-grey','bg-grey-odd',$header);
else $header = str_replace('bg-grey','bg-grey-even',$header);
$header = str_replace('ARTICLE',$article,$header);
if (!file_exists('articles/'.$article.'/content.html'))
{
$header = str_replace('####BUTTON####','',$header);
} else {
echo '<script>';
echo '$(document).ready(function(){';
echo ' $("#'.$article.'_button").on("click", function(event) {';
echo ' window.location="page.php?id='.$article.'"';
echo ' })';
echo '})';
echo '</script>';
$header = str_replace('####BUTTON####','<button id="'.$article.'_button" class="btn btn-default btn-lg float-left">See more</button>',$header);
}
$liste = $header.PHP_EOL.$liste;
}
echo $liste;
?>
<div id="contact" class="container-fluid bg-grey">
<h4 class="text-center">CONTACT</h4>
<div class="row slideanim">
<div class="col-sm-5">
<p>Contact me</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Shambala</p>
<p><span class="glyphicon glyphicon-globe"></span> Employer : Mutiny</p>
<p><span class="glyphicon glyphicon-phone"></span> +33 4 8 15 16 23 42</p>
<p>
<span class="glyphicon glyphicon-envelope"></span>
<!--Place the code below where you want the link to be displayed-->
<span id="obf"><script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:nyoreg.frnaquvyf@gbcvfgb.arg?fhowrpg=pbagnpg\" gnetrg=\"_oynax\">nyoreg.frnaquvyf@gbcvfgb.arg</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});</script>
<noscript><span style="unicode-bidi:bidi-override;direction:rtl;">ten.otsipot@slihdnaes.trebla</span></noscript></span>
</p>
</div>
<div class="col-sm-5">
bookmarks : <br>
<a href="http://inconvergent.net/" target="_blank">Inconvergent</a><br>
<a href="http://www.datasketch.es/" target="_blank">Data Sketches</a><br>
<a href="https://bit101.github.io/lab/dailies/170310.html" target="_blank">bit101-github</a><br>
<a href="http://www.imdb.com/title/tt1508021/" target="_blank">being captain zero</a><br>
</div>
<div class="col-sm-2">
PGP : <br>
<a href="page.php?id=00000000"><img src="articles/00000000/public_key_qrcode.png" width="100%; height: auto"></img></a>
</div>
</div>
</div>
<div id="blockchain"></div>
<footer class="container-fluid bg-grey text-center">
<footer class="container-fluid bg-grey text-center slideanim">
<a href="#myPage" title="To Top">
<span class="glyphicon glyphicon-chevron-up"></span>
</a>
<p>Bootstrap Theme Made By <a href="https://www.w3schools.com" title="Visit w3schools">www.w3schools.com</a></p>
</footer>
</body>
</html>

Ladataan…
Peruuta
Tallenna