Fix layout shifts with the temporary <pre> element on the board page
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
}, 1000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
})
|
||||
});
|
||||
|
||||
// Update 'QuickLinks'
|
||||
$effect(() => {
|
||||
@@ -33,70 +33,66 @@
|
||||
// Load Data Invalidation Handling
|
||||
// Refresh countdown logic
|
||||
</script>
|
||||
<section class="board-wrapper">
|
||||
{#if data.boardData.data.m?.length}
|
||||
|
||||
<StationAlertCard messages={data.boardData.data.m} />
|
||||
<section class="board-wrapper">
|
||||
{#if data.boardData.data.m?.length}
|
||||
<StationAlertCard messages={data.boardData.data.m} />
|
||||
{/if}
|
||||
<div class="time-data">
|
||||
<span class="time-loaded">Fetched: {formatUkDateTime(data.boardData.producedAt, true)}</span>
|
||||
<span class="time-now">{formatUkTime(now, true)}</span>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
<pre class="json-dump">{JSON.stringify(data.boardData.data.s, null, 2)}</pre>
|
||||
</section>
|
||||
|
||||
<section class="section-t">Live boards are not yet fully implemented on the server</section>
|
||||
|
||||
<pre class="json-dump">{JSON.stringify(data.boardData.data.s, null, 2)}</pre>
|
||||
|
||||
<style>
|
||||
.board-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.time-data {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
max-width: 700px;
|
||||
margin: 0 auto;
|
||||
font-family: 'URW Gothic', sans-serif;
|
||||
}
|
||||
|
||||
.time-loaded, .time-now {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.time-loaded {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.time-now {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.section-t {
|
||||
font-family: 'URW Gothic', sans-serif;
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
padding-top: 25px;
|
||||
max-width: 500px;
|
||||
.board-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.time-data {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
max-width: 700px;
|
||||
margin: 10px auto;
|
||||
font-family: 'URW Gothic', sans-serif;
|
||||
}
|
||||
|
||||
.time-loaded,
|
||||
.time-now {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.time-loaded {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.time-now {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
pre {
|
||||
max-width: 100%;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.json-dump {
|
||||
background: #222;
|
||||
color: #0f0;
|
||||
padding: 1rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
max-height: 500px;
|
||||
width: 95%;
|
||||
margin: 1rem auto; }
|
||||
margin: 1rem auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user