Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,3 +70,6 @@ dt | |
.aggregatedMiners | ||
.hashrate | ||
@extend .graph-element | ||
.market | ||
.latestTrade | ||
@extend .graph-element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
'use strict'; | ||
|
||
var View = require('../View'); | ||
var renderHistoricalDataGraph = require('./mixins/renderHistoricalDataGraph'), | ||
View = require('../View'), | ||
numberHelper = require('../handlebars/helpers/number'), | ||
graphMixin = renderHistoricalDataGraph([ | ||
{ | ||
attr: 'bid', | ||
color: '#b94a48', | ||
name: 'Best Bid' | ||
}, | ||
{ | ||
attr: 'ask', | ||
color: '#468847', | ||
name: 'Best Ask' | ||
}, | ||
{ | ||
attr: 'close', | ||
name: 'Latest Trade' | ||
} | ||
], '.graph', { | ||
yFormatter: function (value) { | ||
return numberHelper(value) + ' ' + this.module.get('currency'); | ||
} | ||
}, { | ||
renderer: 'line' | ||
});; | ||
|
||
module.exports = View.extend({ | ||
template: 'market' | ||
}); | ||
}).extend(graphMixin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<header class="panel-heading"> | ||
<h2 class="panel-title">{{ title }}</h2> | ||
</header> | ||
<dl class="panel-body dl-horizontal"> | ||
<dt class="big-label">Latest Trade:</dt> | ||
<dd class="big">{{number close}} {{currency}}</dd> | ||
<dt>Best Bid:</dt> | ||
<dd>{{number bid}} {{currency}}</dd> | ||
<dt>Best Ask:</dt> | ||
<dd>{{number ask}} {{currency}}</dd> | ||
</dl> | ||
<div class="panel-body"> | ||
<div class="latestTrade col-xs-12 col-md-3"> | ||
<div class="graph"></div> | ||
<strong>Latest Trade: {{number close}} {{currency}}</strong> | ||
</div> | ||
<dl class="dl-horizontal col-xs-12 col-md-3"> | ||
<dt>Best Bid:</dt> | ||
<dd>{{number bid}} {{currency}}</dd> | ||
<dt>Best Ask:</dt> | ||
<dd>{{number ask}} {{currency}}</dd> | ||
</dl> | ||
</div> | ||
<footer class="text-muted">Updated: {{time lastUpdated}}</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters