Merge pull request #162 from cmgustavo/feature/01responsive-all-pages

fix route for status page. update all page with responsive support
This commit is contained in:
Mario Colque 2014-01-27 13:51:07 -08:00
commit 9d4052f096
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('/', index.render);
app.get('/blocks', index.render); app.get('/blocks', index.render);
app.get('/status', index.render);
app.get('/blocks-date/*', index.render); app.get('/blocks-date/*', index.render);
app.get('/block-index/*', index.render); app.get('/block-index/*', index.render);
app.get('/block/*', 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 */ /* Negative indent footer by its height */
margin: 0 auto -51px; margin: 0 auto -51px;
/* Pad bottom by footer height */ /* Pad bottom by footer height */
padding: 0 0 60px; padding: 0 0 75px;
} }
.m10h { margin: 0 10px; } .m10h { margin: 0 10px; }
@ -134,14 +134,37 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
background-color: #F4F4F4; background-color: #F4F4F4;
border-radius: 5px; border-radius: 5px;
padding: 15px; padding: 14px;
width: 267px;
} }
.col-gray-responsive { .col-gray-responsive {
width: auto; 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 { .ellipsis {
display: block; display: block;
overflow: hidden; overflow: hidden;
@ -159,11 +182,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
margin: 10px 0; margin: 10px 0;
} }
.col-gray .address {
line-height: 20px;
width: 125px;
}
.block-id { .block-id {
background-color: #373D42; background-color: #373D42;
border: 3px solid #FFFFFF; border: 3px solid #FFFFFF;
@ -197,7 +215,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
.btn { .btn {
border-radius: 2px; border-radius: 2px;
margin: 0 5px;
} }
.btn-primary { .btn-primary {
background-color: #8DC429; background-color: #8DC429;
@ -213,7 +230,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
background-color: #fff; background-color: #fff;
border: 2px solid #ccc; border: 2px solid #ccc;
color: #373D42; color: #373D42;
font-weight: 500;
} }
.btn-default { .btn-default {
@ -231,8 +247,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
border: 2px solid #6C0000; border: 2px solid #6C0000;
} }
#status .table { margin-bottom: 45px; }
.progress-bar-info { background-color: #8DC429; } .progress-bar-info { background-color: #8DC429; }
/* Set the fixed height of the footer here */ /* Set the fixed height of the footer here */

View File

@ -1,40 +1,39 @@
<section data-ng-controller="AddressController" data-ng-init="findOne()"> <section data-ng-controller="AddressController" data-ng-init="findOne()">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-xs-12 col-gray col-gray-fixed">
<div class="bs-sidebar hidden-print affix col-gray"> <h1 class="text-center">Address</h1>
<div class="text-center m20v"> <div class="text-center">
<qrcode size="160" data="{{address.addrStr}}"></qrcode> <qrcode size="160" data="{{address.addrStr}}"></qrcode>
<div class="m10v"> <div class="m10v">
<button class="pull-right btn-copy" clip-copy="address.addrStr"><span class="glyphicon glyphicon-paperclip"></span></button> <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> <a class="ellipsis" href="/address/{{address.addrStr}}">{{address.addrStr}}</a>
</div>
</div> </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>
<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> <!-- 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')"> <div data-ng-controller="transactionsController" data-ng-init="load('address')">
<h2>Transactions <small>Transactions for this address</small></h2> <h2>Transactions <small>Transactions for this address</small></h2>
<div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div> <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()"> <section data-ng-controller="BlocksController" data-ng-init="findOne()">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-xs-12 col-gray col-gray-fixed">
<div class="bs-sidebar affix col-gray"> <div class="block-id">
<div class="block-id"> <div class="icon-block text-center">
<div class="icon-block text-center"> <span class="glyphicon glyphicon-list-alt"></span>
<span class="glyphicon glyphicon-list-alt"></span>
</div>
<h3 data-ng-if="block">Block #{{ block.height }}</h3>
</div> </div>
<div class="m50v" data-ng-show="!tx.isCoinBase"> <h3 data-ng-if="block">Block #{{ block.height }}</h3>
<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 -->
</div> </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> <!-- END OF COL-GRAY -->
<div class="col-md-9"> <div class="col-xs-12 col-md-9 col-md-offset-3">
<h3>Summary</h3> <h2>Summary</h2>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<table class="table"> <table class="table">

View File

@ -1,21 +1,19 @@
<section data-ng-controller="BlocksController" data-ng-init="list()"> <section data-ng-controller="BlocksController" data-ng-init="list()">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-xs-12 col-gray col-gray-fixed">
<div class="bs-sidebar affix col-gray"> <div class="block-id">
<div class="block-id"> <div class="icon-block text-center">
<div class="icon-block text-center"> <span class="glyphicon glyphicon-list"></span>
<span class="glyphicon glyphicon-list"></span> <h3>Blocks <br> mined on:</h3>
<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> </div>
</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>
<div class="col-md-9"> <div class="col-xs-12 col-md-9 col-md-offset-3">
<div class="page-header"> <div class="page-header">
<h1> <h1>
Blocks 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> <p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt tempora fugiat dolorem cupiditate perspiciatis praesentium.</p>
</div> </div>
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 col-gray">
<div class="col-gray col-gray-responsive"> <h3>Latest Transactions</h3>
<h3>Latest Transactions</h3>
<table class="table" style="table-layout: fixed"> <table class="table" style="table-layout: fixed;">
<thead> <thead>
<tr> <tr>
<th>Hash</th> <th>Hash</th>
<th>Age</th> <th>Age</th>
<th>Value Out</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>
</tr> </tr>
</tbody> </thead>
</table> <tbody>
<h3> Other Bitcoin Links </h3> <tr data-ng-show="!txs.length"><td colspan="5">Waiting for transactions...</td></tr>
<ul> <tr class="fader" data-ng-repeat='tx in txs'>
<li> <td>
<a href="">Most Popular Addresses</a> <a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores.</small> </td>
</li> <td><span class="ellipsis">{{humanSince(tx.time)}}</span></td>
<li> <td>{{tx.valueOut}}</td>
<a href="">Addresses</a> </tr>
<small> - Addresses which have received the most payments</small> </tbody>
</li> </table>
<li> <h3> Other Bitcoin Links </h3>
<a href="">Lorem ipsum dolor.</a> <ul>
<small> - Lorem ipsum dolor sit amet.</small> <li>
</li> <a href="">Most Popular Addresses</a>
<li> <small> - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores.</small>
<a href="">Most Popular Addresses</a> </li>
<small> - Addresses which have received the most payments</small> <li>
</li> <a href="">Addresses</a>
<li> <small> - Addresses which have received the most payments</small>
<a href="">Lorem ipsum dolor sit.</a> </li>
<small> - Lorem ipsum dolor sit amet, consectetur adipisicing.</small> <li>
</li> <a href="">Lorem ipsum dolor.</a>
<li> <small> - Lorem ipsum dolor sit amet.</small>
<a href="">Addresses</a> </li>
<small> - Addresses which have received the most payments</small> <li>
</li> <a href="">Most Popular Addresses</a>
</ul> <small> - Addresses which have received the most payments</small>
</div> </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> <!-- END OF COL-3 -->
</div> </div>
</div> </div>

View File

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