Refactor: Improve header loading and image rendering

Add early JS to populate header elements and optimize image loading.

Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
Cursor Agent
2025-12-21 23:02:22 +00:00
co-authored by mathieumoran1
parent 3b055bfdeb
commit e6f3b02830
7 changed files with 93 additions and 5 deletions
+24
View File
@@ -74,6 +74,30 @@ footer {
opacity: 1;
}
/* Avoid initial navbar "blur flash" before JS computes the exact height. */
body.page-loading .page-loader-overlay {
top: var(--page-loader-top, 72px);
}
/* Reserve space for username so it doesn't "pop" the layout. */
#user-name {
display: inline-block;
min-width: 8ch;
white-space: nowrap;
}
/*
Reserve space for the Admin button even when hidden.
This prevents a visible re-layout when we discover admin status from the token.
*/
@media (min-width: 992px) {
nav.navbar #admin-control-link.d-none {
display: inline-block !important;
visibility: hidden !important;
pointer-events: none;
}
}
.page-loader-overlay.page-loader-hide {
opacity: 0;
pointer-events: none;