From b86f199c56580b60dd07cb6b4ed422bbd0005209 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 13:42:47 -0300 Subject: [PATCH 1/6] fix layout of transaction page. fix icons expand and copy/paste --- public/src/css/common.css | 35 ++++++++------ public/views/transaction.html | 83 +++++++++++++------------------- public/views/transaction/tx.html | 46 +++++++++--------- 3 files changed, 74 insertions(+), 90 deletions(-) diff --git a/public/src/css/common.css b/public/src/css/common.css index d93ad04d29d..5d8c46a1d6a 100644 --- a/public/src/css/common.css +++ b/public/src/css/common.css @@ -71,6 +71,10 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .vm { vertical-align: middle; } +.bgwhite { + background-color: white; +} + .btn-group .btn+.btn, .btn-group .btn+.btn-group, .btn-group .btn-group+.btn, .btn-group .btn-group+.btn-group { margin-left: 0; } @@ -511,38 +515,37 @@ margin-left: 0; color: black; } -.btn-copy, .btn-expand { - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - background-color: #FFFFFF; - border-radius: 2px; - border: 2px solid #E4E4E4; +.btn-copy { color: #9b9b9b; display: inline-block; - height: 25px; - padding: 0; + height: 16px; + width: 16px; outline: none; - text-align: center; - width: 30px; + vertical-align: sub; +} + +.btn-expand { + color: #9b9b9b; + vertical-align: middle; } .btn-copy:hover, .btn-expand:hover { - background-color: #f2f2f2; + color: #000; + text-decoration: none; } .btn-copy { - background: #fff url('/img/icons/copy.png') center center no-repeat; - margin-left: 5px; + background: transparent url('/img/icons/copy.png') center center no-repeat; } + .btn-copy .tooltip { - display: inline-block; - margin-left: 10px; + display: block; + margin-left: 20px; margin-top: -2px; opacity: 0; } .btn-copy.zeroclipboard-is-hover { color: #2a6496; } .btn-copy.zeroclipboard-is-active .tooltip { opacity: 1; } -.btn-expand { margin-right: 5px; } @media (max-width: 991px) { .btn-copy { diff --git a/public/views/transaction.html b/public/views/transaction.html index c0cf9bbddf0..587e3942aa2 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -1,61 +1,44 @@
- -
-
-
- Loading Transaction... -
-
-
- -
-
- - -
-

Summary

- - - - - - - - - - - - - - - - - - -
Size {{tx.size}} (bytes)
Received Time {{tx.firstSeenTs * 1000|date:'medium'}}N/A
Mined Time {{tx.time * 1000|date:'medium'}}N/A
-
-
-
-
-

Transaction +
+

Transaction Input Output - {{v_index}} + {{v_index}} -

-
-
- Loading Transaction Details... -
-
-
-
+

+
+ {{tx.txid}} + +
+
+
+ Loading Transaction Details...
+

Summary

+ + + + + + + + + + + + + + + + + +
Size {{tx.size}} (bytes)
Received Time {{tx.firstSeenTs * 1000|date:'medium'}}N/A
Mined Time {{tx.time * 1000|date:'medium'}}N/A
+
+
+
diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index 81a0bdc7311..f3812057d8b 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -1,19 +1,22 @@
- -
- first seen at - -
-
- mined at - +
+
+ first seen at + +
+
+ mined at + +
@@ -31,7 +34,7 @@
-

{{$root.currency.getConvertion(vin.value)}}

+

{{$root.currency.getConvertion(vin.value) || vin.value + ' BTC'}}

{{vin.addr}} {{vin.addr}} @@ -56,7 +59,7 @@ show all
-

{{$root.currency.getConvertion(vin.value)}}

+

{{$root.currency.getConvertion(vin.value) || vin.value + ' BTC'}}

   {{vin.addr}} @@ -104,7 +107,7 @@

- {{$root.currency.getConvertion(vout.value)}} + {{$root.currency.getConvertion(vout.value) || vout.value + ' BTC' }} (S) (U)

@@ -130,7 +133,7 @@
-

{{$root.currency.getConvertion(vout.value)}} +

{{$root.currency.getConvertion(vout.value) || vout.value + ' BTC'}} (U)   

@@ -165,23 +168,18 @@
-
-
- - BlockHash - {{tx.blockhash}} - - -
+
+ BlockHash {{tx.blockhash}} +
- Fees: {{$root.currency.getConvertion(tx.fees)}} + Fees: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'BTC'}}
{{tx.confirmations}} Confirmations Unconfirmed Transaction! - {{$root.currency.getConvertion(tx.valueOut)}} + {{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }}
From 4b100f0026b82a1861dfb299896f52f38a0353f5 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 14:50:59 -0300 Subject: [PATCH 2/6] txpages:w subtitle for details of transaction --- public/views/transaction.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/views/transaction.html b/public/views/transaction.html index 587e3942aa2..7ec88bca7e1 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -9,6 +9,7 @@

