From 0520c117a95b4112a6b00a733c3562b842380c87 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Fri, 31 Jan 2014 16:34:25 -0300 Subject: [PATCH 1/4] moved templates to includes --- app/views/includes/foot.jade | 2 +- app/views/includes/navbar.jade | 2 +- public/views/includes/connection.html | 8 ++++++ public/views/includes/footer.html | 3 ++ public/views/includes/header.html | 41 +++++++++++++++++++++++++++ public/views/includes/infoStatus.html | 4 +++ 6 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 public/views/includes/connection.html create mode 100644 public/views/includes/footer.html create mode 100644 public/views/includes/header.html create mode 100644 public/views/includes/infoStatus.html diff --git a/app/views/includes/foot.jade b/app/views/includes/foot.jade index b84cba8..305c244 100755 --- a/app/views/includes/foot.jade +++ b/app/views/includes/foot.jade @@ -1,4 +1,4 @@ -#footer(data-ng-include="'/views/footer.html'", role='navigation') +#footer(data-ng-include="'/views/includes/footer.html'", role='navigation') script(type='text/javascript', src='/socket.io/socket.io.js') script(type='text/javascript', src='/lib/momentjs/moment.js') diff --git a/app/views/includes/navbar.jade b/app/views/includes/navbar.jade index 10463d6..56e5e3c 100644 --- a/app/views/includes/navbar.jade +++ b/app/views/includes/navbar.jade @@ -1 +1 @@ -.navbar.navbar-default.navbar-fixed-top(data-ng-include="'/views/header.html'", role='navigation') +.navbar.navbar-default.navbar-fixed-top(data-ng-include="'/views/includes/header.html'", role='navigation') diff --git a/public/views/includes/connection.html b/public/views/includes/connection.html new file mode 100644 index 0000000..eb301ab --- /dev/null +++ b/public/views/includes/connection.html @@ -0,0 +1,8 @@ +
+
+ Error! +

Can't connect to bitcoind.

+

Can't connect to server.

+

Can't connect to internet. Please, check your connection.

+
+
diff --git a/public/views/includes/footer.html b/public/views/includes/footer.html new file mode 100644 index 0000000..e87127e --- /dev/null +++ b/public/views/includes/footer.html @@ -0,0 +1,3 @@ +
+ Insight API v{{version}} +
diff --git a/public/views/includes/header.html b/public/views/includes/header.html new file mode 100644 index 0000000..888b439 --- /dev/null +++ b/public/views/includes/header.html @@ -0,0 +1,41 @@ +
+
+ + +
+
diff --git a/public/views/includes/infoStatus.html b/public/views/includes/infoStatus.html new file mode 100644 index 0000000..011a809 --- /dev/null +++ b/public/views/includes/infoStatus.html @@ -0,0 +1,4 @@ +Loading... +{{error}} + + From 6f879e1436f9910b12f0c992ca570b6966dc0e14 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Fri, 31 Jan 2014 16:35:28 -0300 Subject: [PATCH 2/4] removed old templates --- public/views/footer.html | 3 --- public/views/header.html | 41 ------------------------------------ public/views/infoStatus.html | 4 ---- 3 files changed, 48 deletions(-) delete mode 100644 public/views/footer.html delete mode 100755 public/views/header.html delete mode 100644 public/views/infoStatus.html diff --git a/public/views/footer.html b/public/views/footer.html deleted file mode 100644 index e87127e..0000000 --- a/public/views/footer.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/public/views/header.html b/public/views/header.html deleted file mode 100755 index 888b439..0000000 --- a/public/views/header.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
- - -
-
diff --git a/public/views/infoStatus.html b/public/views/infoStatus.html deleted file mode 100644 index 011a809..0000000 --- a/public/views/infoStatus.html +++ /dev/null @@ -1,4 +0,0 @@ -Loading... -{{error}} - - From d73b29240f5947b033cbba715fab58e3b418d1d3 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Fri, 31 Jan 2014 16:35:51 -0300 Subject: [PATCH 3/4] added new error message template --- app/views/index.jade | 7 ------- public/js/config.js | 4 ++-- public/views/404.html | 1 + public/views/address.html | 1 + public/views/block.html | 1 + .../{blocks/list.html => block_list.html} | 1 + public/views/index.html | 1 + public/views/status.html | 21 ++++++++++--------- public/views/transaction.html | 3 ++- 9 files changed, 20 insertions(+), 20 deletions(-) rename public/views/{blocks/list.html => block_list.html} (96%) diff --git a/app/views/index.jade b/app/views/index.jade index bcc7ac5..a74f173 100755 --- a/app/views/index.jade +++ b/app/views/index.jade @@ -1,11 +1,4 @@ extends layouts/default block content - .connection-status.container(data-ng-controller='ConnectionController') - .alert.alert-danger(data-ng-show='!serverOnline || !clienteOnline || !apiOnline', data-ng-init='getConnStatus()') - strong Error! - p(data-ng-show='!apiOnline') Can't connect to bitcoind. - p(data-ng-show='!serverOnline') Can't connect to server. - p(data-ng-show='!clienteOnline') Can't connect to internet. Please, check your connection. - section.container(data-ng-view) diff --git a/public/js/config.js b/public/js/config.js index 3aeedbb..1abe75a 100755 --- a/public/js/config.js +++ b/public/js/config.js @@ -20,11 +20,11 @@ angular.module('insight').config(function($routeProvider) { title: 'Home' }). when('/blocks', { - templateUrl: '/views/blocks/list.html', + templateUrl: '/views/blocks_list.html', title: 'Bitcoin Blocks solved Today' }). when('/blocks-date/:blockDate', { - templateUrl: '/views/blocks/list.html', + templateUrl: '/views/blocks_list.html', title: 'Bitcoin Blocks solved ' }). when('/address/:addrStr', { diff --git a/public/views/404.html b/public/views/404.html index bb3b23f..76da6bd 100644 --- a/public/views/404.html +++ b/public/views/404.html @@ -1,3 +1,4 @@ +

