fix route for status page. update all page with responsive support

This commit is contained in:
Gustavo Cortez 2014-01-27 18:13:32 -03:00
parent a40b87c4b6
commit c49021af9f
7 changed files with 218 additions and 213 deletions

View File

@ -7,6 +7,7 @@ module.exports = function(app, historicSync) {
app.get('/', index.render);
app.get('/blocks', index.render);
app.get('/status', index.render);
app.get('/blocks-date/*', index.render);
app.get('/block-index/*', index.render);
app.get('/block/*', index.render);

View File

@ -20,7 +20,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
/* Negative indent footer by its height */
margin: 0 auto -51px;
/* Pad bottom by footer height */
padding: 0 0 60px;
padding: 0 0 75px;
}
.m10h { margin: 0 10px; }
@ -134,14 +134,37 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
-webkit-border-radius: 5px;
background-color: #F4F4F4;
border-radius: 5px;
padding: 15px;
width: 267px;
padding: 14px;
}
.col-gray-responsive {
width: auto;
}
.col-gray-fixed {
position: fixed;
width: 250px;
}
@media (max-width: 768px) {
.col-gray-fixed {
width:100%;
}
}
@media (max-width: 995px) {
.col-gray-fixed {
position:static;
width: 100%;
}
}
@media (min-width: 1200px) {
.col-gray-fixed {
width: 280px;
}
}
.ellipsis {
display: block;
overflow: hidden;
@ -159,11 +182,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
margin: 10px 0;
}
.col-gray .address {
line-height: 20px;
width: 125px;
}
.block-id {
background-color: #373D42;
border: 3px solid #FFFFFF;
@ -197,7 +215,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
.btn {
border-radius: 2px;
margin: 0 5px;
}
.btn-primary {
background-color: #8DC429;
@ -213,7 +230,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
background-color: #fff;
border: 2px solid #ccc;
color: #373D42;
font-weight: 500;
}
.btn-default {
@ -231,8 +247,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
border: 2px solid #6C0000;
}
#status .table { margin-bottom: 45px; }
.progress-bar-info { background-color: #8DC429; }
/* Set the fixed height of the footer here */

View File

@ -1,40 +1,39 @@
<section data-ng-controller="AddressController" data-ng-init="findOne()">
<div class="row">
<div class="col-md-3">
<div class="bs-sidebar hidden-print affix col-gray">
<div class="text-center m20v">
<qrcode size="160" data="{{address.addrStr}}"></qrcode>
<div class="m10v">
<button class="pull-right btn-copy" clip-copy="address.addrStr"><span class="glyphicon glyphicon-paperclip"></span></button>
<a class="ellipsis" href="/address/{{address.addrStr}}">{{address.addrStr}}</a>
</div>
<div class="col-xs-12 col-gray col-gray-fixed">
<h1 class="text-center">Address</h1>
<div class="text-center">
<qrcode size="160" data="{{address.addrStr}}"></qrcode>
<div class="m10v">
<button class="pull-right btn-copy" clip-copy="address.addrStr"><span class="glyphicon glyphicon-paperclip"></span></button>
<a class="ellipsis" href="/address/{{address.addrStr}}">{{address.addrStr}}</a>
</div>
<div class="m20v">
<h4>Summary</h4>
<table class="table">
<tbody>
<tr>
<td class="small">Total Received</td>
<td class="address ellipsis text-right">{{address.totalReceived}} BTC</td>
</tr>
<tr>
<td class="small">Total Sent</td>
<td class="address ellipsis text-right">{{address.totalSent}} BTC</td>
</tr>
<tr>
<td class="small">Final Balance</td>
<td class="address ellipsis text-right">{{address.balance}} BTC</td>
</tr>
<tr>
<td class="small">No. Transactions</td>
<td class="address ellipsis text-right">{{address.txApperances}}</td>
</tr>
</tbody>
</table>
</div> <!-- END OF TRANSACTIONS TABLE -->
</div>
<div class="m20v">
<h4>Summary</h4>
<table class="table">
<tbody>
<tr>
<td class="small">Total Received</td>
<td class="address ellipsis text-right">{{address.totalReceived}} BTC</td>
</tr>
<tr>
<td class="small">Total Sent</td>
<td class="address ellipsis text-right">{{address.totalSent}} BTC</td>
</tr>
<tr>
<td class="small">Final Balance</td>
<td class="address ellipsis text-right">{{address.balance}} BTC</td>
</tr>
<tr>
<td class="small">No. Transactions</td>
<td class="address ellipsis text-right">{{address.txApperances}}</td>
</tr>
</tbody>
</table>
</div> <!-- END OF TRANSACTIONS TABLE -->
</div> <!-- END OF COL-MD-3 -->
<div class="col-md-9">
<div class="col-xs-12 col-md-9 col-md-offset-3">
<div data-ng-controller="transactionsController" data-ng-init="load('address')">
<h2>Transactions <small>Transactions for this address</small></h2>
<div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div>

View File

@ -1,42 +1,39 @@
<section data-ng-controller="BlocksController" data-ng-init="findOne()">
<div class="row">
<div class="col-md-3">
<div class="bs-sidebar affix col-gray">
<div class="block-id">
<div class="icon-block text-center">
<span class="glyphicon glyphicon-list-alt"></span>
</div>
<h3 data-ng-if="block">Block #{{ block.height }}</h3>
<div class="col-xs-12 col-gray col-gray-fixed">
<div class="block-id">
<div class="icon-block text-center">
<span class="glyphicon glyphicon-list-alt"></span>
</div>
<div class="m50v" data-ng-show="!tx.isCoinBase">
<h4>Hashes</h4>
<table class="table">
<tbody>
<tr>
<td class="small"> Hash </td>
<td><a class="address ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a></td>
</tr>
<tr>
<td class="small"> Previous Block</td>
<td><a class="address ellipsis" href="/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
</tr>
<tr>
<td class="small"> Next Block</td>
<td><a class="address ellipsis" href="/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
</tr>
<tr>
<td class="small">Merkle Root</td>
<td> <p class="address ellipsis"> {{block.merkleroot}} </p> </td>
</tr>
</tbody>
</table>
</div> <!-- END OF TRANSACTIONS TABLE -->
<h3 data-ng-if="block">Block #{{ block.height }}</h3>
</div>
<div class="m50v" data-ng-show="!tx.isCoinBase">
<h4>Hashes</h4>
<table class="table" style="table-layout: fixed">
<tbody>
<tr>
<td class="small"> Hash </td>
<td><a class="address ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a></td>
</tr>
<tr>
<td class="small"> Previous Block</td>
<td><a class="address ellipsis" href="/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
</tr>
<tr>
<td class="small"> Next Block</td>
<td><a class="address ellipsis" href="/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
</tr>
<tr>
<td class="small">Merkle Root</td>
<td> <p class="address ellipsis"> {{block.merkleroot}} </p> </td>
</tr>
</tbody>
</table>
</div> <!-- END OF TRANSACTIONS TABLE -->
</div> <!-- END OF COL-GRAY -->
<div class="col-md-9">
<h3>Summary</h3>
<div class="col-xs-12 col-md-9 col-md-offset-3">
<h2>Summary</h2>
<div class="row">
<div class="col-md-6">
<table class="table">

View File

@ -1,21 +1,19 @@
<section data-ng-controller="BlocksController" data-ng-init="list()">
<div class="row">
<div class="col-md-3">
<div class="bs-sidebar affix col-gray">
<div class="block-id">
<div class="icon-block text-center">
<span class="glyphicon glyphicon-list"></span>
<h3>Blocks <br> mined on:</h3>
</div>
</div>
<p class="lead text-center m20v">{{pagination.current}}</p>
<div class="m50v">
<a class="btn btn-primary" href="/blocks-date/{{pagination.prev}}"><small>&larr; {{pagination.prev}}</small></a>
<a class="btn btn-primary" href="/blocks-date/{{pagination.next}}" data-ng-disabled="pagination.isToday"><small>{{pagination.next}} &rarr;</small></a>
<div class="col-xs-12 col-gray col-gray-fixed">
<div class="block-id">
<div class="icon-block text-center">
<span class="glyphicon glyphicon-list"></span>
<h3>Blocks <br> mined on:</h3>
</div>
</div>
<p class="lead text-center m20v">{{pagination.current}}</p>
<div class="m50v text-center">
<a class="btn btn-primary" href="/blocks-date/{{pagination.prev}}"><small>&larr; {{pagination.prev}}</small></a>
<a class="btn btn-primary" href="/blocks-date/{{pagination.next}}" data-ng-disabled="pagination.isToday"><small>{{pagination.next}} &rarr;</small></a>
</div>
</div>
<div class="col-md-9">
<div class="col-xs-12 col-md-9 col-md-offset-3">
<div class="page-header">
<h1>
Blocks

View File

@ -35,57 +35,55 @@
<p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt tempora fugiat dolorem cupiditate perspiciatis praesentium.</p>
</div>
<div class="col-xs-12 col-md-4">
<div class="col-gray col-gray-responsive">
<h3>Latest Transactions</h3>
<div class="col-xs-12 col-md-4 col-gray">
<h3>Latest Transactions</h3>
<table class="table" style="table-layout: fixed">
<thead>
<tr>
<th>Hash</th>
<th>Age</th>
<th>Value Out</th>
</tr>
</thead>
<tbody>
<tr data-ng-show="!txs.length"><td colspan="5">Waiting for transactions...</td></tr>
<tr class="fader" data-ng-repeat='tx in txs'>
<td>
<a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
</td>
<td><span class="ellipsis">{{humanSince(tx.time)}}</span></td>
<td>{{tx.valueOut}}</td>
<table class="table" style="table-layout: fixed;">
<thead>
<tr>
<th>Hash</th>
<th>Age</th>
<th>Value Out</th>
</tr>
</tbody>
</table>
<h3> Other Bitcoin Links </h3>
<ul>
<li>
<a href="">Most Popular Addresses</a>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores.</small>
</li>
<li>
<a href="">Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
<li>
<a href="">Lorem ipsum dolor.</a>
<small> - Lorem ipsum dolor sit amet.</small>
</li>
<li>
<a href="">Most Popular Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
<li>
<a href="">Lorem ipsum dolor sit.</a>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing.</small>
</li>
<li>
<a href="">Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
</ul>
</div>
</thead>
<tbody>
<tr data-ng-show="!txs.length"><td colspan="5">Waiting for transactions...</td></tr>
<tr class="fader" data-ng-repeat='tx in txs'>
<td>
<a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
</td>
<td><span class="ellipsis">{{humanSince(tx.time)}}</span></td>
<td>{{tx.valueOut}}</td>
</tr>
</tbody>
</table>
<h3> Other Bitcoin Links </h3>
<ul>
<li>
<a href="">Most Popular Addresses</a>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores.</small>
</li>
<li>
<a href="">Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
<li>
<a href="">Lorem ipsum dolor.</a>
<small> - Lorem ipsum dolor sit amet.</small>
</li>
<li>
<a href="">Most Popular Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
<li>
<a href="">Lorem ipsum dolor sit.</a>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing.</small>
</li>
<li>
<a href="">Addresses</a>
<small> - Addresses which have received the most payments</small>
</li>
</ul>
</div> <!-- END OF COL-3 -->
</div>
</div>

View File

@ -5,8 +5,8 @@
</h1>
</div>
<div id="status" class="row">
<div class="col-md-9">
<div class="col-xs-12 col-md-8">
<h4>Sync Status</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getSync()">
<tbody>
@ -41,7 +41,7 @@
</table>
<h4>Transaction Output Set Information</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('TxOutSetInfo')">
<table class="table" style="table-layout: fixed" data-ng-controller="StatusController" data-ng-init="getStatus('TxOutSetInfo')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tbody>
<tr>
@ -50,7 +50,7 @@
</tr>
<tr>
<td>Best Block</td>
<td class="text-right"><a href="/block/{{txoutsetinfo.bestblock}}">{{txoutsetinfo.bestblock}}</a></td>
<td class="text-right ellipsis"><a href="/block/{{txoutsetinfo.bestblock}}">{{txoutsetinfo.bestblock}}</a></td>
</tr>
<tr>
<td>Transactions</td>
@ -66,7 +66,7 @@
</tr>
<tr>
<td>Hash Serialized</td>
<td class="text-right">{{txoutsetinfo.hash_serialized}}</td>
<td class="text-right ellipsis">{{txoutsetinfo.hash_serialized}}</td>
</tr>
<tr>
<td>Total Amount</td>
@ -76,85 +76,83 @@
</table>
<h4>Last Block</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('LastBlockHash')">
<table class="table" style="table-layout: fixed" data-ng-controller="StatusController" data-ng-init="getStatus('LastBlockHash')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tr>
<td>Last Block Hash</td>
<td class="text-right"><a href="/block/{{lastblockhash}}">{{lastblockhash}}</a></td>
<td class="text-right ellipsis"><a href="/block/{{lastblockhash}}">{{lastblockhash}}</a></td>
</tr>
</tbody>
</table>
</div> <!-- END OF COL-8 -->
<div class="col-md-3">
<div class="col-gray">
<h4>Bitcoin node information</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('Info')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tbody>
<tr>
<td>Version</td>
<td class="text-right">{{info.version}}</td>
</tr>
<tr>
<td>Protocol version</td>
<td class="text-right">{{info.protocolversion}}</td>
</tr>
<tr>
<td>Blocks</td>
<td class="text-right"><a href="/block-index/{{info.blocks}}">{{info.blocks}}</a></td>
</tr>
<tr>
<td>Time Offset</td>
<td class="text-right">{{info.timeoffset}}</td>
</tr>
<tr>
<td>Connections to other nodes</td>
<td class="text-right">{{info.connections}}</td>
</tr>
<tr>
<td>Proxy setting</td>
<td class="text-right">{{info.proxy}}</td>
</tr>
<tr>
<td>Mining Difficulty</td>
<td class="text-right">{{info.difficulty}}</td>
</tr>
<tr>
<td>Testnet</td>
<td class="text-right">{{info.testnet}}</td>
</tr>
<tr>
<td>Keypool Oldest Date</td>
<td class="text-right">{{info.keypoololdest*1000 | date:'medium' }}</td>
</tr>
<tr>
<td>Keypool Size</td>
<td class="text-right">{{info.keypoolsize}}</td>
</tr>
<tr>
<td>Default Transaction Fee (BTC)</td>
<td class="text-right">{{info.paytxfee}}</td>
</tr>
<tr>
<td>Info Errors</td>
<td class="text-right">{{info.infoErrors}}</td>
</tr>
</tbody>
</table>
<div class="col-xs-12 col-md-4 col-gray">
<h4>Bitcoin node information</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('Info')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tbody>
<tr>
<td>Version</td>
<td class="text-right">{{info.version}}</td>
</tr>
<tr>
<td>Protocol version</td>
<td class="text-right">{{info.protocolversion}}</td>
</tr>
<tr>
<td>Blocks</td>
<td class="text-right"><a href="/block-index/{{info.blocks}}">{{info.blocks}}</a></td>
</tr>
<tr>
<td>Time Offset</td>
<td class="text-right">{{info.timeoffset}}</td>
</tr>
<tr>
<td>Connections to other nodes</td>
<td class="text-right">{{info.connections}}</td>
</tr>
<tr>
<td>Proxy setting</td>
<td class="text-right">{{info.proxy}}</td>
</tr>
<tr>
<td>Mining Difficulty</td>
<td class="text-right">{{info.difficulty}}</td>
</tr>
<tr>
<td>Testnet</td>
<td class="text-right">{{info.testnet}}</td>
</tr>
<tr>
<td>Keypool Oldest Date</td>
<td class="text-right">{{info.keypoololdest*1000 | date:'medium' }}</td>
</tr>
<tr>
<td>Keypool Size</td>
<td class="text-right">{{info.keypoolsize}}</td>
</tr>
<tr>
<td>Default Transaction Fee (BTC)</td>
<td class="text-right">{{info.paytxfee}}</td>
</tr>
<tr>
<td>Info Errors</td>
<td class="text-right">{{info.infoErrors}}</td>
</tr>
</tbody>
</table>
<h4>Difficulty</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('Difficulty')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tbody
<tr>
<td>Mining Difficulty</td>
<td>{{difficulty}}</td>
</tr>
</tbody>
</table>
</div> <!-- END OF COL-GRAY -->
</div> <!-- END OF COL-3 -->
<h4>Difficulty</h4>
<table class="table" data-ng-controller="StatusController" data-ng-init="getStatus('Difficulty')">
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
<tbody
<tr>
<td>Mining Difficulty</td>
<td>{{difficulty}}</td>
</tr>
</tbody>
</table>
</div> <!-- END OF COL-GRAY -->
</div>
</section>