Transaction

+ ID {{tx.txid}}
@@ -36,6 +37,7 @@

Summary

+

Details

From 1f2d0a915607f7699725354705a6099904b9faa6 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 15:20:28 -0300 Subject: [PATCH 3/6] fix layout blockpage. removed left column --- public/views/block.html | 202 ++++++++++++++++++---------------------- 1 file changed, 91 insertions(+), 111 deletions(-) diff --git a/public/views/block.html b/public/views/block.html index 78f1a89d2c1..44610f3952f 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -1,117 +1,97 @@
-
-
-
- Loading Block... -
-
-
- -

#{{block.height}}

-
- -
- - - - - - - - - - - -
Previous Block{{block.height-1}}
Next Block{{block.height+1}}
-
-
-
-
- -
-

Block #{{block.height}}

-

Summary

-
-
- Loading Block Details... -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Number Of Transactions{{block.tx.length}} -
Height{{block.height}} - (Mainchain) - (Orphaned) -
Block Reward{{$root.currency.getConvertion(block.reward)}}
Timestamp{{block.time * 1000 | date:'medium'}}
Mined by - {{block.poolInfo.poolName}} -
Merkle Root - - {{block.merkleroot}} -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
Difficulty {{block.difficulty}}
Bits {{block.bits}}
Size (bytes) {{block.size}}
Version {{block.version}}
Nonce {{block.nonce}}
-
-
- -
-

Transactions

-
-
+

Block #{{block.height}}

+
+
+ Loading Block... +
+
+
+ BlockHash + {{block.hash}} + +
+

Summary

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Number Of Transactions{{block.tx.length}}
Height{{block.height}} + (Mainchain) + (Orphaned) +
Block Reward{{$root.currency.getConvertion(block.reward)}}
Timestamp{{block.time * 1000 | date:'medium'}}
Mined by + {{block.poolInfo.poolName}} +
Merkle Root +
+ + {{block.merkleroot}} +
+
Previous Block{{block.height-1}}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Difficulty {{block.difficulty}}
Bits {{block.bits}}
Size (bytes) {{block.size}}
Version {{block.version}}
Nonce {{block.nonce}}
Next Block{{block.height+1}}
+
+ +
+

Transactions

+
From e3a93f958c4b4d33b5c2dcf2515b4faced68ce40 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 16:08:40 -0300 Subject: [PATCH 4/6] fix layout address page --- public/views/address.html | 119 ++++++++++++++++------------------ public/views/block.html | 14 ++-- public/views/transaction.html | 50 +++++++------- 3 files changed, 89 insertions(+), 94 deletions(-) diff --git a/public/views/address.html b/public/views/address.html index d43c98ceca4..f3c6ba37ca6 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -1,70 +1,63 @@
-
-
-

Address

-
- Loading Address Information... -
-
-
- -

{{$root.currency.getConvertion(address.balance)}}

-
- -
-

Summary

-
Confirmed
- - - - - - - - - - - - - - - - - - - -
Total Received{{$root.currency.getConvertion(address.totalReceived)}}
Total Sent{{$root.currency.getConvertion(address.totalSent)}}
Final Balance{{$root.currency.getConvertion(address.balance)}}
No. Transactions{{address.txApperances}}
-
-
Unconfirmed
- - - - - - - - - - - - -
Unconfirmed Txs Balance{{$root.currency.getConvertion(address.unconfirmedBalance)}}
No. Transactions{{address.unconfirmedTxApperances}}
-
- -
+

