mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
added market cap data on network page
This commit is contained in:
parent
2880b77cf2
commit
acfc0700e1
3 changed files with 25 additions and 4 deletions
|
@ -786,9 +786,10 @@ pages:
|
|||
hero-blockchain-btn: Blockchain
|
||||
hero-mining-btn: Mining
|
||||
|
||||
markets-desc-text: site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.
|
||||
masternode-desc-text: Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.
|
||||
|
||||
markets-heading: Markets
|
||||
markets-heading: Market Cap (USD)
|
||||
governance-heading: Treasury
|
||||
network-heading: Masternodes
|
||||
blockchain-heading: Blockchain
|
||||
|
|
|
@ -12,9 +12,10 @@ description: pages.currency.description
|
|||
<div class="section__content">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2 class="">{% t pages.currency.markets-heading %}</h2>
|
||||
<p class="section__lead">
|
||||
Compare Sites
|
||||
<h2 class="bottom-space">{% t pages.currency.markets-heading %}</h2>
|
||||
<span id="marketcap_count" class="big-accent bottom-space"></span>
|
||||
<p class="bottom-space">
|
||||
{% t pages.currency.markets-desc-text %}
|
||||
</p>
|
||||
<div class="hero__buttons">
|
||||
<a href="http://coinmarketcap.com/currencies/dash/#markets" target="_blank" class="btn-blue-solid">CoinMarketCap</a>
|
||||
|
|
|
@ -3,6 +3,25 @@
|
|||
$(document).ready(function () {
|
||||
|
||||
var siteApi = window.globals.siteApi || '/api/v1';
|
||||
var marketCapApi = 'https://www.coincap.io/front/'
|
||||
|
||||
if ($('#marketcap_count').length) {
|
||||
|
||||
function results(json){
|
||||
var $dash="DASH",
|
||||
result = json.filter(function(itm){
|
||||
return $dash.indexOf(itm.short) > -1;
|
||||
});
|
||||
var num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
||||
$('#marketcap_count').text(num);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "https://www.coincap.io/front/",
|
||||
dataType: "jsonp",
|
||||
jsonpCallback: "results"
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#blocks').length) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue