mirror of
https://github.com/Retropex/bitfeed.git
synced 2025-05-28 13:02:28 +02:00
Improve block info layout on small screens
This commit is contained in:
parent
245543ec9b
commit
7a0c98f7f1
@ -114,6 +114,27 @@
|
|||||||
font-size: 4.4vw;
|
font-size: 4.4vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compact {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-aspect-ratio: 1/1) and (max-height: 760px) {
|
||||||
|
.compact {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.full-size {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (aspect-ratio: 1/1) and (max-height: 760px) {
|
||||||
|
.compact {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.full-size {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.data-row {
|
.data-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -210,26 +231,46 @@
|
|||||||
{#if block != null && visible }
|
{#if block != null && visible }
|
||||||
<div class="block-info" out:fly="{{ y: -50, duration: 2000, easing: linear }}" in:fly="{{ y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }}">
|
<div class="block-info" out:fly="{{ y: -50, duration: 2000, easing: linear }}" in:fly="{{ y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }}">
|
||||||
<!-- <span class="data-field">Hash: { block.id }</span> -->
|
<!-- <span class="data-field">Hash: { block.id }</span> -->
|
||||||
<div class="data-row">
|
<div class="full-size">
|
||||||
<span class="data-field title-field" title="{block.miner_sig}"><b>Latest Block: </b>{ numberFormat.format(block.height) }</span>
|
<div class="data-row">
|
||||||
<button class="data-field close-button" on:click={hideBlock}><Icon icon={closeIcon} color="var(--palette-x)" /></button>
|
<span class="data-field title-field" title="{block.miner_sig}"><b>Latest Block: </b>{ numberFormat.format(block.height) }</span>
|
||||||
|
<button class="data-field close-button" on:click={hideBlock}><Icon icon={closeIcon} color="var(--palette-x)" /></button>
|
||||||
|
</div>
|
||||||
|
<div class="data-row">
|
||||||
|
<span class="data-field">Mined { formatTime(block.time) }</span>
|
||||||
|
<span class="data-field">{ formattedBlockValue }</span>
|
||||||
|
</div>
|
||||||
|
<div class="data-row">
|
||||||
|
<span class="data-field">{ formatBytes(block.bytes) }</span>
|
||||||
|
<span class="data-field">{ formatCount(block.txnCount) } transactions</span>
|
||||||
|
</div>
|
||||||
|
<div class="data-row spacer"> </div>
|
||||||
|
<div class="data-row">
|
||||||
|
<span class="data-field">Avg Fee Rate</span>
|
||||||
|
{#if block.fees != null}
|
||||||
|
<span class="data-field">{ formatFee(block.avgFeerate) } sats/vbyte</span>
|
||||||
|
{:else}
|
||||||
|
<span class="data-field">unavailable</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data-row">
|
<div class="compact">
|
||||||
<span class="data-field">Mined { formatTime(block.time) }</span>
|
<div class="data-row">
|
||||||
<span class="data-field">{ formattedBlockValue }</span>
|
<span class="data-field title-field" title="{block.miner_sig}"><b>Latest Block: </b>{ numberFormat.format(block.height) }</span>
|
||||||
</div>
|
<button class="data-field close-button" on:click={hideBlock}><Icon icon={closeIcon} color="var(--palette-x)" /></button>
|
||||||
<div class="data-row">
|
</div>
|
||||||
<span class="data-field">{ formatBytes(block.bytes) }</span>
|
<div class="data-row">
|
||||||
<span class="data-field">{ formatCount(block.txnCount) } transactions</span>
|
<span class="data-field">Mined { formatTime(block.time) }</span>
|
||||||
</div>
|
<span class="data-field">{ formattedBlockValue }</span>
|
||||||
<div class="data-row spacer"> </div>
|
</div>
|
||||||
<div class="data-row">
|
<div class="data-row">
|
||||||
<span class="data-field">Avg Fee Rate</span>
|
<span class="data-field">{ formatCount(block.txnCount) } transactions</span>
|
||||||
{#if block.fees != null}
|
{#if block.fees != null}
|
||||||
<span class="data-field">{ formatFee(block.avgFeerate) } sats/vbyte</span>
|
<span class="data-field">{ formatFee(block.avgFeerate) } sats/vb</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="data-field">unavailable</span>
|
<span class="data-field">{ formatBytes(block.bytes) }</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="close-button standalone" on:click={hideBlock} out:fly="{{ y: -50, duration: 2000, easing: linear }}" in:fly="{{ y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }}" >
|
<button class="close-button standalone" on:click={hideBlock} out:fly="{{ y: -50, duration: 2000, easing: linear }}" in:fly="{{ y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }}" >
|
||||||
|
Loading…
Reference in New Issue
Block a user