Skip to content

Commit

Permalink
chop 6 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
ftm1337 committed Nov 17, 2024
1 parent 263ea2d commit de53c91
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,18 @@ button:disabled {
text-align: left;
}

#spotlight-svg svg {
width: calc(min(75vw,75vh));
height:calc(min(75vw,75vh));
}

#spotlight-svg svg * {
font-family: sans-serif !important;
}

#spotlight-svg svg .mo {
font-family: monospace !important;
}
@media (max-width: 700px) {
.topstats {
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ <h3>No NFT selected!</h3>
<br>Please log in to view your eLOCKS or Search for an eLOCK above.
</div>
</div>
<div id="spotlight-svg"></div>
</div>
</div>

Expand Down
18 changes: 17 additions & 1 deletion docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ async function searchNFT(_NFTID) {
<br><br>
<h3>Claimable Farming Rewards</h3>
${LD.srewards[0]?LD.srewards[0]:"Unknown Token"} : ${ LD.crewards[0]?(LD.crewards[0]/(LD.drewards[0]?LD.drewards[0]:1)).toFixed(Math.log10(LD.drewards[0]?LD.drewards[0]:1)):0 }
${LD.srewards[0]?GAUGE_REWARD_0:"Unknown Token"} : ${ LD.crewards[0]?(LD.crewards[0]/(LD.drewards[0]?LD.drewards[0]:1)).toFixed(Math.log10(LD.drewards[0]?LD.drewards[0]:1)):0 }
<br><button class="submit equal-gradient" onclick="LD_claimRewards()"> Claim Farming Rewards </button>
<br><br>
Expand Down Expand Up @@ -777,6 +777,22 @@ async function searchNFT(_NFTID) {
`;
}

_ELOCKS.tokenURI(_NFTID).then(uri=>{
let jo=JSON.parse(atob(uri.replace("data:application/json;base64,","")));
let so=(atob(jo.image.replace("data:image/svg+xml;base64,","")));
$("spotlight-svg").innerHTML=
"<br><br><h3>On-Chain Fully Dynamic Real-time NFT Artwork</h3>"
+ so
.replaceAll("🔐","🔐")
.replaceAll("⇢","⇢")
.replaceAll("sans-serif","")
+ "<p style='font-family:light;font-size:0.8em;'>View it on your Favorite NFT market, or add it to your Favorite wallet!"
+ "<br>"
+ LOCKER_ROOM
//+ "<br><br>Now also available as LockScreen Wallpaper for Ledger Stax & KeyStone Pro!"
+ "</p>";
})

/*
<br>Quote Token : <a href='${ EXPLORE+"address/"+LD. }' target="_blank">${ LD..substr(0,10)+"-"+ LD..substr(-8)}</a>
<br>Base Token : <a href='${ EXPLORE+"address/"+LD. }' target="_blank">${ LD..substr(0,10)+"-"+ LD..substr(-8)}</a>
Expand Down

0 comments on commit de53c91

Please sign in to comment.