From 0b3ac5804f7c5474b1aa73d07e136b1a196373b1 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 6 Feb 2014 17:46:14 -0300 Subject: [PATCH 1/3] tx page: fixed left column with icon and summary --- public/css/common.css | 37 ++++++++++--------- public/views/address.html | 8 ++--- public/views/block.html | 9 +++-- public/views/transaction.html | 68 +++++++++++++++++++---------------- 4 files changed, 66 insertions(+), 56 deletions(-) diff --git a/public/css/common.css b/public/css/common.css index f49f7c8..d323cb8 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -196,25 +196,24 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .block-id { background-color: #373D42; border: 3px solid #FFFFFF; - height: 165px; - margin: 10px auto; + margin: 0 auto; width: 165px; + color: #fff; + text-align: center; + font-size: 80px; } -.block-id h1 { +.block-id span { + margin-top: 10px; +} + +.block-id h2 { color: #FFFFFF; font-weight: bold; line-height: 30px; - text-align: center; - font-size: 24px; -} - -.block-id h3 { - color: #FFFFFF; - font-weight: bold; - line-height: 30px; - text-align: center; font-size: 24px; + margin-top: 0; + margin-bottom: 10px; } .icon-block { @@ -432,12 +431,18 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { line-height: 26px; } +.tx-id { + background-color: #373D42; + border: 3px solid #FFFFFF; + margin: 0 auto; + width: 165px; + color: #FFFFFF; + font-size: 80px; + text-align: center; +} + .transaction-vin-vout .ellipsis { margin-bottom: 10px; } .transaction-vin-vout .btc-value { margin-left: 15px; } .page-header { margin-top: 0; } -.block_hash { - margin-left: 46px; - text-align: center; -} diff --git a/public/views/address.html b/public/views/address.html index 9c1fbb2..0f4822e 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -5,10 +5,10 @@

Address

- +
+
+ + {{address.addrStr}}

Summary

diff --git a/public/views/block.html b/public/views/block.html index 178b8cc..7dca6b6 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -2,15 +2,14 @@
+

Block

-
- -
-

Block #{{ block.height }}

+ +

#{{ block.height }}

Hashes

diff --git a/public/views/transaction.html b/public/views/transaction.html index d3425c8..6f786dc 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -1,36 +1,43 @@
-

- Transaction - View information about a bitcoin transaction -

- -
-
-
- -
-
-

Summary

- - - - - - - - - - - - -
Size {{tx.size}} (bytes)
Received Time {{tx.time * 1000|date:'medium'}}
Block - - - {{tx.blockhash}} -
+
+
+

Transaction

+
+
-
+
+ + +
+

Summary

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

+ Details + View information about a bitcoin transaction +

+ +
+
+
+ +

Inputs and Outputs

@@ -49,7 +56,6 @@
-
From 4e49989d24c2377374d2741496f604f88425a2fb Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 6 Feb 2014 18:09:50 -0300 Subject: [PATCH 2/3] Currency support on address pages and missing places --- public/js/controllers/footer.js | 4 +--- public/views/address.html | 6 +++--- public/views/transaction.html | 6 +++--- public/views/transaction/tx.html | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/public/js/controllers/footer.js b/public/js/controllers/footer.js index 64c0f2d..28744bc 100644 --- a/public/js/controllers/footer.js +++ b/public/js/controllers/footer.js @@ -4,9 +4,7 @@ angular.module('insight.system').controller('FooterController', function($rootScope, $scope, Version, Currency) { var _roundFloat = function(x, n) { - if(!parseInt(n, 10)) n = 0; - - if(!parseFloat(x)) return false; + if(!parseInt(n, 10) || !parseFloat(x)) n = 0; return Math.round(x * Math.pow(10, n)) / Math.pow(10, n); }; diff --git a/public/views/address.html b/public/views/address.html index 0f4822e..9dfd80d 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -16,15 +16,15 @@ Total Received - {{address.totalReceived}} BTC + {{$root.currency.getConversion(address.totalReceived)}} Total Sent - {{address.totalSent}} BTC + {{$root.currency.getConversion(address.totalSent)}} Final Balance - {{address.balance}} BTC + {{$root.currency.getConversion(address.balance)}} No. Transactions diff --git a/public/views/transaction.html b/public/views/transaction.html index 6f786dc..3f83dd7 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -43,15 +43,15 @@ Total Input - {{tx.valueIn}} BTC + {{$root.currency.getConversion(tx.valueIn)}} Total Output - {{tx.valueOut}} BTC + {{$root.currency.getConversion(tx.valueOut)}} Fees - {{tx.fees}} BTC + {{$root.currency.getConversion(tx.fees)}} diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index d1a3f03..154dca2 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -109,7 +109,7 @@
- +
From b590cf5c5c3a99ff918387b0c879120a89168b4d Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 6 Feb 2014 18:25:12 -0300 Subject: [PATCH 3/3] currency links at left column on all pages --- public/css/common.css | 6 ++++-- public/views/address.html | 1 + public/views/block.html | 1 + public/views/includes/currency.html | 8 ++++++++ public/views/includes/footer.html | 8 -------- public/views/transaction.html | 1 + 6 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 public/views/includes/currency.html diff --git a/public/css/common.css b/public/css/common.css index d323cb8..f3e3b5e 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -277,9 +277,11 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { height: 51px; overflow: hidden; } -#footer .currency a.active { - color: #fff; + +.currency a.active { + color: #000; text-decoration: underline; + cursor: default; } #footer a.insight { diff --git a/public/views/address.html b/public/views/address.html index 9dfd80d..c6c8269 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -33,6 +33,7 @@
+
diff --git a/public/views/block.html b/public/views/block.html index 7dca6b6..07662f5 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -30,6 +30,7 @@
+
diff --git a/public/views/includes/currency.html b/public/views/includes/currency.html new file mode 100644 index 0000000..3dc3ef2 --- /dev/null +++ b/public/views/includes/currency.html @@ -0,0 +1,8 @@ +
+ + Currency: + USD · + BTC · + mBTC + +
diff --git a/public/views/includes/footer.html b/public/views/includes/footer.html index 080adb5..e87127e 100644 --- a/public/views/includes/footer.html +++ b/public/views/includes/footer.html @@ -1,11 +1,3 @@
-
- - Currency: - USD · - BTC · - mBTC - -
Insight API v{{version}}
diff --git a/public/views/transaction.html b/public/views/transaction.html index 3f83dd7..7873536 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -25,6 +25,7 @@ +