Skip to content

Commit 546c3c5

Browse files
committed
feat: say what each section is loading
1 parent 716dca2 commit 546c3c5

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

src/lib/index/section.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
70% {
228228
opacity: 100%;
229229
}
230-
80%,
231230
100% {
232231
opacity: 30%;
233232
}
@@ -238,7 +237,6 @@
238237
70% {
239238
opacity: 100%;
240239
}
241-
80%,
242240
100% {
243241
opacity: 30%;
244242
}

src/lib/index/sections/games/games-section.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Section from '$lib/index/section.svelte';
44
import type { LcpResponse } from '$lib/lcp/lcp.server';
55
import type { Game } from '$lib/lcp/steam';
6-
import Loading from '$lib/loading.svelte';
6+
import SectionLoading from '$lib/section-loading.svelte';
77
import Stats from '$lib/stats.svelte';
88
import { renderDuration } from '$lib/time';
99
import { Card, Error, Image } from '@gleich/ui';
@@ -35,7 +35,7 @@
3535
}}
3636
>
3737
{#if loading}
38-
<Loading height={483.63} />
38+
<SectionLoading name="games" height={483.63} />
3939
{:else if games}
4040
<p>
4141
To relax I like to occasionally play games with some of my friends. My favorite game of all

src/lib/index/sections/music/music-section.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Section from '$lib/index/section.svelte';
44
import type { AppleMusicPlaylistSummary, AppleMusicSong, CacheData } from '$lib/lcp/applemusic';
55
import type { LcpResponse } from '$lib/lcp/lcp.server';
6-
import Loading from '$lib/loading.svelte';
6+
import SectionLoading from '$lib/section-loading.svelte';
77
import { Error } from '@gleich/ui';
88
import Playlist from './playlist.svelte';
99
import Song from './song.svelte';
@@ -56,7 +56,7 @@
5656
}}
5757
>
5858
{#if loading}
59-
<Loading height={744} />
59+
<SectionLoading name="music" height={744} />
6060
{:else if response && recently_played && playlists}
6161
<p>
6262
I love a lot of different types of music ranging from electronic to jazz. A few of my favorite

src/lib/index/sections/projects/project-section.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Section from '$lib/index/section.svelte';
44
import type { Repository } from '$lib/lcp/github';
55
import type { LcpResponse } from '$lib/lcp/lcp.server';
6-
import Loading from '$lib/loading.svelte';
6+
import SectionLoading from '$lib/section-loading.svelte';
77
import Since from '$lib/time/since.svelte';
88
import ViewButton from '$lib/view-button.svelte';
99
import { Card, Error } from '@gleich/ui';
@@ -59,7 +59,7 @@
5959
}}
6060
>
6161
{#if loading}
62-
<Loading height={446.5} />
62+
<SectionLoading name="projects" height={446.5} />
6363
{:else if projects}
6464
<p class="intro">
6565
I love to build and explore everything from <a

src/lib/index/sections/workouts/workouts-section.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import StravaIcon from '$lib/icons/strava-icon.svelte';
44
import type { LcpResponse } from '$lib/lcp/lcp.server';
55
import { type Workout as LcpWorkout } from '$lib/lcp/workouts';
6-
import Loading from '$lib/loading.svelte';
6+
import SectionLoading from '$lib/section-loading.svelte';
77
import ViewButton from '$lib/view-button.svelte';
88
import { Error } from '@gleich/ui';
99
import Section from '../../section.svelte';
@@ -57,7 +57,7 @@
5757
}}
5858
>
5959
{#if loading}
60-
<Loading height={529.91} />
60+
<SectionLoading name="workouts" height={529.91} />
6161
{:else if workouts}
6262
<p>
6363
One of my favorite things is staying active and enjoying the outdoors. I grew up in New
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
11
<script lang="ts">
22
import { Logo } from '@gleich/ui';
33
4-
const { height }: { height: number } = $props();
4+
const { height, name }: { height: string; name: string } = $props();
55
</script>
66

77
<div class="container" style:--expected-height={`${height}px`}>
88
<div class="logo">
99
<Logo />
1010
</div>
11+
<p class="loading">loading {name}</p>
1112
</div>
1213

1314
<style>
1415
.container {
1516
display: flex;
1617
align-items: center;
1718
justify-content: center;
19+
flex-direction: column;
1820
height: calc(var(--expected-height) - 20px);
1921
}
2022
2123
.logo {
2224
width: 100px;
2325
height: auto;
2426
}
27+
28+
.loading {
29+
color: grey;
30+
font-family: 'IBM Plex Mono';
31+
font-size: 14.5px;
32+
}
2533
</style>

0 commit comments

Comments
 (0)