Browse Source

copy

pull/1/head
Mayel de Borniol 6 years ago
parent
commit
0a70e592aa
2 changed files with 9 additions and 6 deletions
  1. +6
    -3
      index.html
  2. +3
    -3
      index.js

+ 6
- 3
index.html

@ -23,6 +23,9 @@
<div class="card-title">
<img src="img/faircoin-logo.png" class="img-fluid" />
</div>
<p>Display the historical value of FairCoin at any given date:</p>
<div class="row">
<div class="col-sm-12">
<input id="inputDate" type="date">
@ -31,10 +34,10 @@
<br>
<div class="row">
<div class="col-sm-5">
<input type="number" class="form-control" id="inputFaircoin" placeholder="faircoin">
<input type="number" class="form-control" id="inputFaircoin" placeholder="FairCoin">
</div>
<div class="col-sm-2">
FC
FAIR
</div>
<!--
<div class="col-sm-5">
@ -45,7 +48,7 @@
<br>
<div class="row">
<div class="col-sm-5">
<input type="number" class="form-control" id="inputEuro" placeholder="euro">
<input type="number" class="form-control" id="inputEuro" placeholder="Euros">
</div>
<div class="col-sm-2">

+ 3
- 3
index.js

@ -67,7 +67,7 @@ function calculateEuros() {
var euros = faircoins * selectedPriceData[3];
document.getElementById("inputEuro").value= euros;
document.getElementById("result").innerHTML = "The official rate was " + parseFloat(selectedPriceData[3]).toString() + " <p>" + faircoins + " FAIR were worth " + euros + " €";
toastr.success(faircoins + " FC, were " + euros + " €");
toastr.success(faircoins + " FAIR were " + euros + " €");
}
function calculateFaircoins() {
@ -97,6 +97,6 @@ function calculateFaircoins() {
var faircoins = euros / selectedPriceData[3];
document.getElementById("inputFaircoin").value= faircoins;
document.getElementById("result").innerHTML = "The official rate was " + parseFloat(selectedPriceData[3]).toString() + " <p>" + euros + " € were worth " + faircoins + " FC";
toastr.success(euros + "€, are " + faircoins + " FC");
document.getElementById("result").innerHTML = "The official rate was " + parseFloat(selectedPriceData[3]).toString() + " <p>" + euros + " € were worth " + faircoins + " FAIR";
toastr.success(euros + "€ were " + faircoins + " FAIR");
}

Loading…
Cancel
Save