UI update
This commit is contained in:
parent
ad37f94085
commit
42dd0e7f24
@ -350,12 +350,12 @@
|
|||||||
currentValue,
|
currentValue,
|
||||||
percentGain: percentGain.toFixed(0)
|
percentGain: percentGain.toFixed(0)
|
||||||
}
|
}
|
||||||
const timelineItem = document.createElement('li')
|
const timelineItem = create('li', {className: 'timeline-item'})
|
||||||
timelineItem.classList.add('timeline-item')
|
|
||||||
|
|
||||||
const tilelineItemHeader = document.createElement('header')
|
const tilelineItemHeader = create('header', {
|
||||||
tilelineItemHeader.classList.add('timeline-item__header')
|
className: 'timeline-item__header',
|
||||||
tilelineItemHeader.textContent = getFormatedTime(series.startDate, true)
|
text: getFormatedTime(series.startDate, true)
|
||||||
|
})
|
||||||
|
|
||||||
timelineItem.append(tilelineItemHeader, render.bitBondRow(obj))
|
timelineItem.append(tilelineItemHeader, render.bitBondRow(obj))
|
||||||
frag.prepend(timelineItem)
|
frag.prepend(timelineItem)
|
||||||
|
|||||||
@ -452,13 +452,12 @@
|
|||||||
bobFund.forEach(fund => {
|
bobFund.forEach(fund => {
|
||||||
const {release, invested, investors, href} = fund
|
const {release, invested, investors, href} = fund
|
||||||
console.log(release, invested, investors, href)
|
console.log(release, invested, investors, href)
|
||||||
const timelineItem = document.createElement('li')
|
const timelineItem = create('li', {className: 'timeline-item'})
|
||||||
timelineItem.classList.add('timeline-item')
|
|
||||||
|
|
||||||
const tilelineItemHeader = document.createElement('header')
|
const tilelineItemHeader = create('header', {
|
||||||
tilelineItemHeader.classList.add('timeline-item__header')
|
className: 'timeline-item__header',
|
||||||
tilelineItemHeader.textContent = getFormatedTime(release, true)
|
text: getFormatedTime(release, true)
|
||||||
console.log(new Date(release))
|
})
|
||||||
|
|
||||||
if(fund.hasOwnProperty('investors')){
|
if(fund.hasOwnProperty('investors')){
|
||||||
investors.forEach(investor => {
|
investors.forEach(investor => {
|
||||||
@ -467,19 +466,22 @@
|
|||||||
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}))
|
||||||
})
|
})
|
||||||
const fundContainer = document.createElement('div')
|
const fundContainer = create('div', {
|
||||||
fundContainer.classList.add('grid', 'series-container', 'series-container--bobs-fund')
|
className: 'grid series-container series-container--bobs-fund'
|
||||||
|
})
|
||||||
|
|
||||||
const heading = document.createElement('h4')
|
const heading = create('h4', {
|
||||||
heading.classList.add('margin-bottom-1r', 'margin-top-1-5')
|
className: 'margin-bottom-1r margin-top-1-5',
|
||||||
heading.textContent = 'Fund investors'
|
text: 'Fund investors'
|
||||||
|
})
|
||||||
|
|
||||||
fundContainer.append(frag)
|
fundContainer.append(frag)
|
||||||
timelineItem.append(heading, fundContainer)
|
timelineItem.append(heading, fundContainer)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
const fundCard = document.createElement('div')
|
const fundCard = create('div', {
|
||||||
fundCard.classList.add('grid', 'card')
|
className: 'grid card'
|
||||||
|
})
|
||||||
let [currentValue, gain] = calcNetValue(37488, 72.56, invested, 0)
|
let [currentValue, gain] = calcNetValue(37488, 72.56, invested, 0)
|
||||||
currentValue = parseFloat(currentValue.toFixed(2))
|
currentValue = parseFloat(currentValue.toFixed(2))
|
||||||
fundCard.innerHTML = `
|
fundCard.innerHTML = `
|
||||||
|
|||||||
@ -964,6 +964,10 @@ ol[type="1"] {
|
|||||||
color: rgba(var(--text-color), 0.9);
|
color: rgba(var(--text-color), 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.outlet-hero-section {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
#outlet_switcher {
|
#outlet_switcher {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -1390,6 +1394,10 @@ ol[type="1"] {
|
|||||||
width: calc(100% - 2rem);
|
width: calc(100% - 2rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.outlet-label {
|
||||||
|
grid-row: 1/2;
|
||||||
|
}
|
||||||
|
|
||||||
.outlet-hero-section {
|
.outlet-hero-section {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
@ -1570,7 +1578,6 @@ ol[type="1"] {
|
|||||||
|
|
||||||
.outlet-hero-section {
|
.outlet-hero-section {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
margin-top: 4rem;
|
margin-top: 4rem;
|
||||||
|
|||||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -861,6 +861,10 @@ ol[type="1"]{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.outlet-hero-section{
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
#outlet_switcher{
|
#outlet_switcher{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -1266,6 +1270,9 @@ ol[type="1"]{
|
|||||||
#outlet_switcher{
|
#outlet_switcher{
|
||||||
width: calc(100% - 2rem);
|
width: calc(100% - 2rem);
|
||||||
}
|
}
|
||||||
|
.outlet-label{
|
||||||
|
grid-row: 1/2;
|
||||||
|
}
|
||||||
.outlet-hero-section{
|
.outlet-hero-section{
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
@ -1430,7 +1437,6 @@ ol[type="1"]{
|
|||||||
}
|
}
|
||||||
.outlet-hero-section{
|
.outlet-hero-section{
|
||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
margin-top: 4rem;
|
margin-top: 4rem;
|
||||||
|
|||||||
@ -277,10 +277,8 @@
|
|||||||
|
|
||||||
|
|
||||||
function renderFloor(obj){
|
function renderFloor(obj){
|
||||||
console.log(obj)
|
|
||||||
const {floorNo, floor, brief, outlets} = obj
|
const {floorNo, floor, brief, outlets} = obj
|
||||||
const floorSection = document.createElement('section')
|
const floorSection = create('section', {className: 'floor'})
|
||||||
floorSection.classList.add('floor')
|
|
||||||
floorSection.id = `floor_${floorNo + 1}`
|
floorSection.id = `floor_${floorNo + 1}`
|
||||||
floorSection.innerHTML = `
|
floorSection.innerHTML = `
|
||||||
<header class="floor__header grid align-center">
|
<header class="floor__header grid align-center">
|
||||||
@ -306,8 +304,9 @@
|
|||||||
|
|
||||||
function renderOutletPreview(obj){
|
function renderOutletPreview(obj){
|
||||||
const {outletNo, name, brief, url, buyUrl, isSold} = obj
|
const {outletNo, name, brief, url, buyUrl, isSold} = obj
|
||||||
const preview = document.createElement('section')
|
const preview = create('section', {
|
||||||
preview.classList.add('outlet-preview', 'carousel-container')
|
className: 'outlet-preview carousel-container'
|
||||||
|
})
|
||||||
let composed = `
|
let composed = `
|
||||||
<div class="grid outlet-preview__info">
|
<div class="grid outlet-preview__info">
|
||||||
<h3 class="outlet__title">${name}</h3>
|
<h3 class="outlet__title">${name}</h3>
|
||||||
|
|||||||
@ -19,6 +19,14 @@ function getRef(elementId) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function create(tagName, obj) {
|
||||||
|
const {className, text} = obj
|
||||||
|
const elem = document.createElement(tagName)
|
||||||
|
elem.className = className
|
||||||
|
elem.textContent = text
|
||||||
|
return elem
|
||||||
|
}
|
||||||
|
|
||||||
//Checks for internet connection status
|
//Checks for internet connection status
|
||||||
if (!navigator.onLine)
|
if (!navigator.onLine)
|
||||||
notify(
|
notify(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user