Address {{$root.currency.getConvertion(address.balance) || address.balance + ' BTC'}}

+
+ Loading Address Information... +
+
+
+ String + {{address.addrStr}} + +
+

Summary confirmed

+
+
+ + + + + + + + + + + + + + + + + + + +
Total Received{{$root.currency.getConvertion(address.totalReceived) || address.totalReceived + ' BTC'}}
Total Sent{{$root.currency.getConvertion(address.totalSent) || address.totalSent + ' BTC'}}
Final Balance{{$root.currency.getConvertion(address.balance) || address.balance + ' BTC'}}
No. Transactions{{address.txApperances}}
-
-
-
-
-

Transactions Transactions for this address

-
+
+
-
+
+

Unconfirmed

+ + + + + + + + + + + + +
Unconfirmed Txs Balance{{$root.currency.getConvertion(address.unconfirmedBalance)}}
No. Transactions{{address.unconfirmedTxApperances}}
+
+
+

Transactions

+
+
+
diff --git a/public/views/block.html b/public/views/block.html index 44610f3952f..421ffcca7c0 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -6,13 +6,13 @@

Block #{{block.height}}

Loading Block...
-
- BlockHash - {{block.hash}} - -
-

Summary

+
+ BlockHash + {{block.hash}} + +
+

Summary

@@ -29,7 +29,7 @@

Summary

- + diff --git a/public/views/transaction.html b/public/views/transaction.html index 7ec88bca7e1..c5448f969af 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -8,35 +8,37 @@

Transaction {{v_index}}

-
- ID - {{tx.txid}} - -
Loading Transaction Details...
-

Summary

-
Block Reward{{$root.currency.getConvertion(block.reward)}}{{$root.currency.getConvertion(block.reward) || block.reward + ' BTC'}}
Timestamp
- - - - - - - - - - - - - - - - -
Size {{tx.size}} (bytes)
Received Time {{tx.firstSeenTs * 1000|date:'medium'}}N/A
Mined Time {{tx.time * 1000|date:'medium'}}N/A
+
+
+ Id + {{tx.txid}} + +
+

Summary

+ + + + + + + + + + + + + + + + + +
Size {{tx.size}} (bytes)
Received Time {{tx.firstSeenTs * 1000|date:'medium'}}N/A
Mined Time {{tx.time * 1000|date:'medium'}}N/A
+

Details

