UI update

-- Added shortcuts for rooms when a room is already open

-- added current data for bitcoin bonds and bob's fund
This commit is contained in:
sairaj mote 2021-06-03 00:12:53 +05:30
parent 71bd98edbb
commit f6a5e24448
8 changed files with 693 additions and 513 deletions

View File

@ -45,14 +45,6 @@
<svg class="icon sun-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></svg> <svg class="icon sun-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></svg>
</label> </label>
</header> </header>
<section class="banner">
<p class="banner__text">
We are servicing current customers only. A new Blockchain-based version of Bitcoin Bonds will be available soon.
</p>
<button class="close-button" onclick="this.parentNode.remove()">
<svg class="icon icon-only close-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></svg>
</button>
</section>
<div id="outlet_switcher" class="grid gap-1-5 hide"> <div id="outlet_switcher" class="grid gap-1-5 hide">
<div class="flex align-center"> <div class="flex align-center">
<svg class="icon button__icon--left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" <svg class="icon button__icon--left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24"
@ -98,9 +90,9 @@
It offers full capital protection if Bitcoin prices fall below acquisition price. It offers full capital protection if Bitcoin prices fall below acquisition price.
</p> </p>
</section> </section>
<div class="rooms__header"> <header class="rooms__header">
<h4 class="room__label">Rooms</h4> <h4 class="room__label">Rooms</h4>
</div> </header>
<section class="rooms-layout"> <section class="rooms-layout">
<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">
@ -242,110 +234,112 @@
directly on that FLO ID. Please drop your name and phone number along with FLO ID. directly on that FLO ID. Please drop your name and phone number along with FLO ID.
</p> </p>
</section> </section>
<footer class="room-container__footer">
<h4>Related rooms</h4>
<div id="room_switcher"></div>
</footer>
</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="js/components.js"></script> <script src="js/components.js"></script>
<script src="js/index.js"></script> <script src="js/index.js"></script>
<script> <script>
const bitBondSerieses = [
{
series: 975,
startDate: 1485993600000
},
{
series: 1057,
startDate: 1486425600000
},
{
series: 1064,
startDate: 1487289600000
},
{
series: 1205,
startDate: 1488412800000
},
{
series: 1285,
startDate: 1488585600000
},
{
series: 2513,
startDate: 1496880000000
}
]
function getCurrentRates() {
let fetchData = api => new Promise((resolve, reject) => {
fetch(api).then(response => {
if (response.ok)
response.json().then(data => resolve(data))
else
reject(response)
}).catch(error => reject(error))
})
return new Promise((resolve, reject) => {
fetchData(`https://bitpay.com/api/rates`).then(result => {
let BTC_USD, BTC_INR, USD_INR
for (let i of result)
i.code == "USD" ? BTC_USD = i.rate : i.code == "INR" ? BTC_INR = i.rate : null;
USD_INR = BTC_INR / BTC_USD;
resolve({
BTC_USD,
BTC_INR,
USD_INR
})
}).catch(error => reject(error))
})
}
let USD_current, BTC_current
getCurrentRates().then(async (rates) => {
USD_current = rates.USD_INR;
BTC_current = rates.BTC_USD;
renderAllSeries()
}).catch(error => console.error(error))
function yrDiff(d1 = null, d2 = null) {
d1 = d1 ? new Date(d1) : new Date();
d2 = d2 ? new Date(d2) : new Date();
let tmp = Math.abs(d2 - d1)
tmp = Math.floor(tmp / (1000 * 60 * 60 * 24)); // find number of days
tmp = tmp / 365
//need to implement leap yr
return tmp
}
function calcNetValue(BTC_base, startDate, minIpa, maxPeriod, cut, amount, USD_base) {
console.log(BTC_base, startDate, minIpa, maxPeriod, cut, amount, USD_base)
let gain, interest, net;
gain = (BTC_current - BTC_base) / BTC_base;
interest = Math.max(cut * gain, minIpa * Math.min(yrDiff(startDate), maxPeriod));
net = amount / USD_base;
net += net * interest;
const percentGain = (((net * USD_current) - amount) / amount) * 100
//console.info(gain, interest, net)
return [net * USD_current, percentGain];
}
function renderAllSeries(){ function renderAllSeries(){
const frag = document.createDocumentFragment() const frag = document.createDocumentFragment()
getRef('bit_bond_series__container').innerHTML = '' getRef('bit_bond_series__container').innerHTML = ''
bitBondSerieses.forEach((series, index) => { bitBondSerieses.forEach((series, index) => {
frag.append(render.bitBondRow(series)) const [currentValue, percentGain] = calcNetValue(series.series, series.startDate, 0.13, 5, 0.5, 6400, 64)
const obj = {
series: series.series,
percentGain,
timeElapsed: new Date().getFullYear() - new Date(series.startDate).getFullYear(),
currentValue,
percentGain: percentGain.toFixed(0)
}
frag.append(render.bitBondRow(obj))
}) })
getRef('bit_bond_series__container').append(frag) getRef('bit_bond_series__container').append(frag)
} }
renderAllSeries()
let tile, tileParent, tileDimensions, tileParentDimensions
const animeInOptions = {
duration: 300,
fill: 'forwards',
easing: 'ease'
}
const animeOutOption = {
duration: 300,
fill: 'forwards',
easing: 'ease'
}
window.addEventListener('load', e => {
if(window.location.hash !== '')
showRoom(window.location.hash, false)
})
window.addEventListener('hashchange', e => {
showRoom(window.location.hash)
})
function showRoom(roomId, animate = true){
if(roomId === '') return
pauseScrolling()
tile = document.querySelector(`[href="${roomId}"]`)
tileParent = tile.parentNode
tileDimensions = tile.getBoundingClientRect()
tileParentDimensions = tileParent.getBoundingClientRect()
getRef('expanding_tile').classList.remove('hide-completely')
if(animate){
getRef('expanding_tile').animate([
{
height: `${tileDimensions.height}px`,
width: `${tileDimensions.width}px`,
transform: `translate(${tileDimensions.left - tileParentDimensions.left}px, ${tileDimensions.top - tileParentDimensions.top - window.pageYOffset}px)`
},
{
height: `${window.innerHeight}px`,
width: `${document.querySelector('main').getBoundingClientRect().width}px`,
transform: `translate(${- tileParentDimensions.left}px, ${- tileParentDimensions.top - window.pageYOffset}px)`
},
],
animeInOptions)
.onfinish = () => {
revealRoom()
}
}
else{
revealRoom()
}
function revealRoom(){
const roomContainer = document.querySelector('.room-container')
roomContainer.querySelectorAll('.room').forEach(child => child.classList.add('hide-completely'))
document.querySelector(roomId).classList.remove('hide-completely')
document.querySelector('.room-title').textContent = tile.querySelector('.room-tile__title').textContent
roomContainer.classList.remove('hide-completely')
roomContainer.animate(slideInDown, animeInOptions)
.onfinish = () => {
getRef('expanding_tile').classList.add('hide-completely')
}
}
}
function hideRoom(){
history.replaceState(null, null, ' ');
const roomContainer = document.querySelector('.room-container')
roomContainer.animate(fadeOut, animeOutOption)
.onfinish = () => {
roomContainer.classList.add('hide-completely')
}
getRef('expanding_tile').classList.remove('hide-completely')
getRef('expanding_tile').animate([
{
height: `${window.innerHeight}px`,
width: `${document.querySelector('main').getBoundingClientRect().width}px`,
transform: `translate(${- tileParentDimensions.left}px, ${- tileParentDimensions.top - window.pageYOffset}px)`
},
{
height: `${tileDimensions.height}px`,
width: `${tileDimensions.width}px`,
transform: `translate(${tileDimensions.left - tileParentDimensions.left}px, ${tileDimensions.top - tileParentDimensions.top - window.pageYOffset}px)`
},
], animeOutOption)
.onfinish = () => {
getRef('expanding_tile').classList.add('hide-completely')
resumeScrolling()
}
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -90,34 +90,36 @@
</section> </section>
<div class="rooms__header"> <div class="rooms__header">
<h4 class="room__label">Rooms</h4> <h4 class="room__label">Rooms</h4>
<scroll-tab-header data-target="bob_fund_page_group">
<button class="room-button">
<svg class="icon button__icon--left" xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>People</title><path d='M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z' fill='none' stroke='currentColor' stroke-miterlimit='10' stroke-width='32'/><path d='M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154' fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32'/></svg>
<span class="button__label">
Performance
</span>
</button>
<button class="room-button">
<svg class="icon button__icon--left" xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>People</title><path d='M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z' fill='none' stroke='currentColor' stroke-miterlimit='10' stroke-width='32'/><path d='M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154' fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32'/></svg>
<span class="button__label">
Product
</span>
</button>
<button class="room-button">
<svg class="icon button__icon--left" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
<span class="button__label">
Purchase
</span>
</button>
</scroll-tab-header>
</div> </div>
<scroll-tab-panels id="bob_fund_page_group"> <section class="rooms-layout">
<section class="grid"> <div id="expanding_tile" class="hide-completely"></div>
<h3 class="h3 margin-bottom-1-5r">Investors</h3> <a class="room-tile room-tile--main" href="#performance_room">
<div id="bob_fund_investors__container" class="grid series-container"></div> <div class="tile-content">
<h4 class="room-tile__title">Performance</h4>
</div>
</a>
<a class="room-tile" href="#product_room">
<div class="tile-content">
<h4 class="room-tile__title">Product</h4>
</div>
</a>
<a class="room-tile" href="#purchase_room">
<div class="tile-content">
<h4 class="room-tile__title">Purchase</h4>
</div>
</a>
</section>
<section class="room-container hide-completely page-layout">
<header class="room-container__header">
<button class="grid flow-column gap-1 align-center" onclick="hideRoom()">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"/></svg>
<h3 class="room-title"></h3>
</button>
</header>
<section id="performance_room" class="grid room">
<div id="bob_fund_investors__container" class="grid series-container series-container--bobs-fund"></div>
</section> </section>
<section class="grid"> <section id="product_room" class="grid room">
<h3 class="h3 margin-bottom-1-5r">Product</h3>
<p class="margin-bottom-3r"> <p class="margin-bottom-3r">
Bobs Fund allows customers to take a direct share in Bitcoin and they are automatically guided into a Bobs Fund allows customers to take a direct share in Bitcoin and they are automatically guided into a
long term investment plan. Bitcoin is a long term investors paradise with supply artificially long term investment plan. Bitcoin is a long term investors paradise with supply artificially
@ -145,25 +147,234 @@
collateral for DeFi products, and that gives us an additional earning stream. collateral for DeFi products, and that gives us an additional earning stream.
</p> </p>
</section> </section>
<section> <section id="purchase_room" class="grid room">
<sm-button variant="primary">Buy here</sm-button> <sm-button variant="primary">Buy here</sm-button>
</section> </section>
</scroll-tab-panels> </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="js/components.js"></script> <script src="js/components.js"></script>
<script src="js/index.js"></script> <script src="js/index.js"></script>
<script> <script>
const bobFund = [
{
investorName: 'Amit gupta',
invested: 20000,
},
{
investorName: 'Vijay sarda',
invested: 20000,
},
{
investorName: 'Vijesh Raikar',
invested: 20000,
},
{
investorName: 'Ajit Varshney',
invested: 20000,
},
{
investorName: 'barun Kumar',
invested: 10000,
},
{
investorName: 'Kunal Dikshit',
invested: 20000,
},
{
investorName: 'Sundeep Pandey',
invested: 20000,
},
{
investorName: 'Kusumakar Dwivedi',
invested: 20000,
},
{
investorName: 'Surojeet Sengupta',
invested: 20000,
},
{
investorName: 'Akash Srivastava',
invested: 20000,
},
{
investorName: 'V Jayaram',
invested: 20000,
},
{
investorName: 'Mayank Agrawal',
invested: 20000,
},
{
investorName: 'Bhaskar Bhowmik',
invested: 10000,
},
{
investorName: 'Rajesh Agrawal',
invested: 20000,
},
{
investorName: 'Chetan Kulkarni',
invested: 20000,
},
{
investorName: 'Amar More',
invested: 20000,
},
{
investorName: 'Navin Chandiramani',
invested: 20000,
},
{
investorName: 'Gopal Krishnamurthy',
invested: 20000,
},
{
investorName: 'Shivi',
invested: 20000,
},
{
investorName: 'Shankar RS',
invested: 20000,
},
{
investorName: 'Vikram Gupta',
invested: 20000,
},
{
investorName: 'Rohit Tripathy',
invested: 20000,
},
{
investorName: 'P. Unnikrishnan',
invested: 20000,
},
{
investorName: 'Arup Vithal',
invested: 20000,
},
{
investorName: 'Rahul Pundir',
invested: 20000,
},
{
investorName: 'Ankur Jain',
invested: 20000,
},
{
investorName: 'Pankaj Shete',
invested: 20000,
},
{
investorName: 'Sameer Nagpal',
invested: 20000,
},
{
investorName: 'George Abraham',
invested: 20000,
},
{
investorName: 'Samujjwal Ghosh',
invested: 20000,
},
{
investorName: 'Aniruddha Karnataki',
invested: 20000,
},
{
investorName: 'Mohammed Raffe Samathu',
invested: 20000,
},
{
investorName: 'Ruchir Gupta',
invested: 10000,
},
{
investorName: 'Santosh Nair',
invested: 20000,
},
{
investorName: 'Samit Arora',
invested: 20000,
},
{
investorName: 'Sumeet Doshi',
invested: 20000,
},
{
investorName: 'Pradeep Rao',
invested: 10000,
},
{
investorName: 'Gaurav Sadhir',
invested: 14000,
},
{
investorName: 'Sudhanshu Fadnis',
invested: 20000,
},
{
investorName: 'Natesh Rao',
invested: 20000,
},
{
investorName: 'Kapil Chaturvedi',
invested: 6000,
},
]
function getCurrentRates() {
let fetchData = api => new Promise((resolve, reject) => {
fetch(api).then(response => {
if (response.ok)
response.json().then(data => resolve(data))
else
reject(response)
}).catch(error => reject(error))
})
return new Promise((resolve, reject) => {
fetchData(`https://bitpay.com/api/rates`).then(result => {
let BTC_USD, BTC_INR, USD_INR
for (let i of result)
i.code == "USD" ? BTC_USD = i.rate : i.code == "INR" ? BTC_INR = i.rate : null;
USD_INR = BTC_INR / BTC_USD;
resolve({
BTC_USD,
BTC_INR,
USD_INR
})
}).catch(error => reject(error))
})
}
let USD_current, BTC_current
getCurrentRates().then(async (rates) => {
USD_current = rates.USD_INR;
BTC_current = rates.BTC_USD;
renderAllFundInvestors()
}).catch(error => console.error(error))
function calcNetValue(BTC_base, USD_base, amount, fee) {
let gain, interest, net;
gain = (BTC_current - BTC_base) / BTC_base;
interest = gain * (1 - fee)
net = amount / USD_base;
net += net * interest;
percentGain = (((net * USD_current) - amount) / amount) * 100
//console.info(gain, interest, net)
return [net * USD_current, percentGain.toFixed(0)];
}
function renderAllFundInvestors(){ function renderAllFundInvestors(){
const frag = document.createDocumentFragment() const frag = document.createDocumentFragment()
getRef('bob_fund_investors__container').innerHTML = '' getRef('bob_fund_investors__container').innerHTML = ''
bobFund.forEach(investor => { bobFund.forEach(investor => {
frag.append(render.bobFundRow(investor)) let [currentValue, gain] = calcNetValue(2676.5, 64.46, investor.invested, 0)
currentValue = parseFloat(currentValue.toFixed(2))
timeElapsed = (new Date().getFullYear() - 2017)
frag.append(render.bobFundRow({...investor, currentValue, gain, timeElapsed}))
}) })
getRef('bob_fund_investors__container').append(frag) getRef('bob_fund_investors__container').append(frag)
} }
renderAllFundInvestors()
</script> </script>
</body> </body>
</html> </html>

View File

@ -19,6 +19,7 @@ body {
--background-color: #F6f6f6; --background-color: #F6f6f6;
--error-color: red; --error-color: red;
--green: #007936; --green: #007936;
--banner-color: #1E88E5;
--font-weight-factor: 1; --font-weight-factor: 1;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
height: calc(100%); height: calc(100%);
@ -33,6 +34,7 @@ body[data-theme=dark] {
--foreground-color: 20, 20, 20; --foreground-color: 20, 20, 20;
--background-color: #0a0a0a; --background-color: #0a0a0a;
--error-color: rgb(255, 106, 106); --error-color: rgb(255, 106, 106);
--banner-color: #0166be;
--font-weight-factor: 0.9; --font-weight-factor: 0.9;
} }
body[data-theme=dark] #outlet_switcher { body[data-theme=dark] #outlet_switcher {
@ -422,7 +424,7 @@ ol[type="1"] {
gap: 1rem; gap: 1rem;
padding: 0.2rem 0 0.2rem 1rem; padding: 0.2rem 0 0.2rem 1rem;
align-items: center; align-items: center;
background-color: #1E88E5; background-color: var(--banner-color);
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
} }
.banner .close-icon { .banner .close-icon {
@ -721,28 +723,9 @@ ol[type="1"] {
.floor__header { .floor__header {
position: relative; position: relative;
/* position: sticky;
top: 0;
z-index: 8; */
padding: 0.5rem 0; padding: 0.5rem 0;
transform: translateY(-0.1rem); transform: translateY(-0.1rem);
background: var(--background-color); background: var(--background-color);
/* &::before{
content: '';
position: absolute;
left: -1%;
width: 1%;
height: 100%;
background: var(--background-color);
}
&::after{
content: '';
position: absolute;
right: -1%;
width: 1%;
height: 100%;
background: var(--background-color);
} */
} }
.floor__num { .floor__num {
@ -778,7 +761,7 @@ ol[type="1"] {
} }
.outlet__title { .outlet__title {
line-height: 1.1; line-height: 1.2;
max-width: 18ch; max-width: 18ch;
font-size: 1.8rem; font-size: 1.8rem;
margin-bottom: 1rem; margin-bottom: 1rem;
@ -811,12 +794,13 @@ ol[type="1"] {
font-weight: 900; font-weight: 900;
-webkit-text-stroke: 1rem var(--accent-color); -webkit-text-stroke: 1rem var(--accent-color);
-webkit-text-fill-color: rgba(var(--foreground-color), 1); -webkit-text-fill-color: rgba(var(--foreground-color), 1);
margin: 0 0.5rem;
} }
.outlet-preview__number::after { .outlet-preview__number::after {
content: attr(data-number); content: attr(data-number);
position: absolute; position: absolute;
line-height: 1; line-height: 1;
font-size: 8rem; font-size: 1em;
font-weight: 900; font-weight: 900;
-webkit-text-stroke: 0; -webkit-text-stroke: 0;
color: rgba(var(--foreground-color), 1); color: rgba(var(--foreground-color), 1);
@ -829,7 +813,7 @@ ol[type="1"] {
} }
.value { .value {
font-size: 1.3rem; font-size: 1.1rem;
} }
.series-container { .series-container {
@ -889,9 +873,8 @@ sm-carousel {
} }
.percent-gain { .percent-gain {
font-weight: calc(500 * var(--font-weight-factor));
color: var(--green);
margin-right: 0.5em; margin-right: 0.5em;
font-weight: calc(500 * var(--font-weight-factor));
} }
.percent-gain, .percent-gain,
@ -906,30 +889,16 @@ sm-carousel {
.person-card { .person-card {
position: relative; position: relative;
gap: 1rem; gap: 1rem;
grid-template-columns: 1fr;
/* &--small{
grid-template-areas: 'img .' 'para para';
.person__image{
width: 4rem;
height: 4rem;
border-radius: 50%;
}
}
&--big{
grid-template-areas: 'img .' 'img para';
} */
}
.person-card--intern {
text-align: center; text-align: center;
justify-items: center; justify-items: center;
align-content: flex-start;
grid-template-columns: 1fr;
} }
.person__image { .person__image {
width: 100%; width: 100%;
height: auto; height: auto;
border-radius: 0.5rem; border-radius: 0.5rem;
}
.person__image--intern {
height: 10rem; height: 10rem;
width: 10rem; width: 10rem;
object-position: top; object-position: top;
@ -938,6 +907,7 @@ sm-carousel {
.person__name { .person__name {
font-size: 1.1rem; font-size: 1.1rem;
text-transform: capitalize;
} }
.investor__bio { .investor__bio {
@ -1095,14 +1065,6 @@ scroll-tab-panels > [active] {
margin-right: 0.5rem; margin-right: 0.5rem;
padding-right: 1.5rem; padding-right: 1.5rem;
} }
.room__label::after {
content: "";
position: absolute;
height: 150%;
width: 0.1rem;
right: 0;
background-color: rgba(var(--text-color), 0.5);
}
.room-button { .room-button {
position: relative; position: relative;
@ -1135,16 +1097,6 @@ scroll-tab-panels > [active] {
height: max-content; height: max-content;
} }
.phase {
grid-template-columns: 4rem 1fr;
}
.phase:not(:last-of-type) .phase__description {
padding-bottom: 1.5rem;
}
.phase:last-of-type .progress-bar__line {
height: 0;
}
.progress-bar__circle, .progress-bar__circle,
.progress-bar__line { .progress-bar__line {
position: absolute; position: absolute;
@ -1167,21 +1119,10 @@ scroll-tab-panels > [active] {
background: rgba(var(--text-color), 0.9); background: rgba(var(--text-color), 0.9);
} }
.phase__date { .people-grid {
margin-top: 0.3rem; display: grid;
} gap: 3rem 1.5rem;
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
.phase__description {
margin-top: 1rem;
}
.masonry-layout {
columns: 2;
column-gap: 1rem;
}
.masonry-layout > * {
margin-bottom: 3rem;
page-break-inside: avoid;
} }
.rooms-layout { .rooms-layout {
@ -1199,6 +1140,7 @@ scroll-tab-panels > [active] {
transition: transform 0.3s; transition: transform 0.3s;
background-color: rgba(var(--foreground-color), 1); background-color: rgba(var(--foreground-color), 1);
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;
} }
.room-tile--main { .room-tile--main {
padding-top: 100%; padding-top: 100%;
@ -1242,6 +1184,9 @@ scroll-tab-panels > [active] {
} }
.room-container__header { .room-container__header {
display: flex;
align-items: center;
justify-content: space-between;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 2; z-index: 2;
@ -1249,6 +1194,33 @@ scroll-tab-panels > [active] {
padding: 1rem 0; padding: 1rem 0;
} }
.room-container__footer {
position: sticky;
display: grid;
gap: 1rem;
grid-auto-flow: column;
justify-content: flex-start;
align-items: center;
bottom: 0;
z-index: 2;
margin-top: auto;
padding: 0.5rem;
background-color: inherit;
}
#room_switcher {
display: grid;
gap: 1rem;
grid-auto-flow: column;
justify-content: flex-start;
}
.room-shortcut {
padding: 0.5em 0.8rem;
border-radius: 0.3rem;
background-color: rgba(var(--text-color), 0.06);
}
@media only screen and (max-width: 640px) { @media only screen and (max-width: 640px) {
.hide-on-mobile { .hide-on-mobile {
display: none; display: none;
@ -1260,12 +1232,14 @@ scroll-tab-panels > [active] {
.outlet-preview__number-container { .outlet-preview__number-container {
grid-row: 1/2; grid-row: 1/2;
text-align: right;
justify-content: right;
} }
.outlet-preview__number::after { .outlet-preview__number::after {
right: 0; left: 0;
}
.outlet-preview__number {
font-size: 5rem;
} }
#outlet_switcher { #outlet_switcher {
@ -1386,7 +1360,7 @@ scroll-tab-panels > [active] {
box-shadow: 0 4rem 3rem -2rem rgba(0, 0, 0, 0.06); box-shadow: 0 4rem 3rem -2rem rgba(0, 0, 0, 0.06);
} }
.outlet-preview:nth-of-type(even) { .outlet-preview:nth-of-type(even) {
grid-template-columns: 1fr 1.2fr; grid-template-columns: 1fr 2fr;
} }
.outlet-preview:nth-of-type(even) .outlet-preview__info { .outlet-preview:nth-of-type(even) .outlet-preview__info {
grid-column: 2/3; grid-column: 2/3;
@ -1410,20 +1384,6 @@ scroll-tab-panels > [active] {
grid-auto-flow: column; grid-auto-flow: column;
} }
/* .carousel-holder{
align-self: flex-start;
transform: translateY(-2rem);
z-index: 1;
border-radius: 0.5rem;
&--left{
grid-row: 1/2;
grid-column: 1/2;
box-shadow: 1px 0.1rem 0.1rem rgba(0, 0, 0, 0.06), -2rem 5rem 4rem -2rem rgba(0, 0, 0, 0.2);
}
&--right{
box-shadow: 1px 0.1rem 0.1rem rgba(0, 0, 0, 0.06), 2rem 5rem 4rem -2rem rgba(0, 0, 0, 0.2);
}
} */
.outlet-preview__carousel { .outlet-preview__carousel {
padding: 2rem 2rem 5rem 2rem; padding: 2rem 2rem 5rem 2rem;
} }
@ -1440,11 +1400,6 @@ scroll-tab-panels > [active] {
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
} }
.masonry-layout {
columns: 3;
column-gap: 2rem;
}
.rooms-layout { .rooms-layout {
grid-template-rows: 1fr 1fr; grid-template-rows: 1fr 1fr;
} }
@ -1452,6 +1407,10 @@ scroll-tab-panels > [active] {
.room-container__header { .room-container__header {
padding: 1.5rem 0; padding: 1.5rem 0;
} }
.people-grid {
gap: 5rem 3rem;
}
} }
@media only screen and (min-width: 1280px) { @media only screen and (min-width: 1280px) {
#home_page, .page, #home_page, .page,
@ -1466,10 +1425,6 @@ scroll-tab-panels > [active] {
width: 100%; width: 100%;
} }
.masonry-layout {
columns: 4;
}
.rooms-layout { .rooms-layout {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
grid-auto-flow: column; grid-auto-flow: column;

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@ body {
--background-color: #F6f6f6; --background-color: #F6f6f6;
--error-color: red; --error-color: red;
--green: #007936; --green: #007936;
--banner-color: #1E88E5;
--font-weight-factor: 1; --font-weight-factor: 1;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
height: calc(100%); height: calc(100%);
@ -30,6 +31,7 @@ body[data-theme='dark']{
--foreground-color: 20, 20, 20; --foreground-color: 20, 20, 20;
--background-color: #0a0a0a; --background-color: #0a0a0a;
--error-color: rgb(255, 106, 106); --error-color: rgb(255, 106, 106);
--banner-color: #0166be;
--font-weight-factor: 0.9; --font-weight-factor: 0.9;
#outlet_switcher{ #outlet_switcher{
background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), rgba(var(--foreground-color), 1); background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), rgba(var(--foreground-color), 1);
@ -353,7 +355,7 @@ ol[type="1"]{
gap: 1rem; gap: 1rem;
padding: 0.2rem 0 0.2rem 1rem; padding: 0.2rem 0 0.2rem 1rem;
align-items: center; align-items: center;
background-color: #1E88E5; background-color: var(--banner-color);
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
.close-icon{ .close-icon{
fill: white; fill: white;
@ -599,7 +601,6 @@ ol[type="1"]{
transition: transform 0.3s; transition: transform 0.3s;
} }
.floor-circle{ .floor-circle{
// position: absolute;
position: relative; position: relative;
border-radius: 1rem; border-radius: 1rem;
padding: 0.8rem; padding: 0.8rem;
@ -636,28 +637,9 @@ ol[type="1"]{
.floor__header{ .floor__header{
position: relative; position: relative;
/* position: sticky;
top: 0;
z-index: 8; */
padding: 0.5rem 0; padding: 0.5rem 0;
transform: translateY(-0.1rem); transform: translateY(-0.1rem);
background: var(--background-color); background: var(--background-color);
/* &::before{
content: '';
position: absolute;
left: -1%;
width: 1%;
height: 100%;
background: var(--background-color);
}
&::after{
content: '';
position: absolute;
right: -1%;
width: 1%;
height: 100%;
background: var(--background-color);
} */
} }
.floor__num{ .floor__num{
@ -692,7 +674,7 @@ ol[type="1"]{
background-color: rgba(var(--foreground-color), 1); background-color: rgba(var(--foreground-color), 1);
} }
.outlet__title{ .outlet__title{
line-height: 1.1; line-height: 1.2;
max-width: 18ch; max-width: 18ch;
font-size: 1.8rem; font-size: 1.8rem;
margin-bottom: 1rem; margin-bottom: 1rem;
@ -722,11 +704,12 @@ ol[type="1"]{
font-weight: 900; font-weight: 900;
-webkit-text-stroke: 1rem var(--accent-color); -webkit-text-stroke: 1rem var(--accent-color);
-webkit-text-fill-color: rgba(var(--foreground-color), 1); -webkit-text-fill-color: rgba(var(--foreground-color), 1);
margin: 0 0.5rem;
&::after{ &::after{
content: attr(data-number); content: attr(data-number);
position: absolute; position: absolute;
line-height: 1; line-height: 1;
font-size: 8rem; font-size: 1em;
font-weight: 900; font-weight: 900;
-webkit-text-stroke: 0; -webkit-text-stroke: 0;
color: rgba(var(--foreground-color), 1); color: rgba(var(--foreground-color), 1);
@ -739,7 +722,7 @@ ol[type="1"]{
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
.value{ .value{
font-size: 1.3rem; font-size: 1.1rem;
} }
.series-container{ .series-container{
@ -799,9 +782,8 @@ sm-carousel{
margin-right: 0.1em; margin-right: 0.1em;
} }
.percent-gain{ .percent-gain{
font-weight: calc(500 * var(--font-weight-factor));
color: var(--green);
margin-right: 0.5em; margin-right: 0.5em;
font-weight: calc(500 * var(--font-weight-factor));
} }
.percent-gain, .percent-gain,
.time-elapsed{ .time-elapsed{
@ -815,41 +797,23 @@ sm-carousel{
.person-card{ .person-card{
position: relative; position: relative;
gap: 1rem; gap: 1rem;
// text-align: center; text-align: center;
justify-items: center;
align-content: flex-start;
grid-template-columns: 1fr; grid-template-columns: 1fr;
/* &--small{
grid-template-areas: 'img .' 'para para';
.person__image{
width: 4rem;
height: 4rem;
border-radius: 50%;
}
}
&--big{
grid-template-areas: 'img .' 'img para';
} */
&--intern{
text-align: center;
justify-items: center;
}
}
.investor-card__overlay{
// position: absolute;
// background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,1));
} }
.person__image{ .person__image{
width: 100%; width: 100%;
height: auto; height: auto;
border-radius: 0.5rem; border-radius: 0.5rem;
&--intern{ height: 10rem;
height: 10rem; width: 10rem;
width: 10rem; object-position: top;
object-position: top; border-radius: 50%;
border-radius: 50%;
}
} }
.person__name{ .person__name{
font-size: 1.1rem; font-size: 1.1rem;
text-transform: capitalize;
} }
.investor__bio{ .investor__bio{
font-size: 0.85rem; font-size: 0.85rem;
@ -989,14 +953,6 @@ scroll-tab-panels{
font-weight: calc(500 * var(--font-weight-factor)); font-weight: calc(500 * var(--font-weight-factor));
margin-right: 0.5rem; margin-right: 0.5rem;
padding-right: 1.5rem; padding-right: 1.5rem;
&::after{
content: '';
position: absolute;
height: 150%;
width: 0.1rem;
right: 0;
background-color: rgba(var(--text-color), 0.5);
}
} }
.room-button{ .room-button{
position: relative; position: relative;
@ -1029,22 +985,6 @@ scroll-tab-panels{
width: min(36rem ,100%); width: min(36rem ,100%);
height: max-content; height: max-content;
} }
.phase{
grid-template-columns: 4rem 1fr;
&:not(:last-of-type){
.phase__description{
padding-bottom: 1.5rem;
}
}
&:last-of-type{
.progress-bar__line{
height: 0;
}
}
}
.progress-bar__circle, .progress-bar__circle,
.progress-bar__line{ .progress-bar__line{
position: absolute; position: absolute;
@ -1064,20 +1004,11 @@ scroll-tab-panels{
width: 0.1rem; width: 0.1rem;
background: rgba(var(--text-color), 0.9); background: rgba(var(--text-color), 0.9);
} }
.phase__date{
margin-top: 0.3rem;
}
.phase__description{
margin-top: 1rem;
}
.masonry-layout{ .people-grid{
columns: 2; display: grid;
column-gap: 1rem; gap: 3rem 1.5rem;
& > * { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
margin-bottom: 3rem;
page-break-inside: avoid;
}
} }
.rooms-layout{ .rooms-layout{
@ -1094,6 +1025,7 @@ scroll-tab-panels{
transition: transform 0.3s; transition: transform 0.3s;
background-color: rgba(var(--foreground-color), 1); background-color: rgba(var(--foreground-color), 1);
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;
&--main{ &--main{
padding-top: 100%; padding-top: 100%;
grid-row: span 2; grid-row: span 2;
@ -1135,6 +1067,9 @@ scroll-tab-panels{
} }
.room-container__header{ .room-container__header{
display: flex;
align-items: center;
justify-content: space-between;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 2; z-index: 2;
@ -1142,6 +1077,32 @@ scroll-tab-panels{
padding: 1rem 0; padding: 1rem 0;
} }
.room-container__footer{
position: sticky;
display: grid;
gap: 1rem;
grid-auto-flow: column;
justify-content: flex-start;
align-items: center;
bottom: 0;
z-index: 2;
margin-top: auto;
padding: 0.5rem;
background-color: inherit;
}
#room_switcher{
display: grid;
gap: 1rem;
grid-auto-flow: column;
justify-content: flex-start;
}
.room-shortcut{
padding: 0.5em 0.8rem;
border-radius: 0.3rem;
background-color: rgba(var(--text-color), 0.06);
}
@media only screen and (max-width: 640px) { @media only screen and (max-width: 640px) {
.hide-on-mobile{ .hide-on-mobile{
display: none; display: none;
@ -1151,11 +1112,12 @@ scroll-tab-panels{
} }
.outlet-preview__number-container{ .outlet-preview__number-container{
grid-row: 1/2; grid-row: 1/2;
text-align: right;
justify-content: right;
} }
.outlet-preview__number::after{ .outlet-preview__number::after{
right: 0; left: 0;
}
.outlet-preview__number{
font-size: 5rem;
} }
#outlet_switcher{ #outlet_switcher{
width: calc(100% - 2rem); width: calc(100% - 2rem);
@ -1266,7 +1228,7 @@ scroll-tab-panels{
border: 1px solid rgba(0, 0, 0, 0.2); border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 4rem 3rem -2rem rgba(0, 0, 0, 0.06); box-shadow: 0 4rem 3rem -2rem rgba(0, 0, 0, 0.06);
&:nth-of-type(even){ &:nth-of-type(even){
grid-template-columns: 1fr 1.2fr; grid-template-columns: 1fr 2fr;
.outlet-preview__info{ .outlet-preview__info{
grid-column: 2/3; grid-column: 2/3;
} }
@ -1291,20 +1253,6 @@ scroll-tab-panels{
.bit-bond-series__row{ .bit-bond-series__row{
grid-auto-flow: column; grid-auto-flow: column;
} }
/* .carousel-holder{
align-self: flex-start;
transform: translateY(-2rem);
z-index: 1;
border-radius: 0.5rem;
&--left{
grid-row: 1/2;
grid-column: 1/2;
box-shadow: 1px 0.1rem 0.1rem rgba(0, 0, 0, 0.06), -2rem 5rem 4rem -2rem rgba(0, 0, 0, 0.2);
}
&--right{
box-shadow: 1px 0.1rem 0.1rem rgba(0, 0, 0, 0.06), 2rem 5rem 4rem -2rem rgba(0, 0, 0, 0.2);
}
} */
.outlet-preview__carousel{ .outlet-preview__carousel{
padding: 2rem 2rem 5rem 2rem; padding: 2rem 2rem 5rem 2rem;
} }
@ -1317,16 +1265,15 @@ scroll-tab-panels{
.auto-grid-layout{ .auto-grid-layout{
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
} }
.masonry-layout{
columns: 3;
column-gap: 2rem;
}
.rooms-layout{ .rooms-layout{
grid-template-rows: 1fr 1fr; grid-template-rows: 1fr 1fr;
} }
.room-container__header{ .room-container__header{
padding: 1.5rem 0; padding: 1.5rem 0;
} }
.people-grid{
gap: 5rem 3rem;
}
} }
@media only screen and (min-width: 1280px) { @media only screen and (min-width: 1280px) {
#home_page, .page, #home_page, .page,
@ -1339,9 +1286,6 @@ scroll-tab-panels{
width: 100%; width: 100%;
} }
} }
.masonry-layout{
columns: 4;
}
.rooms-layout{ .rooms-layout{
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
grid-auto-flow: column; grid-auto-flow: column;

View File

@ -38,7 +38,7 @@
<p class="investor__bio color-0-8"></p> <p class="investor__bio color-0-8"></p>
</div> </div>
<div class="grid investor__contribution-container"> <div class="grid investor__contribution-container">
<h4 class="label color-0-8 weight-500">Contribution</h4> <!-- <h4 class="label color-0-8 weight-500">Contribution</h4> -->
<p class="investor__contribution"></p> <p class="investor__contribution"></p>
</div> </div>
</div> </div>
@ -136,7 +136,7 @@
<section class="grid carousel-container"> <section class="grid carousel-container">
<h3 class="h3 margin-bottom-1-5r">Contributing Investors</h3> <h3 class="h3 margin-bottom-1-5r">Contributing Investors</h3>
<!-- <sm-carousel id="ico_investors" indicator autoplay></sm-carousel> --> <!-- <sm-carousel id="ico_investors" indicator autoplay></sm-carousel> -->
<section id="ico_investors" class="masonry-layout"></section> <section id="ico_investors" class="people-grid"></section>
</section> </section>
<section> <section>
<h3 class="h3 margin-bottom-1-5r">Product</h3> <h3 class="h3 margin-bottom-1-5r">Product</h3>

View File

@ -149,7 +149,7 @@
<scroll-tab-panels id="ico_page_group"> <scroll-tab-panels id="ico_page_group">
<section class="grid carousel-container"> <section class="grid carousel-container">
<h3 class="h3 margin-bottom-3r justify-self-center">Meet our interns</h3> <h3 class="h3 margin-bottom-3r justify-self-center">Meet our interns</h3>
<section id="interns_container" class="masonry-layout"></section> <section id="interns_container" class="people-grid"></section>
</section> </section>
<section> <section>
<h3 class="h3 margin-bottom-1-5r">Projects</h3> <h3 class="h3 margin-bottom-1-5r">Projects</h3>

View File

@ -166,6 +166,8 @@ window.addEventListener("load", () => {
createRipple(e, e.target.closest("button, sm-button, .interact")); createRipple(e, e.target.closest("button, sm-button, .interact"));
} }
}); });
if (window.location.hash !== '')
showRoom(window.location.hash, false)
}); });
function createRipple(event, target) { function createRipple(event, target) {
const circle = document.createElement("span"); const circle = document.createElement("span");
@ -239,7 +241,8 @@ const siteMap = [
brief: `Bondholders get a minimum guarantee of 13% interest per annum during the lock-in period or 50% of all Bitcoin price gains whichever is higher. It offers full capital protection if brief: `Bondholders get a minimum guarantee of 13% interest per annum during the lock-in period or 50% of all Bitcoin price gains whichever is higher. It offers full capital protection if
Bitcoin prices fall below acquisition price.`, Bitcoin prices fall below acquisition price.`,
isSold: true, isSold: true,
buyUrl: `purchase_room` buyUrl: `purchase_room`,
status: `We are servicing current customers only. A new Blockchain-based version of Bitcoin Bonds will be available soon.`
}, },
{ {
name: `Bob's Fund`, name: `Bob's Fund`,
@ -248,155 +251,100 @@ const siteMap = [
isSold: true, isSold: true,
buyUrl: `purchase_room` buyUrl: `purchase_room`
}, },
{ /* {
name: "Initial Coin Offering", name: "Initial Coin Offering",
url: "ico", url: "ico",
brief: `The Initial Coin Offering (ICO) of RanchiMall was launched in 2017. It was envisioned to sell 21 million tokens over 14 phases over 3 years.`, brief: `The Initial Coin Offering (ICO) of RanchiMall was launched in 2017. It was envisioned to sell 21 million tokens over 14 phases over 3 years.`,
isSold: true, isSold: true,
buyUrl: `purchase_room` buyUrl: `purchase_room`
}, }, */
],
},
{
floor: "Blockchain Contracts",
brief: `Blockchain Contracts are one of RanchiMall's flagship innovations.
We believe each blockchain contract will be transformational in its area and will add
tremendously to our enterprise value.`,
outlets: [
{
name: "Incorporation Blockchain Contract",
url: "incorporationblockchaincontract",
brief: `RanchiMall is incorporated on the blockchain and structured as Incorporation Blockchain Contract. Incorporation Blockchain Contract owns all the other blockchain contracts of RanchiMall.`
},
{
name: `Internship Blockchain Contract`,
url: `internshipblockchaincontract`,
brief: `Internship Blockchain Contract tokenizes all our internship initiatives. This is owned by Incorporation Blockchain Contract.`
},
{
name: "FLO Blockchain Contract",
url: "floblockchaincontract",
brief: `FLO Blockchain contract consists of all projects RanchiMall performs on FLO Blockchain (previously called Florincoin).`
}
],
},
{
floor: 'Blockchain Apps',
brief: ``,
outlets: [
{
name: "Web Wallet",
brief: `Purely web-based blockchain wallet.`,
url: 'webwallet'
},
{
name: `FLO Messenger`,
url: `flomessenger`,
},
{
name: "Content Collaboration",
brief: `A way for anonymous users across the Internet to collaborate and create beautiful articles.`,
url: "contentcollaboration",
},
{
name: "Ranchimall Times",
brief: `Article publication platform of RanchiMall`,
url: "ranchimalltimes",
},
],
},
{
floor: 'Experimental Ideas',
brief: ``,
outlets: [
{
name: "Blockchain Cloud",
url: "blockchaincloud",
},
{
name: `UPI On Blockchain`,
url: `upionblockchain`,
},
{
name: "E-Commerce On Blockchain",
url: "e-commerceonblockchain"
}
],
},
{
floor: 'Statistics and Administration',
brief: ``,
outlets: [
{
name: "Incorporation",
url: "incorporation",
},
{
name: `Team`,
url: `team`,
},
{
name: "Operational Statistic",
url: "operationalstatistic",
}
], ],
}, },
/* {
floor: "Blockchain Contracts",
brief: `Blockchain Contracts are one of RanchiMall's flagship innovations.
We believe each blockchain contract will be transformational in its area and will add
tremendously to our enterprise value.`,
outlets: [
{
name: "Incorporation Blockchain Contract",
url: "incorporationblockchaincontract",
brief: `RanchiMall is incorporated on the blockchain and structured as Incorporation Blockchain Contract. Incorporation Blockchain Contract owns all the other blockchain contracts of RanchiMall.`
},
{
name: `Internship Blockchain Contract`,
url: `internshipblockchaincontract`,
brief: `Internship Blockchain Contract tokenizes all our internship initiatives. This is owned by Incorporation Blockchain Contract.`
},
{
name: "FLO Blockchain Contract",
url: "floblockchaincontract",
brief: `FLO Blockchain contract consists of all projects RanchiMall performs on FLO Blockchain (previously called Florincoin).`
}
],
},
{
floor: 'Blockchain Apps',
brief: ``,
outlets: [
{
name: "Web Wallet",
brief: `Purely web-based blockchain wallet.`,
url: 'webwallet'
},
{
name: `FLO Messenger`,
url: `flomessenger`,
},
{
name: "Content Collaboration",
brief: `A way for anonymous users across the Internet to collaborate and create beautiful articles.`,
url: "contentcollaboration",
},
{
name: "Ranchimall Times",
brief: `Article publication platform of RanchiMall`,
url: "ranchimalltimes",
},
],
},
{
floor: 'Experimental Ideas',
brief: ``,
outlets: [
{
name: "Blockchain Cloud",
url: "blockchaincloud",
},
{
name: `UPI On Blockchain`,
url: `upionblockchain`,
},
{
name: "E-Commerce On Blockchain",
url: "e-commerceonblockchain"
}
],
},
{
floor: 'Statistics and Administration',
brief: ``,
outlets: [
{
name: "Incorporation",
url: "incorporation",
},
{
name: `Team`,
url: `team`,
},
{
name: "Operational Statistic",
url: "operationalstatistic",
}
],
}, */
]; ];
const bitBondSerieses = [
{
series: '$975',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
{
series: '$1057',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
{
series: '$1064',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
{
series: '$1205',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
{
series: '$1285',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
{
series: '$2513',
currentValue: '$XXXXX',
timeElapsed: '2 years'
},
]
const bobFund = [
{
investorName: 'John Doe',
invested: '₹20000',
currentValue: '$XXXXX',
timeElapsed: '2years'
},
{
investorName: 'Jane Doe',
invested: '₹10000',
currentValue: '$XXXXX',
timeElapsed: '2years'
},
{
investorName: 'james Doe',
invested: '₹15000',
currentValue: '$XXXXX',
timeElapsed: '2years'
},
]
// templates // templates
const bitBondRowTemplate = document.createElement('template') const bitBondRowTemplate = document.createElement('template')
@ -411,7 +359,7 @@ bitBondRowTemplate.innerHTML = `
<h3 class="value current-value"></h3> <h3 class="value current-value"></h3>
<div class="flex align-center"> <div class="flex align-center">
<svg class="icon up-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"/></svg> <svg class="icon up-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"/></svg>
<span class="percent-gain">2000%</span> <span class="percent-gain"></span>
<span class="time-elapsed"></span> <span class="time-elapsed"></span>
</div> </div>
</div> </div>
@ -422,7 +370,6 @@ const bobsFundRowTemplate = document.createElement('template')
bobsFundRowTemplate.innerHTML = ` bobsFundRowTemplate.innerHTML = `
<div class="bob-fund__row grid"> <div class="bob-fund__row grid">
<div class="grid"> <div class="grid">
<h5 class="label color-0-8 weight-500">Investor</h5>
<h3 class="value person__name"></h3> <h3 class="value person__name"></h3>
</div> </div>
<div class="flex"> <div class="flex">
@ -432,10 +379,10 @@ bobsFundRowTemplate.innerHTML = `
</div> </div>
<div class="grid justify-right text-align-right"> <div class="grid justify-right text-align-right">
<h4 class="label color-0-8 weight-500">Current value</h4> <h4 class="label color-0-8 weight-500">Current value</h4>
<h3 class="value current-value"></h3> <h3 class="value current-value" style="color: var(--green)"></h3>
<div class="flex align-center"> <div class="flex align-center">
<svg class="icon up-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"/></svg> <svg class="icon up-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"/></svg>
<span class="percent-gain">2000%</span> <span class="percent-gain"></span>
<span class="time-elapsed"></span> <span class="time-elapsed"></span>
</div> </div>
</div> </div>
@ -473,20 +420,22 @@ outletListitemTemplate.innerHTML = `
const render = { const render = {
bitBondRow(obj) { bitBondRow(obj) {
const { series, currentValue, timeElapsed } = obj; const { series, currentValue, timeElapsed, percentGain } = obj;
const row = bitBondRowTemplate.content.cloneNode(true); const row = bitBondRowTemplate.content.cloneNode(true);
row.querySelector(".original-value").textContent = series; row.querySelector(".original-value").textContent = series.toLocaleString(`en-US`, { style: 'currency', currency: 'USD' });
row.querySelector(".current-value").textContent = currentValue; row.querySelector(".current-value").textContent = currentValue.toLocaleString(`en-US`, { style: 'currency', currency: 'USD' });
row.querySelector(".time-elapsed").textContent = `In last ${timeElapsed}`; row.querySelector(".time-elapsed").textContent = `In last ${timeElapsed} years`;
row.querySelector(".percent-gain").textContent = `${percentGain}%`;
return row; return row;
}, },
bobFundRow(obj) { bobFundRow(obj) {
const { investorName, invested, currentValue, timeElapsed } = obj; const { investorName, invested, currentValue, timeElapsed, gain } = obj;
const row = bobsFundRowTemplate.content.cloneNode(true); const row = bobsFundRowTemplate.content.cloneNode(true);
row.querySelector(".person__name").textContent = investorName; row.querySelector(".person__name").textContent = investorName;
row.querySelector(".original-value").textContent = invested; row.querySelector(".original-value").textContent = `${invested.toLocaleString(`en-US`, { style: 'currency', currency: 'INR' })}`;
row.querySelector(".current-value").textContent = currentValue; row.querySelector(".current-value").textContent = `${currentValue.toLocaleString(`en-US`, { style: 'currency', currency: 'INR' })}`;
row.querySelector(".time-elapsed").textContent = `In last ${timeElapsed}`; row.querySelector(".percent-gain").textContent = `${gain}%`;
row.querySelector(".time-elapsed").textContent = `In last ${timeElapsed} years`;
return row; return row;
}, },
icoInvestorRow(obj, options) { icoInvestorRow(obj, options) {
@ -569,6 +518,17 @@ const render = {
button.href = url button.href = url
button.textContent = name button.textContent = name
return button; return button;
},
statusBanner(bannerMsg) {
const banner = document.createElement('section')
banner.classList.add('banner')
banner.innerHTML = `
<p class="banner__text">${bannerMsg}</p>
<button class="close-button" onclick="this.parentNode.remove()">
<svg class="icon icon-only close-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></svg>
</button>
`
return banner
} }
}; };
@ -789,19 +749,22 @@ function renderFloorOutlets(floorObj, activeOutlet) {
getRef('outlet_switcher__floor_num').textContent = floor getRef('outlet_switcher__floor_num').textContent = floor
let floorNum = -1 let floorNum = -1
let outletNum = -1 let outletNum = -1
for (let i = 0; i < siteMap.length; i++){ for (let i = 0; i < siteMap.length; i++) {
if (siteMap[i].floor === floor) { if (siteMap[i].floor === floor) {
floorNum = i floorNum = i
break break
} }
} }
for (let i = 0; i < outlets.length; i++){ for (let i = 0; i < outlets.length; i++) {
if (outlets[i].url === activeOutlet) { if (outlets[i].url === activeOutlet) {
outletNum = i outletNum = i
break break
} }
} }
document.querySelector('.outlet-label__name').textContent = floorNum > -1 ? `Floor ${floorNum + 1} outlet ${outletNum + 1}` : '' document.querySelector('.outlet-label__name').textContent = floorNum > -1 ? `Floor ${floorNum + 1} outlet ${outletNum + 1}` : ''
if (outlets[outletNum].hasOwnProperty('status')) {
getRef('main_header').after(render.statusBanner(outlets[outletNum].status))
}
} }
let isSiteMapOpen = false; let isSiteMapOpen = false;
@ -854,3 +817,116 @@ function resumeScrolling() {
getRef("elevator_popup").classList.add("hide-completely"); getRef("elevator_popup").classList.add("hide-completely");
} }
let tile, tileParent, tileDimensions, tileParentDimensions
const animeInOptions = {
duration: 300,
fill: 'forwards',
easing: 'ease'
}
const animeOutOption = {
duration: 300,
fill: 'forwards',
easing: 'ease'
}
window.addEventListener('hashchange', e => {
showRoom(window.location.hash, true)
if (allRooms.length) {
renderRoomShorcuts()
}
})
let isRoomOpen = false
function showRoom(roomId, animate = false) {
if (roomId === '') return
pauseScrolling()
tile = document.querySelector(`[href="${roomId}"]`)
tileParent = tile.parentNode
tileDimensions = tile.getBoundingClientRect()
tileParentDimensions = tileParent.getBoundingClientRect()
getRef('expanding_tile').classList.remove('hide-completely')
if (animate && !isRoomOpen) {
getRef('expanding_tile').animate([
{
height: `${tileDimensions.height}px`,
width: `${tileDimensions.width}px`,
transform: `translate(${tileDimensions.left - tileParentDimensions.left}px, ${tileDimensions.top - tileParentDimensions.top - window.pageYOffset}px)`
},
{
height: `${window.innerHeight}px`,
width: `${document.querySelector('main').getBoundingClientRect().width}px`,
transform: `translate(${- tileParentDimensions.left}px, ${- tileParentDimensions.top - window.pageYOffset}px)`
},
],
animeInOptions)
.onfinish = () => {
revealRoom(animate)
}
}
else {
revealRoom(animate)
}
function revealRoom(animate) {
const roomContainer = document.querySelector('.room-container')
roomContainer.querySelectorAll('.room').forEach(child => child.classList.add('hide-completely'))
document.querySelector(roomId).classList.remove('hide-completely')
document.querySelector('.room-title').textContent = tile.querySelector('.room-tile__title').textContent
roomContainer.classList.remove('hide-completely')
if (animate && !isRoomOpen) {
roomContainer.animate(slideInDown, animeInOptions)
.onfinish = () => {
getRef('expanding_tile').classList.add('hide-completely')
}
}
isRoomOpen = true
}
}
function hideRoom() {
history.replaceState(null, null, ' ');
const roomContainer = document.querySelector('.room-container')
roomContainer.animate(fadeOut, animeOutOption)
.onfinish = () => {
roomContainer.classList.add('hide-completely')
}
getRef('expanding_tile').classList.remove('hide-completely')
getRef('expanding_tile').animate([
{
height: `${window.innerHeight}px`,
width: `${document.querySelector('main').getBoundingClientRect().width}px`,
transform: `translate(${- tileParentDimensions.left}px, ${- tileParentDimensions.top - window.pageYOffset}px)`
},
{
height: `${tileDimensions.height}px`,
width: `${tileDimensions.width}px`,
transform: `translate(${tileDimensions.left - tileParentDimensions.left}px, ${tileDimensions.top - tileParentDimensions.top - window.pageYOffset}px)`
},
], animeOutOption)
.onfinish = () => {
getRef('expanding_tile').classList.add('hide-completely')
resumeScrolling()
isRoomOpen = false
}
}
const allRooms = document.querySelectorAll('.room-tile')
function renderRoomShorcuts() {
getRef('room_switcher').innerHTML = ''
const frag = document.createDocumentFragment()
allRooms.forEach(room => {
if (room.href.split('#').pop() !== window.location.hash.split('#').pop()) {
const clone = room.cloneNode(true)
clone.classList.remove('room-tile', 'room-tile--main')
clone.classList.add('room-shortcut')
frag.append(clone)
}
})
getRef('room_switcher').append(frag)
}
if (allRooms.length) {
renderRoomShorcuts()
}