Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
[FEATURE] add ticker to landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
bsteinlo committed Jan 28, 2015
1 parent 73ba69b commit 6710786
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,17 @@
var debug = true;
</script>
<!-- @endif -->

<!-- TODO: load conditionally and locally -->
<script type="text/javascript" src="//ripplecharts.com/embed/ticker/script.js"></script>

<script type="text/javascript" src="//ripplecharts.com/embed/pricechart/script.js"></script>

<script type="text/javascript">
$.getScript('js/ripple-client' + (debug ? '-debug' : '-'+lang) + '.js');
</script>


<!-- start Mixpanel -->
<script type="text/javascript">
if (Options.mixpanel && Options.mixpanel.track) { (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src='js/deps/mixpanel.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
Expand Down
4 changes: 4 additions & 0 deletions src/jade/client/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ div#wrapper
div(ng-if="loginStatus")
!= require("./navbar.jade")()
.landingWrapper(ng-class="{ 'loggedOut container-fluid': !loginStatus, 'container': loginStatus }")

.landingContainer

.tickerWrapper(ng-if="!loginStatus")
div#ticker

.loginContainer

Expand Down
53 changes: 53 additions & 0 deletions src/js/tabs/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,56 @@ LoginTab.prototype.angular = function (module) {


module.exports = LoginTab;


/**
*
* Initialize the ticker
* @link https://github.com/ripple/ripplecharts-frontend/tree/master/src/embed
*
**/

setTimeout (function () {

var ticker = TickerWidget({
url : API,
id : "ticker"
});

ticker.load({
markets: [
{
base: {"currency":"XRP"},
counter: {"currency":"USD","issuer":"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"}
},
{
base: {currency:"XRP"},
counter: {"currency":"USD","issuer":"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"}
},
{
base: {"currency":"XRP"},
counter: {currency:"BTC","issuer":"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"}
},
{
base: {"currency":"XRP"},
counter: {currency:"BTC","issuer":"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"}
},
{
base: {"currency":"XRP"},
counter: {currency:"CNY","issuer":"razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA"}
},
{
base: {"currency":"XRP"},
counter: {currency:"JPY","issuer":"rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6"}
},
{
counter: {currency:"XRP"},
base: {"currency":"JPY","issuer":"r94s8px6kSw1uZ1MV98dhSRTvc6VMPoPcN"}
},
{
base: {currency:"CNY","issuer":"rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK"},
counter: {"currency":"XRP"}
}
]
});
}, 100);
5 changes: 5 additions & 0 deletions src/less/ripple/landing.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ header.loggedOut {
background-size: 100%;
height: 880px;
}

.tickerWrapper {
height: 60px;
background: @lightgray;
}
}

.loginContainer {
Expand Down

0 comments on commit 6710786

Please sign in to comment.