From 151d6b7d75fecf365efefdd93feebd2b42a26013 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 19:42:17 -0300 Subject: [PATCH 5/6] added currency selector to navbar. secondary navbar on blockpage when scroll --- public/src/css/common.css | 20 ++++++++++++++++---- public/src/js/directives.js | 12 ++++++++++++ public/views/block.html | 15 +++++++++++++++ public/views/includes/currency.html | 24 +++++++++++++++--------- public/views/includes/header.html | 1 + 5 files changed, 59 insertions(+), 13 deletions(-) diff --git a/public/src/css/common.css b/public/src/css/common.css index 5d8c46a1d6a..91c53821b7c 100644 --- a/public/src/css/common.css +++ b/public/src/css/common.css @@ -117,7 +117,6 @@ margin-left: 0; } .navbar-form { - margin-left: 20px; width: 35%; margin-top: 15px; } @@ -127,11 +126,11 @@ margin-left: 0; margin: 0; } .navbar-form { - width: 20%; + width: 15%; } } -@media (max-width: 768px) { +@media (max-width: 767px) { .navbar-form { width: auto; } @@ -146,6 +145,7 @@ margin-left: 0; font-size: 34px; font-style: italic; font-weight: 700; + overflow: hidden; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { @@ -154,7 +154,6 @@ margin-left: 0; .navbar-default .navbar-brand { color: #FFFFFF; - margin-right: 20px; padding: 22px 15px; } @@ -211,6 +210,7 @@ margin-left: 0; font-size: 12px; color: #eee; text-align: center; + margin-right: 10px; } .status .tooltip { @@ -661,3 +661,15 @@ a.v_highlight_more { color: #fff; } +.secondary_navbar { + width: 100%; + background: #fff; + position: fixed; + top: 64px; + left: 0; + border: 1px solid #eee; + padding: 10px; + text-align: center; + z-index: 10000; +} + diff --git a/public/src/js/directives.js b/public/src/js/directives.js index 39a7c77f06f..943f3478d91 100644 --- a/public/src/js/directives.js +++ b/public/src/js/directives.js @@ -3,6 +3,18 @@ var ZeroClipboard = window.ZeroClipboard; angular.module('insight') + .directive("scroll", function ($window) { + return function(scope, element, attrs) { + angular.element($window).bind("scroll", function() { + if (this.pageYOffset >= 200) { + scope.secondaryNavbar = true; + } else { + scope.secondaryNavbar = false; + } + scope.$apply(); + }); + }; + }) .directive('whenScrolled', function($window) { return { restric: 'A', diff --git a/public/views/block.html b/public/views/block.html index 421ffcca7c0..fc983f39d6b 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -1,5 +1,20 @@
+
+
+ +
+ Block #{{block.height}} · + Hash {{block.hash}} + +
+ +
+

Block #{{block.height}}

diff --git a/public/views/includes/currency.html b/public/views/includes/currency.html index 1d4be453ded..87debb23f5e 100644 --- a/public/views/includes/currency.html +++ b/public/views/includes/currency.html @@ -1,9 +1,15 @@ -
- Currency: -
- - USD - BTC - mBTC -
-
\ No newline at end of file + + {{currency.symbol}} + + + diff --git a/public/views/includes/header.html b/public/views/includes/header.html index cf6660f0ded..7c1a860e45c 100644 --- a/public/views/includes/header.html +++ b/public/views/includes/header.html @@ -42,6 +42,7 @@ Height {{totalBlocks || info.blocks}}
+
From ce5ce82ee9744dd4398c9dadb6d3a8c4552f859c Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Mon, 24 Feb 2014 20:23:24 -0300 Subject: [PATCH 6/6] Secondary navbar when scroll on txpages, blockpages and addrpages --- public/src/css/common.css | 9 ++++++++- public/views/address.html | 15 ++++++++++++++- public/views/block.html | 10 ++++++++-- public/views/transaction.html | 17 ++++++++++++++++- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/public/src/css/common.css b/public/src/css/common.css index 91c53821b7c..f232a1fa67a 100644 --- a/public/src/css/common.css +++ b/public/src/css/common.css @@ -392,6 +392,13 @@ margin-left: 0; background-color: #AC0015; } +.txvalues-normal { + background-color: transparent; + text-transform: none; + color: #333; + font-size: 14px; + font-weight: normal; +} .progress-bar-info { background-color: #8DC429; } /* Set the fixed height of the footer here */ @@ -670,6 +677,6 @@ a.v_highlight_more { border: 1px solid #eee; padding: 10px; text-align: center; - z-index: 10000; + z-index: 1000; } diff --git a/public/views/address.html b/public/views/address.html index f3c6ba37ca6..8cf6eda0bb1 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -1,12 +1,25 @@
+
+
+
+ + Address {{address.addrStr}} + + +
+
+ Final Balance {{$root.currency.getConvertion(address.balance) || address.balance + ' BTC' }} +
+
+

Address {{$root.currency.getConvertion(address.balance) || address.balance + ' BTC'}}

Loading Address Information...
- String + Address {{address.addrStr}}
diff --git a/public/views/block.html b/public/views/block.html index fc983f39d6b..e3b9ed0170f 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -2,16 +2,22 @@
-
+
+
Block #{{block.height}} · Hash {{block.hash}} +
-
diff --git a/public/views/transaction.html b/public/views/transaction.html index c5448f969af..f50311fd7f8 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -1,5 +1,20 @@
+
+
+
+ + Transaction {{tx.txid}} + + +
+
+ {{tx.confirmations}} Confirmations + Unconfirmed Transaction! + {{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }} +
+
+

Transaction @@ -15,7 +30,7 @@

Transaction

- Id + Transaction {{tx.txid}}