Skip to content

Commit b7a7555

Browse files
committed
feat: show yellow when loading section
Signed-off-by: Matt Gleich <git@mattglei.ch>
1 parent b12530f commit b7a7555

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/lib/index/section.svelte

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
{@render children()}
4949
</div>
5050
{#if liveData}
51-
<p class="updated-container">
51+
<p class={`updated-container ${liveData.updated ? 'loaded' : 'loading'}`}>
5252
{#if liveData.updated}
5353
Data <span class="updated-detailed">&nbsp;cached & processed&nbsp;</span><span
5454
class="updated-concise">&nbsp;updated&nbsp;</span
@@ -149,15 +149,24 @@
149149
align-items: center;
150150
justify-content: center;
151151
padding: 5px;
152-
color: var(--green-foreground);
153-
background: var(--green-background);
154-
border-top: 1px solid var(--green-border);
155152
font-family: 'IBM Plex Mono';
156153
font-weight: 500;
157154
font-size: 13.5px;
158155
margin-top: 5px;
159156
}
160157
158+
.loaded {
159+
color: var(--green-foreground);
160+
background: var(--green-background);
161+
border-top: 1px solid var(--green-border);
162+
}
163+
164+
.loading {
165+
color: var(--yellow-foreground);
166+
background: var(--yellow-background);
167+
border-top: 1px solid var(--yellow-border);
168+
}
169+
161170
.lcp-link {
162171
color: inherit;
163172
font-size: inherit;

0 commit comments

Comments
 (0)