UI update

-- added performance graph
This commit is contained in:
sairaj mote 2021-06-14 18:14:50 +05:30
parent 55c1fc257f
commit 1926084bdb
6 changed files with 332 additions and 64 deletions

View File

@ -435,19 +435,20 @@ ol[type="1"] {
gap: 1rem; gap: 1rem;
padding: 0.5rem 0 0.5rem 1rem; padding: 0.5rem 0 0.5rem 1rem;
align-items: center; align-items: center;
background-color: var(--banner-color); border: 0.1rem solid var(--banner-color);
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
border-radius: 0.5rem;
margin: 0 1rem;
} }
.banner .close-icon { .banner .close-icon {
fill: white;
width: 2.2rem; width: 2.2rem;
height: 2.2rem; height: 2.2rem;
color: rgba(var(--text-color), 0.7);
} }
.banner__text { .banner__text {
max-width: unset; max-width: unset;
font-size: 0.9rem; font-size: 0.9rem;
color: white;
} }
#elevator_popup { #elevator_popup {
@ -1140,18 +1141,23 @@ ol[type="1"] {
} }
.room-tile__icon { .room-tile__icon {
height: 2.5rem; position: absolute;
width: 2.5rem; height: 8rem;
margin-bottom: 1rem; width: 8rem;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
.room-tile__icon:not(.room-tile__icon--colored) { .room-tile__icon:not(.room-tile__icon--colored) {
fill: rgba(var(--text-color), 1); fill: rgba(var(--text-color), 0.1);
} }
.room-tile__title { .room-tile__title {
font-size: 1.2rem; font-size: 0.9rem;
border-bottom: 1px solid; padding: 0.4rem 0.8rem;
align-self: flex-start; border: solid 0.1rem var(--secondary-text-color);
color: var(--secondary-text-color);
border-radius: 0.3rem;
} }
#performance_preview { #performance_preview {
@ -1259,7 +1265,7 @@ ol[type="1"] {
background-size: contain; background-size: contain;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: var(--banner-color); border: solid 0.1rem var(--banner-color);
box-shadow: 0 1rem 3rem -1rem rgba(0, 0, 0, 0.2); box-shadow: 0 1rem 3rem -1rem rgba(0, 0, 0, 0.2);
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
overflow: hidden; overflow: hidden;
@ -1288,15 +1294,14 @@ ol[type="1"] {
.tile__title { .tile__title {
font-size: 1.25rem; font-size: 1.25rem;
line-height: 1; line-height: 1;
color: white;
font-weight: calc(500 * var(--font-weight-factor)); font-weight: calc(500 * var(--font-weight-factor));
z-index: 1; z-index: 1;
} }
.tile__brief { .tile__brief {
margin-top: 0.5rem; margin-top: 0.5rem;
color: rgba(255, 255, 255, 0.8);
z-index: 1; z-index: 1;
color: rgba(var(--text-color), 0.7);
} }
.round { .round {
@ -1304,8 +1309,8 @@ ol[type="1"] {
flex-shrink: 0; flex-shrink: 0;
padding: 0.4rem 1rem; padding: 0.4rem 1rem;
border-radius: 0.3rem; border-radius: 0.3rem;
background-color: white; color: white;
color: var(--banner-color); background-color: var(--banner-color);
font-weight: 700 !important; font-weight: 700 !important;
font-size: 1rem; font-size: 1rem;
z-index: 1; z-index: 1;

File diff suppressed because one or more lines are too long

View File

@ -367,18 +367,19 @@ ol[type="1"]{
gap: 1rem; gap: 1rem;
padding: 0.5rem 0 0.5rem 1rem; padding: 0.5rem 0 0.5rem 1rem;
align-items: center; align-items: center;
background-color: var(--banner-color); border: 0.1rem solid var(--banner-color);
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
border-radius: 0.5rem;
margin: 0 1rem;
.close-icon{ .close-icon{
fill: white;
width: 2.2rem; width: 2.2rem;
height: 2.2rem; height: 2.2rem;
color: rgba(var(--text-color), 0.7);
} }
} }
.banner__text{ .banner__text{
max-width: unset; max-width: unset;
font-size: 0.9rem; font-size: 0.9rem;
color: white;
} }
#elevator_popup{ #elevator_popup{
@ -1030,17 +1031,26 @@ ol[type="1"]{
} }
} }
.room-tile__icon{ .room-tile__icon{
height: 2.5rem; position: absolute;
width: 2.5rem; height: 8rem;
margin-bottom: 1rem; width: 8rem;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// margin-bottom: 1rem;
&:not(.room-tile__icon--colored){ &:not(.room-tile__icon--colored){
fill: rgba(var(--text-color), 1); fill: rgba(var(--text-color), 0.1);
} }
} }
.room-tile__title{ .room-tile__title{
font-size: 1.2rem; // font-size: 1.2rem;
border-bottom: 1px solid; // border-bottom: 1px solid;
align-self: flex-start; font-size: 0.9rem;
padding: 0.4rem 0.8rem;
border: solid 0.1rem var(--secondary-text-color);
color: var(--secondary-text-color);
border-radius: 0.3rem;
// align-self: flex-start;
} }
#performance_preview{ #performance_preview{
margin-top: auto; margin-top: auto;
@ -1144,7 +1154,7 @@ ol[type="1"]{
background-size: contain; background-size: contain;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: var(--banner-color); border : solid 0.1rem var(--banner-color);
box-shadow: 0 1rem 3rem -1rem rgba(0, 0, 0, 0.2); box-shadow: 0 1rem 3rem -1rem rgba(0, 0, 0, 0.2);
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
overflow: hidden; overflow: hidden;
@ -1174,22 +1184,21 @@ ol[type="1"]{
.tile__title{ .tile__title{
font-size: 1.25rem; font-size: 1.25rem;
line-height: 1; line-height: 1;
color: white;
font-weight: calc(500 * var(--font-weight-factor)); font-weight: calc(500 * var(--font-weight-factor));
z-index: 1; z-index: 1;
} }
.tile__brief{ .tile__brief{
margin-top: 0.5rem; margin-top: 0.5rem;
color: rgba(255, 255, 255, 0.8);
z-index: 1; z-index: 1;
color: rgba(var(--text-color), 0.7);
} }
.round{ .round{
display: inline-flex; display: inline-flex;
flex-shrink: 0; flex-shrink: 0;
padding: 0.4rem 1rem; padding: 0.4rem 1rem;
border-radius: 0.3rem; border-radius: 0.3rem;
background-color: white; color: white;
color: var(--banner-color); background-color: var(--banner-color);
font-weight: 700 !important; font-weight: 700 !important;
font-size: 1rem; font-size: 1rem;
z-index: 1; z-index: 1;

View File

@ -80,15 +80,21 @@
<div id="expanding_tile" class="hide-completely"></div> <div id="expanding_tile" class="hide-completely"></div>
<a class="room-tile room-tile--main" href="#performance_room"> <a class="room-tile room-tile--main" href="#performance_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Performance</h4> <svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg>
<h4 class="room-tile__title">Performance</h4>
</div>
<div id="performance_preview"></div> <div id="performance_preview"></div>
</div> </div>
</a> </a>
<a class="room-tile" href="#product_room"> <a class="room-tile" href="#product_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Product</h4> <svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg>
<h4 class="room-tile__title">Product</h4>
</div>
</div> </div>
</a> </a>
<!-- <a class="room-tile" href="#purchase_room"> <!-- <a class="room-tile" href="#purchase_room">
@ -108,6 +114,7 @@
<h1 id="hero_title"></h1> <h1 id="hero_title"></h1>
<section class="room-carousel"> <section class="room-carousel">
<section id="performance_room" class="grid room"> <section id="performance_room" class="grid room">
<canvas id="performance_graph"></canvas>
<p>Bitcoin bonds different series release timeline</p> <p>Bitcoin bonds different series release timeline</p>
<ul id="bit_bond_series__container" class="timeline-container"></ul> <ul id="bit_bond_series__container" class="timeline-container"></ul>
</section> </section>
@ -264,6 +271,7 @@
</section> </section>
</main> </main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.3.2/dist/chart.min.js"></script>
<script src="assets/js/components.js"></script> <script src="assets/js/components.js"></script>
<script src="assets/js/index.js"></script> <script src="assets/js/index.js"></script>
<script> <script>
@ -335,16 +343,27 @@
return tmp return tmp
} }
function calcNetValue(BTC_base, startDate, minIpa, maxPeriod, cut, amount, USD_base) { function calcNetValue(obj) {
console.log(BTC_base, startDate, minIpa, maxPeriod, cut, amount, USD_base) let {isHistorical = false, BTC_base, startDate, minIpa, maxPeriod, cut, amount, USD_base, histBtc, histUsd} = obj
let gain, interest, net; let gain, interest, net;
gain = (BTC_current - BTC_base) / BTC_base; if(isHistorical){
gain = (histBtc - BTC_base) / BTC_base;
}
else{
gain = (BTC_current - BTC_base) / BTC_base;
}
interest = Math.max(cut * gain, minIpa * Math.min(yrDiff(startDate), maxPeriod)); interest = Math.max(cut * gain, minIpa * Math.min(yrDiff(startDate), maxPeriod));
net = amount / USD_base; net = amount / USD_base;
net += net * interest; net += net * interest;
const percentGain = (((net * USD_current) - amount) / amount) * 100 if(isHistorical){
currentValue = net * histUsd
}
else{
currentValue = net * USD_current
}
const percentGain = ((currentValue - amount) / amount) * 100
//console.info(gain, interest, net) //console.info(gain, interest, net)
return [net * USD_current, percentGain]; return [currentValue, percentGain];
} }
function renderAllSeries(){ function renderAllSeries(){
@ -352,8 +371,17 @@
getRef('bit_bond_series__container').innerHTML = '' getRef('bit_bond_series__container').innerHTML = ''
const randIndex = getRandom(0, bitBondSerieses.length - 1) const randIndex = getRandom(0, bitBondSerieses.length - 1)
bitBondSerieses.forEach((series, index) => { bitBondSerieses.forEach((series, index) => {
const [currentValue, percentGain] = calcNetValue(series.series, series.startDate, 0.13, 5, 0.5, 100, 64) let obj = {
const obj = { BTC_base: series.series,
startDate: series.startDate,
minIpa: 0.13,
maxPeriod: 5,
cut: 0.5,
amount: 100,
USD_base: 64
}
const [currentValue, percentGain] = calcNetValue(obj)
const bondObj = {
series: series.series, series: series.series,
percentGain, percentGain,
timeElapsed: new Date().getFullYear() - new Date(series.startDate).getFullYear(), timeElapsed: new Date().getFullYear() - new Date(series.startDate).getFullYear(),
@ -367,15 +395,103 @@
text: getFormatedTime(series.startDate, true) text: getFormatedTime(series.startDate, true)
}) })
if(randIndex === index){ if(randIndex === index){
getRef('performance_preview').append(render.bitBondRow(obj)) renderGraph(obj)
getRef('performance_preview').append(render.bitBondRow(bondObj))
} }
timelineItem.append(tilelineItemHeader, render.bitBondRow(obj)) timelineItem.append(tilelineItemHeader, render.bitBondRow(bondObj))
frag.append(timelineItem) frag.append(timelineItem)
}) })
getRef('bit_bond_series__container').append(frag) getRef('bit_bond_series__container').append(frag)
} }
async function getPrices() {
return [btcPrices, inrPrices] = await Promise.all([
fetch('https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_MONTHLY&symbol=BTC&market=USD&apikey=DDN5S53DXQ4QH4V4').then(res => res.json()),
fetch('https://www.alphavantage.co/query?function=FX_MONTHLY&from_symbol=USD&to_symbol=INR&apikey=DDN5S53DXQ4QH4V4').then(res => res.json()),
])
}
let dates = []
let historicalData = []
let tableOfData = []
async function getData(obj) {
let [btcPrices, inrPrices] = await getPrices()
btcPrices = btcPrices['Time Series (Digital Currency Monthly)']
inrPrices = inrPrices['Time Series FX (Monthly)']
let allBtcPrices = []
let counter = 0
for (let dataPoint in btcPrices) {
if (counter < 12) {
let BTC_base = btcPrices[dataPoint]['1a. open (USD)']
allBtcPrices.push(BTC_base)
dates.push(dataPoint.split('-').join('/'))
counter++
}
else {
break
}
}
let index = 0
for (let dataPoint in inrPrices) {
if (allBtcPrices[index]) {
let histBtc = parseFloat(allBtcPrices[index])
let histUsd = parseFloat(inrPrices[dataPoint]['1. open'])
obj.isHistorical = true
let [currentValue, gain] = calcNetValue({...obj, histBtc, histUsd})
// console.log(currentValue)
historicalData.push(currentValue)
index++
}
else {
break
}
}
}
let ctx = getRef('performance_graph').getContext('2d');
let gradientFill = ctx.createLinearGradient(200, 0, 200, 400);
gradientFill.addColorStop(0, "rgba(128, 182, 244, 0.6)");
gradientFill.addColorStop(1, "transparent");
async function renderGraph(obj) {
await getData(obj)
let myChart = new Chart(ctx, {
type: 'line',
data: {
labels: dates.reverse(),
datasets: [{
label: `$${obj.BTC_base} series performace($)`,
data: historicalData.reverse(),
borderColor: '#034baa',
fill: true,
backgroundColor: gradientFill,
borderWidth: 4,
tension: 0.3
}]
},
options: {
responsive: true,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true
},
x: {
grid: {
display: false
}
}
}
}
});
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -74,15 +74,20 @@
<div id="expanding_tile" class="hide-completely"></div> <div id="expanding_tile" class="hide-completely"></div>
<a class="room-tile room-tile--main" href="#performance_room"> <a class="room-tile room-tile--main" href="#performance_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Performance</h4> <svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg>
<h4 class="room-tile__title">Performance</h4>
</div>
<div id="performance_preview"></div> <div id="performance_preview"></div>
</div> </div>
</a> </a>
<a class="room-tile" href="#product_room"> <a class="room-tile" href="#product_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Product</h4> <svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg>
<h4 class="room-tile__title">Product</h4>
</div>
</div> </div>
</a> </a>
<!-- <a class="room-tile" href="#purchase_room"> <!-- <a class="room-tile" href="#purchase_room">
@ -102,6 +107,7 @@
<h1 id="hero_title"></h1> <h1 id="hero_title"></h1>
<section class="room-carousel"> <section class="room-carousel">
<section id="performance_room" class="grid room"> <section id="performance_room" class="grid room">
<canvas id="performance_graph"></canvas>
<p>Bobs fund different fund release timeline</p> <p>Bobs fund different fund release timeline</p>
<ul id="bobs_fund_timeline" class="timeline-container"></ul> <ul id="bobs_fund_timeline" class="timeline-container"></ul>
</section> </section>
@ -191,6 +197,7 @@
</main> </main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.1/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.3.2/dist/chart.min.js"></script>
<script src="assets/js/components.js"></script> <script src="assets/js/components.js"></script>
<script src="assets/js/index.js"></script> <script src="assets/js/index.js"></script>
<script> <script>
@ -452,15 +459,27 @@
renderAllFundInvestors() renderAllFundInvestors()
}).catch(error => console.error(error)) }).catch(error => console.error(error))
function calcNetValue(BTC_base, USD_base, amount, fee) { function calcNetValue(obj) {
let gain, interest, net; let {isHistorical = false, BTC_base, USD_base, amount, fee, histBtc, histUsd} = obj
gain = (BTC_current - BTC_base) / BTC_base; let gain, interest, net = 0, currentValue = 0;
console.info(obj)
if(isHistorical){
gain = (histBtc - BTC_base) / BTC_base;
}
else{
gain = (BTC_current - BTC_base) / BTC_base;
}
interest = gain * (1 - fee) interest = gain * (1 - fee)
net = amount / USD_base; net = amount / USD_base;
net += net * interest; net += net * interest;
percentGain = (((net * USD_current) - amount) / amount) * 100 if(isHistorical){
//console.info(gain, interest, net) currentValue = net * histUsd
return [net * USD_current, percentGain.toFixed(0)]; }
else{
currentValue = net * USD_current
}
percentGain = ((currentValue - amount) / amount) * 100
return [currentValue, percentGain.toFixed(0)];
} }
function renderAllFundInvestors(){ function renderAllFundInvestors(){
const frag = document.createDocumentFragment() const frag = document.createDocumentFragment()
@ -478,7 +497,13 @@
if(fund.hasOwnProperty('investors')){ if(fund.hasOwnProperty('investors')){
investors.forEach(investor => { investors.forEach(investor => {
let [currentValue, gain] = calcNetValue(BTC_base, USD_base, investor.invested, 0) let obj = {
BTC_base,
USD_base,
amount: investor.invested,
fee: 0
}
let [currentValue, gain] = calcNetValue(obj)
currentValue = parseFloat(currentValue.toFixed(2)) currentValue = parseFloat(currentValue.toFixed(2))
timeElapsed = (new Date().getFullYear() - 2017) timeElapsed = (new Date().getFullYear() - 2017)
frag.append(render.bobFundRow({...investor, currentValue, gain, timeElapsed})) frag.append(render.bobFundRow({...investor, currentValue, gain, timeElapsed}))
@ -499,7 +524,13 @@
const fundCard = create('div', { const fundCard = create('div', {
className: 'grid card' className: 'grid card'
}) })
let [currentValue, gain] = calcNetValue(BTC_base, USD_base, invested, 0) let obj = {
BTC_base,
USD_base,
amount: invested,
fee: 0
}
let [currentValue, gain] = calcNetValue(obj)
currentValue = parseFloat(currentValue.toFixed(2)) currentValue = parseFloat(currentValue.toFixed(2))
fundCard.innerHTML = ` fundCard.innerHTML = `
<div class="flex space-between"> <div class="flex space-between">
@ -520,10 +551,17 @@
timelineItemsFrag.append(timelineItem) timelineItemsFrag.append(timelineItem)
if(index === 0){ if(index === 0){
let obj = {
BTC_base,
USD_base,
amount: invested,
fee: 0,
}
renderGraph(obj)
const fundCard = create('div', { const fundCard = create('div', {
className: 'grid card' className: 'grid card'
}) })
let [currentValue, gain] = calcNetValue(BTC_base, USD_base, invested, 0) let [currentValue, gain] = calcNetValue(obj)
currentValue = parseFloat(currentValue.toFixed(2)) currentValue = parseFloat(currentValue.toFixed(2))
fundCard.innerHTML = ` fundCard.innerHTML = `
<div class="grid"> <div class="grid">
@ -546,6 +584,98 @@
}) })
getRef('bobs_fund_timeline').append(timelineItemsFrag) getRef('bobs_fund_timeline').append(timelineItemsFrag)
} }
async function getPrices() {
return [btcPrices, inrPrices] = await Promise.all([
fetch('https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_MONTHLY&symbol=BTC&market=USD&apikey=DDN5S53DXQ4QH4V4').then(res => res.json()),
fetch('https://www.alphavantage.co/query?function=FX_MONTHLY&from_symbol=USD&to_symbol=INR&apikey=DDN5S53DXQ4QH4V4').then(res => res.json()),
])
}
let dates = []
let historicalData = []
let tableOfData = []
async function getData(obj) {
let [btcPrices, inrPrices] = await getPrices()
btcPrices = btcPrices['Time Series (Digital Currency Monthly)']
inrPrices = inrPrices['Time Series FX (Monthly)']
let allBtcPrices = []
let counter = 0
for (let dataPoint in btcPrices) {
if (counter < 12) {
let BTC_base = btcPrices[dataPoint]['1a. open (USD)']
allBtcPrices.push(BTC_base)
dates.push(dataPoint.split('-').join('/'))
counter++
}
else {
break
}
}
let index = 0
for (let dataPoint in inrPrices) {
if (allBtcPrices[index]) {
let histBtc = parseFloat(allBtcPrices[index])
let histUsd = parseFloat(inrPrices[dataPoint]['1. open'])
obj.isHistorical = true
let [currentValue, gain] = calcNetValue({...obj, histBtc, histUsd})
// console.log(currentValue)
historicalData.push(currentValue)
index++
}
else {
break
}
}
}
let ctx = getRef('performance_graph').getContext('2d');
let gradientFill = ctx.createLinearGradient(200, 0, 200, 400);
gradientFill.addColorStop(0, "rgba(128, 182, 244, 0.6)");
gradientFill.addColorStop(1, "transparent");
async function renderGraph(obj) {
await getData(obj)
let myChart = new Chart(ctx, {
type: 'line',
data: {
labels: dates.reverse(),
datasets: [{
label: `Bob's fund performace($)`,
data: historicalData.reverse(),
borderColor: '#034baa',
fill: true,
backgroundColor: gradientFill,
pointBackgroundColor: 'white',
pointRadius: 4,
pointHoverRadius: 6,
pointHoverBorderWidth: 4,
borderWidth: 2,
tension: 0.3
}]
},
options: {
responsive: true,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true
},
x: {
grid: {
display: false
}
}
}
}
});
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -100,20 +100,28 @@
<div id="expanding_tile" class="hide-completely"></div> <div id="expanding_tile" class="hide-completely"></div>
<a class="room-tile room-tile--main" href="#investor_room"> <a class="room-tile room-tile--main" href="#investor_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Investors</h4> <svg class="room-tile__icon" id="b23be00b-0d64-4bed-9d99-6f7aaf421af4" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M44.53,26.6a7.17,7.17,0,1,1,5.07-2.1h0A7.16,7.16,0,0,1,44.53,26.6Zm0-11.47a4.31,4.31,0,1,0,3,1.26A4.31,4.31,0,0,0,44.53,15.13Z"/><path d="M62.58,1.38A4.7,4.7,0,0,0,58.35.09L45.09,2.66a14.61,14.61,0,0,0-7.56,4L19.92,24.29l-9,2.23a8.75,8.75,0,0,0-4.1,2.31L.46,35.2a1.43,1.43,0,0,0,1,2.44h.08L10,37.2l1.67,1.68L6.85,41.23a1.43,1.43,0,0,0-.38,2.3l14,14a1.44,1.44,0,0,0,1,.42l.24,0a1.47,1.47,0,0,0,1.05-.78l2.35-4.79,1.61,1.6-.45,8.58a1.43,1.43,0,0,0,.85,1.38,1.51,1.51,0,0,0,.58.12,1.44,1.44,0,0,0,1-.42l6.37-6.36a8.75,8.75,0,0,0,2.31-4.1l2.23-9,17.7-17.7a14.5,14.5,0,0,0,4-7.56L63.87,5.61A4.7,4.7,0,0,0,62.58,1.38ZM21,54.05,9.91,42.92,13.78,41,23,50.18ZM8.85,30.86a5.82,5.82,0,0,1,2.76-1.56L16,28.21,10.23,34l-.37.37-4.74.25ZM34.58,52.43A5.89,5.89,0,0,1,33,55.19l-3.74,3.73.25-4.74,6.13-6.13Zm20.68-28-18,18h0l-9,9-7.85-7.86-5.31-5.3h0l-2.55-2.54,27-27a11.72,11.72,0,0,1,5.38-3L58.3,19A11.64,11.64,0,0,1,55.26,24.41Zm5.8-19.34L59,15.68,48.28,5,58.89,2.9a1.85,1.85,0,0,1,2.17,2.17Z"/><path d="M2.63,62.76a1.41,1.41,0,0,1-1-.41,1.44,1.44,0,0,1,0-2l8.12-8.13a1.44,1.44,0,0,1,2,2L3.64,62.35A1.42,1.42,0,0,1,2.63,62.76Z"/><path d="M10.75,62.76a1.43,1.43,0,0,1-1-2.44l4.06-4.07a1.43,1.43,0,0,1,2,2l-4.06,4.06A1.43,1.43,0,0,1,10.75,62.76Z"/><path d="M2.63,54.64a1.43,1.43,0,0,1-1-2.44l4.07-4.06a1.43,1.43,0,0,1,2,2L3.65,54.22A1.44,1.44,0,0,1,2.63,54.64Z"/></svg>
<h4 class="room-tile__title">Investors</h4>
</div>
</div> </div>
</a> </a>
<a class="room-tile" href="#product_room"> <a class="room-tile" href="#product_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Product</h4> <svg class="room-tile__icon" id="b76bf456-6b89-4220-8b44-f4f7d833bad6" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M61.28,22.11c0-.05,0-.09,0-.14L58.62,6A1.68,1.68,0,0,0,57,4.6H7A1.68,1.68,0,0,0,5.38,6L2.72,22c0,.05,0,.09,0,.14s0,.09,0,.14V57.72A1.68,1.68,0,0,0,4.38,59.4H59.62a1.68,1.68,0,0,0,1.68-1.68V22.25C61.3,22.2,61.28,22.16,61.28,22.11Zm-3.64-1.54H39.34L38.51,8h17ZM27.92,23.93h8.16v6.64L33,28.41a1.7,1.7,0,0,0-1.9,0l-3.13,2.16ZM35.15,8,36,20.57H28L28.91,8ZM8.46,8H25.55l-.88,12.61H6.36ZM57.94,56H6.06V23.93h18.5v9.84a1.67,1.67,0,0,0,2.63,1.38L32,31.84l4.81,3.31a1.65,1.65,0,0,0,.95.3,1.76,1.76,0,0,0,.78-.19,1.68,1.68,0,0,0,.9-1.49V23.93h18.5Z"/></svg>
<h4 class="room-tile__title">Product</h4>
</div>
</div> </div>
</a> </a>
<a class="room-tile" href="#purchase_room"> <a class="room-tile" href="#purchase_room">
<div class="tile-content"> <div class="tile-content">
<svg class="room-tile__icon" id="bb329e59-3d30-49a7-ac0d-b164d3b3b631" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M42.74,64a14,14,0,1,1,14-14A14,14,0,0,1,42.74,64Zm0-24.73A10.7,10.7,0,1,0,53.44,50,10.71,10.71,0,0,0,42.74,39.27Z"/><path d="M28.7,50H14.08a3.43,3.43,0,0,1-3.42-3.58l1.4-31.51h4.85V17.8a1.71,1.71,0,1,0,3.42,0V14.88H33V17.8a1.71,1.71,0,1,0,3.42,0V14.88h4.84L42.2,36c.18,0,.35,0,.54,0a13.92,13.92,0,0,1,2.9.31l-1.1-24.8H36.42V9.76a9.76,9.76,0,1,0-19.51,0v1.69H8.79L7.24,46.24a6.85,6.85,0,0,0,6.84,7.15H29.14A14.24,14.24,0,0,1,28.7,50ZM20.33,9.76A6.34,6.34,0,1,1,33,9.76v1.69H20.33Z"/><path d="M41.23,54.65a1.69,1.69,0,0,1-1.18-.49l-3-3a1.67,1.67,0,0,1,2.35-2.36l1.84,1.84,4.85-4.85a1.66,1.66,0,0,1,2.35,2.35l-6,6A1.67,1.67,0,0,1,41.23,54.65Z"/></svg> <div class="grid flow-column gap-1 justify-start align-center">
<h4 class="room-tile__title">Buy</h4> <svg class="room-tile__icon" id="bb329e59-3d30-49a7-ac0d-b164d3b3b631" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M42.74,64a14,14,0,1,1,14-14A14,14,0,0,1,42.74,64Zm0-24.73A10.7,10.7,0,1,0,53.44,50,10.71,10.71,0,0,0,42.74,39.27Z"/><path d="M28.7,50H14.08a3.43,3.43,0,0,1-3.42-3.58l1.4-31.51h4.85V17.8a1.71,1.71,0,1,0,3.42,0V14.88H33V17.8a1.71,1.71,0,1,0,3.42,0V14.88h4.84L42.2,36c.18,0,.35,0,.54,0a13.92,13.92,0,0,1,2.9.31l-1.1-24.8H36.42V9.76a9.76,9.76,0,1,0-19.51,0v1.69H8.79L7.24,46.24a6.85,6.85,0,0,0,6.84,7.15H29.14A14.24,14.24,0,0,1,28.7,50ZM20.33,9.76A6.34,6.34,0,1,1,33,9.76v1.69H20.33Z"/><path d="M41.23,54.65a1.69,1.69,0,0,1-1.18-.49l-3-3a1.67,1.67,0,0,1,2.35-2.36l1.84,1.84,4.85-4.85a1.66,1.66,0,0,1,2.35,2.35l-6,6A1.67,1.67,0,0,1,41.23,54.65Z"/></svg>
<h4 class="room-tile__title">Buy</h4>
</div>
</div> </div>
</a> </a>
</section> </section>
@ -172,7 +180,7 @@
<section id="purchase_room" class="grid room"> <section id="purchase_room" class="grid room">
<p> <p>
Currently we are not selling any RanchiMall Tokens (RMT). You can buy nominal tokens at Currently we are not selling any RanchiMall Tokens (RMT). You can buy nominal tokens at
our last valuation in <a href="https://www.ranchimall.net/exchange/">our exchange</a> for $10 or ₹500 if you want to become a our last valuation in <a href="https://www.ranchimall.net/exchange/" target="_blank">our exchange</a> for $10 or ₹500 if you want to become a
tokenholder, and be part of the learning process through our community. Our rules are designed to tokenholder, and be part of the learning process through our community. Our rules are designed to
favour long term investors. favour long term investors.
<br> Once you initiate a tokenholder relationship, please be patient to stay the <br> Once you initiate a tokenholder relationship, please be patient to stay the