Ooops!

404 Page not found :(

diff --git a/public/views/address.html b/public/views/address.html index c23d54e..76c06ff 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -1,3 +1,4 @@ +
diff --git a/public/views/block.html b/public/views/block.html index 2342f37..53e4aae 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -1,3 +1,4 @@ +
diff --git a/public/views/blocks/list.html b/public/views/block_list.html similarity index 96% rename from public/views/blocks/list.html rename to public/views/block_list.html index 90c999f..f826056 100644 --- a/public/views/blocks/list.html +++ b/public/views/block_list.html @@ -1,3 +1,4 @@ +
diff --git a/public/views/index.html b/public/views/index.html index 2e482a6..cba1d2c 100644 --- a/public/views/index.html +++ b/public/views/index.html @@ -1,6 +1,7 @@
{{flashMessage}}
+
diff --git a/public/views/status.html b/public/views/status.html index 68c83e6..0cf5060 100644 --- a/public/views/status.html +++ b/public/views/status.html @@ -1,11 +1,12 @@ +
- +

Sync Status

@@ -15,7 +16,7 @@ - - + @@ -39,10 +40,10 @@
Sync Progress +
{{sync.syncPercentage}}% Complete @@ -26,7 +27,7 @@
Current Sync Status {{sync.status}}
Initial Block Chain Height {{sync.blockChainHeight}}{{sync.skippedBlocks}}
- +

Transaction Output Set Information

- + @@ -74,10 +75,10 @@
Height
- +

Last Block

- + @@ -89,7 +90,7 @@

Bitcoin node information

Last Block Hash {{lastblockhash}}
- + @@ -144,7 +145,7 @@

Difficulty

Version
- + diff --git a/public/views/transaction.html b/public/views/transaction.html index 2d378cb..abb4533 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -1,3 +1,4 @@ +

Transaction @@ -48,7 +49,7 @@

Mining Difficulty
- +
From 35fcb49660fc8489527abfc2f45b6aa8f164b51e Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Fri, 31 Jan 2014 17:02:55 -0300 Subject: [PATCH 4/4] fix container margin --- public/css/common.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/css/common.css b/public/css/common.css index 2bb5a11..e7e31ea 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -294,7 +294,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { -------------------------------------------------- */ /* Not required for template or sticky footer method. */ -#wrap > .container { padding: 0 15px; } +#wrap > .container { padding: 60px 15px 0; } .container .text-muted a { color: #eee; } @@ -401,7 +401,6 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { .transaction-vin-vout .ellipsis { margin-bottom: 10px; } .transaction-vin-vout .btc-value { margin-left: 15px; } -.connection-status { margin-top: 60px; } .page-header { margin-top: 0; } .block_hash {