@@ -780,11 +780,6 @@ Overall, staking can be a way to maximize your crypto investments by earning add
From eba8ed81976cfcb904fffc630161983d1252dfa5 Mon Sep 17 00:00:00 2001
From: Pureheart Moluno <39631660+pmoluno@users.noreply.github.com>
Date: Fri, 17 Feb 2023 09:39:26 +0100
Subject: [PATCH 3/4] Validator Card & Comma Seperated Numbers
---
public/css/style.css | 21 ++++
public/js/script.js | 278 +++++++++++++++++++++++++++++++++++--------
views/home.ejs | 139 +++++++++++++++++-----
3 files changed, 362 insertions(+), 76 deletions(-)
diff --git a/public/css/style.css b/public/css/style.css
index 20c7161..abba689 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -53,6 +53,7 @@ a:hover{
padding: 21.35px 36.3px;
margin-top: 33.4px;
}
+
.btn-style:hover{
color: #362600;
font-weight: 500;
@@ -944,4 +945,24 @@ border-radius: 9px;
.list-of-calculator-assets img{
border-radius: 100%;
padding: 20px;
+}
+
+
+/* CARD DESIGN */
+.modal-card{
+ background-color: #272727;
+ color: white;
+ font-size: 12px;
+}
+.modal-body .row div.col-8{
+ background-color: #4e4e4e !important;
+ margin-bottom: 5px;
+ padding: 10px;
+}
+.modal-body .row div.col-4{
+ margin-bottom: 5px;
+ padding: 10px;
+}
+.extra-extra-small{
+ font-size: 5px;
}
\ No newline at end of file
diff --git a/public/js/script.js b/public/js/script.js
index 7750a5d..bcbdd0f 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -23,8 +23,62 @@ if( $("#statistics").is(":visible") == true )
{
animate(text1, 0, 3845866, 5000);
animate(text2, 0, 38482, 5000);
- animate(text3, 100, 3845777, 5000);
+ animate(text3, 100, 3845777, 5000);
}
+$("#amount-deligated").html($("#amount-deligated").html().toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+$("#paid-reward").html($("#paid-reward").html().toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+$("#delegates").html($("#delegates").html().toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+
+// ASSET DATA LIST
+
+let validatorAddress = document.querySelector(".validator-address");
+let valiatorApy = document.querySelector(".validator-apy");
+let validatorVoting = document.querySelector(".validator-voting-power");
+let validatorDescription = document.querySelector(".validator-description");
+
+// CARD DETAILS
+
+
+let findoraDescription = document.querySelector(".findora-description");
+
+
+let persistenceCardAddress = document.querySelector(".persistence-address");
+let persistenceCardApy = document.querySelector(".persistence-apy");
+let persistenceCardVoting = document.querySelector(".persistence-voting");
+let persistenceCardDescription = document.querySelector(".persistence-description");
+
+
+let oasisCardAddress = document.querySelector(".oasis-address");
+let oasisCardApy = document.querySelector(".oasis-apy");
+let oasisCardVoting = document.querySelector(".oasis-voting");
+let oasisCardDescription = document.querySelector(".oasis-description");
+
+
+let velasCardAddress = document.querySelector(".velas-address");
+let velasCardApy = document.querySelector(".velas-apy");
+let velasCardVoting = document.querySelector(".velas-voting");
+let velasCardDescription = document.querySelector(".velas-description");
+
+
+let harmonyCardAddress = document.querySelector(".harmony-address");
+let harmonyCardApy = document.querySelector(".harmony-apy");
+let harmonyCardVoting = document.querySelector(".harmony-voting");
+let harmonyCardDescription = document.querySelector(".harmony-description");
+
+
+let sentinelCardAddress = document.querySelector(".sentinel-address");
+let sentinelCardApy = document.querySelector(".sentinel-apy");
+let sentinelCardVoting = document.querySelector(".sentinel-voting");
+let sentinelCardDescription = document.querySelector(".sentinel-description");
+
+
+let assetCardAddress = document.querySelector(".asset-address");
+let assetCardApy = document.querySelector(".asset-apy");
+let assetCardVoting = document.querySelector(".asset-voting");
+let assetCardDescription = document.querySelector(".asset-description");
+
+
+
// HARMONY BLOCKCHAIN
function harmonyDetails() {
$.ajax({
@@ -41,6 +95,8 @@ function harmonyDetails() {
"id":1
}),
success: function (data) {
+ let address = data.result.validator.address;
+ let harmonyDescription = data.result.validator.details;
let apr = data.result.lifetime.apr;
let totalDelegation = data.result["total-delegation"];
let totalDelegators = data.result.validator.delegations;
@@ -53,20 +109,30 @@ function harmonyDetails() {
let str_totalD = totalDelegation.toString();
totalDelegation= Number(str_totalD.slice(0, 7));
totalDelegators = totalDelegators.length;
- console.log("HARMONY BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
- console.log("=======================================================================");
+ //console.log("HARMONY BLOCKCHAIN");
+ //console.log("=======================================================================");
+ //console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
+ //console.log("=======================================================================");
+ //console.log(data);
+ $(".harmony-address").html(address);
+ $(".harmony-apy").html(totalApr);
+ $(".harmony-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".harmony-description").html(harmonyDescription);
+ $("#harmony-apy").html(totalApr);
$("#harmony-apy").html(totalApr);
- $("#harmony-total-delegation").html(totalDelegation);
+ $("#harmony-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#harmony-lockup").html(lockup);
},
error: function (err) {
console.log(err);
$("#harmony-apy").html("8.15");
- $("#harmony-total-delegation").html("7332799");
+ $("#harmony-total-delegation").html("7,332,799");
$("#harmony-lockup").html("0");
+ $(".harmony-address").html("one1atp5gxdxxt9yqux6kq64eacz7x8cyldejqjd9f");
+ $(".harmony-apy").html("8.15");
+ $(".harmony-voting").html("7,332,799");
+ $(".harmony-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission on Harmony chain till Epoch 1159.");
},
});
}
@@ -79,26 +145,37 @@ function oasisDetails() {
headers: {"Content-Type": "application/json"},
timeout: 5000,
success: function (data) {
+ let address = data.node_id;
+ let oasisDescription = "PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission on Oasis Chain";
let totalApr = 7.8;
let totalDelegation = Math.floor(parseInt(data.delegations_balance).toFixed(7));
let str_totalD = totalDelegation.toString();
totalDelegation = Number(str_totalD.slice(0, 7));
let totalDelegators = data.depositors_count;
let lockup = 0;
- console.log("OASIS BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
- // console.log(data);
- console.log("=======================================================================");
+ // console.log("OASIS BLOCKCHAIN");
+ // console.log("=======================================================================");
+ // console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
+ // console.log(data);
+ // console.log("=======================================================================");
$("#oasis-apy").html(totalApr);
- $("#oasis-total-delegation").html(totalDelegation);
+ $("#oasis-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#oasis-lockup").html(lockup);
+ $(".oasis-address").html(address);
+ $(".oasis-apy").html(totalApr);
+ $(".oasis-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".oasis-description").html(oasisDescription);
+
},
error: function (err) {
console.log(err);
$("#oasis-apy").html("7.8");
- $("#oasis-total-delegation").html("1593651");
+ $("#oasis-total-delegation").html("1,593,651");
$("#oasis-lockup").html("0");
+ $(".oasis-address").html("oasis1qp4tj3u9qkcgjqrrjvwljrqcyx3g5ygjqgtm37t3");
+ $(".oasis-apy").html("7.8");
+ $(".oasis-voting").html("1,593,651");
+ $(".oasis-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission on Oasis Chain");
},
});
}
@@ -113,25 +190,35 @@ function persistenceDetails() {
success: function (data) {
let mainData = data.result.find(e => e.operator_address === 'persistencevaloper109yg6yhcyy5mfyteqmcn3pjca9nu9s39fxwh07');
let totalDelegation = Math.floor(parseInt(mainData.delegator_shares).toFixed(5));
+ let address = mainData.operator_address;
+ let persistenceDescription = mainData.description.details;
let str_totalD = totalDelegation.toString();
totalDelegation= Number(str_totalD.slice(0, 7));
// let totalApr = parseFloat(mainData.commission.commission_rates.max_rate).toFixed(2);
let totalApr = 31.9;
let lockup = 0;
- console.log("PESISTENCE BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup);
- console.log(mainData);
- console.log("=======================================================================");
+ //console.log("PESISTENCE BLOCKCHAIN");
+ //console.log("=======================================================================");
+ //console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup);
+ //console.log(mainData);
+ //console.log("=======================================================================");
$("#persistence-apy").html(totalApr);
- $("#persistence-total-delegation").html(totalDelegation);
+ $("#persistence-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#persistence-lockup").html(lockup);
+ $(".persistence-address").html(address);
+ $(".persistence-apy").html(totalApr);
+ $(".persistence-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".persistence-description").html(persistenceDescription);
},
error: function (err) {
console.log(err);
$("#persistence-apy").html("31.9");
- $("#persistence-total-delegation").html("2212440");
+ $("#persistence-total-delegation").html("2,212,440");
$("#persistence-lockup").html("0");
+ $(".persistence-address").html("persistencevaloper109yg6yhcyy5mfyteqmcn3pjca9nu9s39fxwh07");
+ $(".persistence-apy").html("31.9");
+ $(".persistence-voting").html("2,212,440");
+ $(".persistence-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission on Persistence chain till 2023");
},
});
// $.ajax({
@@ -154,13 +241,15 @@ function persistenceDetails() {
// FINDORA BLOCKCHAIN
function findoraDetails() {
- $.ajax({
+ $.ajax({
type: "GET",
url: "https://mainnet.backend.findorascan.io/api/chain/validator_detail/C58FE884BBF17C111A77910FF485666662672199",
headers: {"Content-Type": "application/json"},
timeout: 5000,
success: function (data) {
let totalApr = parseFloat(data.data.validator_realtime_apy[0]).toFixed(2);
+ let address = data.data.addr;
+ let findoraDescription = data.data.memo.desc;
let totalDelegation = Math.floor(parseInt(data.data.voting_power).toFixed(7));
let removingExponential = totalApr / (10**36);
let total = parseFloat(removingExponential).toFixed(2);
@@ -169,19 +258,28 @@ function findoraDetails() {
totalDelegation= Number(str_totalD.slice(0, 7));
let totalDelegators = Math.floor(data.data.delegator_cnt);
let lockup = 0;
- console.log("FINDORA BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
- console.log("=======================================================================");
+ //console.log("FINDORA BLOCKCHAIN");
+ //console.log("=======================================================================");
+ //console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
+ //console.log(data);
+ //console.log("=======================================================================");
+ $(".findora-address").html(address);
+ $(".findora-apy").html(totalApr);
+ $(".findora-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".findora-description").html(findoraDescription);
$("#findora-apy").html(totalApr);
- $("#findora-total-delegation").html(totalDelegation);
+ $("#findora-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#findora-lockup").html(lockup);
},
error: function (err) {
- console.log(err);
+ //console.log(err);
$("#findora-apy").html("20.04");
- $("#findora-total-delegation").html("8920165");
+ $("#findora-total-delegation").html("8,920,165");
$("#findora-lockup").html("0");
+ $(".findora-address").html("C58FE884BBF17C111A77910FF485666662672199");
+ $(".findora-apy").html("20.04");
+ $(".findora-voting").html("8,920,165");
+ $(".findora-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime | 0% commission on Findora chain throughout 2022.");
},
});
}
@@ -195,26 +293,36 @@ function velasDetails() {
timeout: 5000,
success: function (data) {
// let totalApr = parseFloat(data.validator.commission).toFixed(2);
+ let address = '9RBTmYrzcqEfX2bx8iAHHusDNAqzrhYfeLWRFMHGSG53';
+ let velasDescription = "PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime | 0% commission";
let totalApr = 10;
let totalDelegation = Math.floor(parseInt(data.validator.activated_stake).toFixed(7));
let str_totalD = totalDelegation.toString();
totalDelegation= Number(str_totalD.slice(0, 7));
let totalDelegators = Math.floor(data.stakers.length);
let lockup = 0;
- console.log("VELAS BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
- console.log(data);
- console.log("=======================================================================");
+ // console.log("VELAS BLOCKCHAIN");
+ // console.log("=======================================================================");
+ // console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + "; Total Delegators:" + totalDelegators);
+ // console.log(data);
+ // console.log("=======================================================================");
$("#velas-apy").html(totalApr);
- $("#velas-total-delegation").html(totalDelegation);
+ $("#velas-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#velas-lockup").html(lockup);
+ $(".velas-address").html(address);
+ $(".velas-apy").html(totalApr);
+ $(".velas-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".velas-description").html(velasDescription);
},
error: function (err) {
console.log(err);
$("#velas-apy").html("10");
- $("#velas-total-delegation").html("2800039");
+ $("#velas-total-delegation").html("2,800,039");
$("#velas-lockup").html("0");
+ $(".velas-address").html("9RBTmYrzcqEfX2bx8iAHHusDNAqzrhYfeLWRFMHGSG53");
+ $(".velas-apy").html("10");
+ $(".velas-voting").html("2,800,039");
+ $(".velas-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One.| Low Commission | Secured | Maximum Server Uptime | 0% commission");
},
});
}
@@ -229,25 +337,35 @@ function sentinelDetails() {
success: function (data) {
console.log(data);
// let totalApr = parseFloat(data.validator.commission).toFixed(2);
+ let address = data.account_address;
+ let sentinelDescription = data.details;
let totalApr = 45;
let totalDelegation = Math.floor(parseInt(data.tokens).toFixed(8));
let str_totalD = totalDelegation.toString();
totalDelegation= Number(str_totalD.slice(0, 8));
let lockup = 0;
- console.log("SENTINEL BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + ";");
- console.log(data);
- console.log("=======================================================================");
+ // console.log("SENTINEL BLOCKCHAIN");
+ // console.log("=======================================================================");
+ // console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + ";");
+ // console.log(data);
+ // console.log("=======================================================================");
$("#sentinel-apy").html(totalApr);
- $("#sentinel-total-delegation").html(totalDelegation);
+ $("#sentinel-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#sentinel-lockup").html(lockup);
+ $(".sentinel-address").html(address);
+ $(".sentinel-apy").html(totalApr);
+ $(".sentinel-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".sentinel-description").html(sentinelDescription);
},
error: function (err) {
console.log(err);
$("#sentinel-apy").html("45");
- $("#sentinel-total-delegation").html("15777593");
+ $("#sentinel-total-delegation").html("15,777,593");
$("#sentinel-lockup").html("0");
+ $(".sentinel-address").html("sent109yg6yhcyy5mfyteqmcn3pjca9nu9s39447qvv");
+ $(".sentinel-apy").html("45");
+ $(".sentinel-voting").html("15,777,593");
+ $(".sentinel-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission on sentinel chain till 2023");
},
});
}
@@ -262,7 +380,9 @@ function assetDetails() {
success: function (data) {
let mainData = data.validators.find(e => e.operator_address === "mantlevaloper109yg6yhcyy5mfyteqmcn3pjca9nu9s39s4hgvu");
- console.log(mainData);
+ // console.log(mainData);
+ let address = "mantlevaloper109yg6yhcyy5mfyteqmcn3pjca9nu9s39s4hgvu";
+ let assetDescription = data.details;
// let totalApr = parseFloat(data.validator.commission).toFixed(2);
let totalApr = 131;
let totalDelegation = Math.floor(parseInt(mainData.delegations.total_tokens_display).toFixed(8));
@@ -270,20 +390,28 @@ function assetDetails() {
// let str_totalD = totalDelegation.toString();
// totalDelegation= Number(str_totalD.slice(0, 8));
let lockup = 0;
- console.log("ASSET MANTLE BLOCKCHAIN");
- console.log("=======================================================================");
- console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + ";");
+ // console.log("ASSET MANTLE BLOCKCHAIN");
+ // console.log("=======================================================================");
+ // console.log("Total Delegations:" + totalDelegation + "; APR:" + totalApr + "; Lock Up:" + lockup + ";");
// console.log(data);
console.log("=======================================================================");
$("#asset-apy").html(totalApr);
- $("#asset-total-delegation").html(totalDelegation);
+ $("#asset-total-delegation").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
$("#asset-lockup").html(lockup);
+ $(".asset-address").html(address);
+ $(".asset-apy").html(totalApr);
+ $(".asset-voting").html(totalDelegation.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
+ $(".asset-description").html(assetDescription);
},
error: function (err) {
console.log(err);
$("#asset-apy").html("131");
- $("#asset-total-delegation").html("282897");
+ $("#asset-total-delegation").html("282,897");
$("#asset-lockup").html("0");
+ $(".asset-address").html("mantlevaloper109yg6yhcyy5mfyteqmcn3pjca9nu9s39s4hgvu");
+ $(".asset-apy").html("131");
+ $(".asset-voting").html("282,897");
+ $(".asset-description").html("PoS As-a-Service | Multi-Chain Validator | Secure PoS Blockchain and earn reward by delegating to Strata One| Low Commission | Secured | Maximum Server Uptime🚀 | 0% commission till 2023");
},
});
}
@@ -416,4 +544,56 @@ function calculatereturns(){
let thereturn = document.querySelector(".return-value");
thereturn.innerHTML = Math.round(returnValue)
+}
+
+
+
+function cardFindora(){
+ $(".validator-address").html($(".findora-address").html());
+ $(".validator-apy").html($(".findora-apy").html());
+ $(".validator-voting-power").html($(".findora-voting").html());
+ $(".validator-description").html($(".findora-description").html());
+ $(".thecardhead").html("

FINDORA");
+}
+function cardOasis(){
+ $(".validator-address").html($(".oasis-address").html());
+ $(".validator-apy").html($(".oasis-apy").html());
+ $(".validator-voting-power").html($(".oasis-voting").html());
+ $(".validator-description").html($(".oasis-description").html());
+ $(".thecardhead").html("

OASIS");
+}
+function cardSentinel(){
+ $(".validator-address").html($(".sentinel-address").html());
+ $(".validator-apy").html($(".sentinel-apy").html());
+ $(".validator-voting-power").html($(".sentinel-voting").html());
+ $(".validator-description").html($(".sentinel-description").html());
+ $(".thecardhead").html("

SENTINEL");
+}
+function cardHarmony(){
+ $(".validator-address").html($(".harmony-address").html());
+ $(".validator-apy").html($(".harmony-apy").html());
+ $(".validator-voting-power").html($(".harmony-voting").html());
+ $(".validator-description").html($(".harmony-description").html());
+ $(".thecardhead").html("

HARMONY");
+}
+function cardAsset(){
+ $(".validator-address").html($(".asset-address").html());
+ $(".validator-apy").html($(".asset-apy").html());
+ $(".validator-voting-power").html($(".asset-voting").html());
+ $(".validator-description").html($(".asset-description").html());
+ $(".thecardhead").html("

MANTLE ASSET");
+}
+function cardVelas(){
+ $(".validator-address").html($(".velas-address").html());
+ $(".validator-apy").html($(".velas-apy").html());
+ $(".validator-voting-power").html($(".velas-voting").html());
+ $(".validator-description").html($(".velas-description").html());
+ $(".thecardhead").html("

VELAS");
+}
+function cardPersistence(){
+ $(".validator-address").html($(".persistence-address").html());
+ $(".validator-apy").html($(".persistence-apy").html());
+ $(".validator-voting-power").html($(".persistence-voting").html());
+ $(".validator-description").html($(".persistence-description").html());
+ $(".thecardhead").html("

PERSISTENCE");
}
\ No newline at end of file
diff --git a/views/home.ejs b/views/home.ejs
index 3d2bad6..df6b379 100644
--- a/views/home.ejs
+++ b/views/home.ejs
@@ -99,7 +99,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
-
-
+
+
@@ -783,32 +827,73 @@ Overall, staking can be a way to maximize your crypto investments by earning add
-
-
+
+
-
-
-
-
FINDORA
+
+
+
+
+
+
Address
+
+
+
+
Uptime
+
+
APY
+
+
Commission
+
+
Voting Power
+
+
+
-
-
11.7% APY
+
+
+
+
+ Contact
+
+
+
+ Website
+
+
+
+
+
+
+
+
+
+ PoS As-a-Service | Multi-Chain Validator |
+ Secure PoS Blockchain and earn reward by
+ delegating to Strata One| Low Commission |
+ Secured | Maximum Server Uptime🚀 | 0% commission
-
-
PRICE: $<%= dataFindoraPrice
- %>
-
TOTAL DELIGATION: 50,000,000
-
LOCK UP: 21 days
-
FEE: 0.0%
-
...
From 1e70b286f165fec8048c3e55b8d10c8e6f1f1776 Mon Sep 17 00:00:00 2001
From: Pureheart Moluno <39631660+pmoluno@users.noreply.github.com>
Date: Wed, 1 Mar 2023 05:43:01 +0100
Subject: [PATCH 4/4] Updated Card Size & Calculator Style
---
public/css/style.css | 9 ++++++---
public/js/script.js | 13 +++++++++++--
views/home.ejs | 11 ++++++-----
3 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/public/css/style.css b/public/css/style.css
index abba689..e2ac00f 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -925,12 +925,15 @@ color: #0A142F;
font-family: 'Poppins', sans-serif;
font-style: normal;
font-weight: 400;
- font-size: 12.6959px;
+ font-size: 20.6959px;
padding: 0;
margin: 0;
color: #ffffff;
/* line-height: 30px; */
}
+#calculator .returns{
+ font-size: 13px;
+}
.list-of-calculator-assets{
background-color: #000000;
color: #ffffff;
@@ -952,7 +955,7 @@ border-radius: 9px;
.modal-card{
background-color: #272727;
color: white;
- font-size: 12px;
+ font-size: 15px;
}
.modal-body .row div.col-8{
background-color: #4e4e4e !important;
@@ -964,5 +967,5 @@ border-radius: 9px;
padding: 10px;
}
.extra-extra-small{
- font-size: 5px;
+ font-size: 7px;
}
\ No newline at end of file
diff --git a/public/js/script.js b/public/js/script.js
index bcbdd0f..f3fb10c 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -534,15 +534,24 @@ durationValue.addEventListener('input', calculatereturns);
function calculatereturns(){
let duration = document.querySelector(".duration-value");
let mainduration = (Number(duration.innerHTML) / 12);
+ let oneMonth = 1/ 12;
+ let sixMonth = 6/ 12;
+ let oneYear = 12/12;
let mainamount = document.querySelector(".amount-value");
let amount = mainamount.innerHTML;
let theamount =Number(amount);
let mainapyvalue = document.querySelector(".apy-value");
let apyvalue = mainapyvalue.innerHTML;
let newapyvalue = Number(apyvalue)/100;
- let returnValue = Number(amount)*(1 + (newapyvalue/12))**(12 * mainduration);
+ let returnValueyear = Number(amount)*(1 + (newapyvalue/12))**(12 * oneYear);
+ let returnValuemonth = Number(amount)*(1 + (newapyvalue/12))**(12 * oneMonth);
+ let returnValuesixmonth = Number(amount)*(1 + (newapyvalue/12))**(12 * sixMonth);
+ let thereturnmonth = document.querySelector(".return-value-month");
+ let thereturnsixmonth = document.querySelector(".return-value-six-month");
let thereturn = document.querySelector(".return-value");
- thereturn.innerHTML = Math.round(returnValue)
+ thereturn.innerHTML = Math.round(returnValueyear);
+ thereturnmonth.innerHTML = Math.round(returnValuemonth );
+ thereturnsixmonth.innerHTML = Math.round(returnValuesixmonth);
}
diff --git a/views/home.ejs b/views/home.ejs
index df6b379..73983f1 100644
--- a/views/home.ejs
+++ b/views/home.ejs
@@ -341,19 +341,20 @@
-
FINDORA
-
+
FINDORA
+
Apy: 20.04%
+
-
-
Apy: 20.04%
Returns: $5522
+
Monthly:
$5522
6 Months:
$5522
Yearly:
$5522
@@ -827,7 +828,7 @@ Overall, staking can be a way to maximize your crypto investments by earning add