Merge branch 'ranchimall:master' into master
This commit is contained in:
commit
dbf7f88d47
@ -746,7 +746,7 @@ header.grid-2 {
|
|||||||
#highlights {
|
#highlights {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
}
|
}
|
||||||
#highlights .highlight-item {
|
#highlights .highlight-item {
|
||||||
|
|||||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -676,7 +676,7 @@ header.grid-2 {
|
|||||||
#highlights {
|
#highlights {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
.highlight-item {
|
.highlight-item {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|||||||
@ -332,7 +332,7 @@
|
|||||||
async function renderHome(state) {
|
async function renderHome(state) {
|
||||||
getRef("page_header").classList.add("hidden");
|
getRef("page_header").classList.add("hidden");
|
||||||
let [data, latestTxs, latestBlocks] = await Promise.all([getBannerData(), getLatestTxs(), getAllBlocks(6)])
|
let [data, latestTxs, latestBlocks] = await Promise.all([getBannerData(), getLatestTxs(), getAllBlocks(6)])
|
||||||
renderElem(getRef("page_container"), html`${render.homepage(data)}`);
|
renderElem(getRef("page_container"), html`${render.homepage({ ...data, latestBlock: latestBlocks[0] })}`);
|
||||||
renderTransactions('top_transaction_container', latestTxs)
|
renderTransactions('top_transaction_container', latestTxs)
|
||||||
const renderedBlocks = latestBlocks.map(block => render.blockCard(block))
|
const renderedBlocks = latestBlocks.map(block => render.blockCard(block))
|
||||||
renderElem(document.getElementById('top_blocks_container'), html`${renderedBlocks}`)
|
renderElem(document.getElementById('top_blocks_container'), html`${renderedBlocks}`)
|
||||||
@ -636,7 +636,8 @@
|
|||||||
let frag = document.createDocumentFragment();
|
let frag = document.createDocumentFragment();
|
||||||
const render = {
|
const render = {
|
||||||
homepage(obj) {
|
homepage(obj) {
|
||||||
let { topToken, totalTransactions, walletAddresses } = obj;
|
let { topToken, totalTransactions, walletAddresses, latestBlock } = obj;
|
||||||
|
const { height, time } = latestBlock
|
||||||
return html`
|
return html`
|
||||||
<div id="homepage" class="page">
|
<div id="homepage" class="page">
|
||||||
<section id="first_section">
|
<section id="first_section">
|
||||||
@ -653,6 +654,10 @@
|
|||||||
<h4 class="label">Wallet addresses</h4>
|
<h4 class="label">Wallet addresses</h4>
|
||||||
<h2>${walletAddresses}</h2>
|
<h2>${walletAddresses}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="highlight-item">
|
||||||
|
<h4 class="label">Latest block (${getFormattedTime(time, 'relative')})</h4>
|
||||||
|
<h2><a class="block-height" href=${`#/block/${height}`}>${height}</a></h2>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="latest_transaction_section" class="margin-bottom-2">
|
<section id="latest_transaction_section" class="margin-bottom-2">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user