Fix loader spinner position, shrink the 7MB contact page backgrounds by 98%

Spinner was absolutely positioned within the (very tall, since hidden
content still occupies layout space) page container, so on a long page
like the homepage it centered itself far down the page instead of in the
visible viewport - had to scroll to see it. Switched to fixed positioning
so it always centers in the actual visible screen regardless of how long
the underlying page is.

Separately, found and fixed the single biggest asset weighing down every
load of the contact page: hifi-src/src/assets/contact/bg-light.png and
bg-dark.png were 3.1MB and 4.0MB respectively (2560x1440, stored as
lossless PNG despite being photographic/gradient content - PNG compresses
that kind of content very poorly compared to a lossy format). Converted
both to WEBP at quality 78 and updated the two background-image
references in index.css - 3.13MB -> 0.02MB and 4.01MB -> 0.08MB, over
98% smaller, visually equivalent for a blurred background image. These
aren't admin-uploaded content (they're bundled build assets), so they
were untouched by the automatic upload compression added earlier.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-11 11:57:57 +02:00
parent 139d6c2c59
commit d9faa90bc7
14 changed files with 11 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -18,12 +18,12 @@ const SETTLE_MS = 400;
const MAX_WAIT_MS = 8000;
function Spinner() {
// Nur ueber dem Inhaltsbereich (nicht die ganze Seite) - Navbar/Footer bleiben sichtbar
// und bedienbar, waehrend der Seiteninhalt selbst noch laedt. Ein Mindest-Hoehe, damit auf
// einer noch leeren Seite (Inhalt per visibility:hidden ohne eigene Groesse) trotzdem Platz
// fuer das Symbol da ist.
// Fest zum Sichtfenster positioniert (nicht zum - bei einer langen Seite wie der Startseite
// sehr hohen, weil weiterhin per visibility:hidden im Layout mitgezaehlten - Inhalt), damit
// das Symbol immer mittig im sichtbaren Bereich erscheint statt weit unten, wo man erst
// hinscrollen muesste.
return (
<div className="absolute inset-0 z-[200] flex min-h-[60vh] items-center justify-center bg-white dark:bg-neutral-950">
<div className="fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950">
<div className="h-10 w-10 animate-spin rounded-full border-4 border-neutral-200 border-t-brand-500 dark:border-neutral-800" />
</div>
);

View file

@ -84,12 +84,12 @@ html {
Verlauf, Auto-Foto, Wellenlinien bzw. Grunge/Splatter/Kreisbogen komplett) -
keine eigenen Ebenen, Filter oder Verlaeufe mehr (README "Hintergruende"). */
.kontakt-sektion {
background-image: url('./assets/contact/bg-light.png');
background-image: url('./assets/contact/bg-light.webp');
background-size: cover;
background-position: center;
}
.dark .kontakt-sektion {
background-image: url('./assets/contact/bg-dark.png');
background-image: url('./assets/contact/bg-dark.webp');
}
.kf-page input::placeholder,

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -43,9 +43,9 @@
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
}
</script>
<script type="module" crossorigin src="/assets/index-CjqwSRnf.js"></script>
<script type="module" crossorigin src="/assets/index-DQVH7kAb.js"></script>
<link rel="modulepreload" crossorigin href="/assets/lucide-icons-Cg2IxtAO.js">
<link rel="stylesheet" crossorigin href="/assets/index-DP9BSFkw.css">
<link rel="stylesheet" crossorigin href="/assets/index-C9MU1rb1.css">
</head>
<body class="bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100">
<div id="root"></div>