1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00
This commit is contained in:
FredrikOseberg 2025-08-14 13:45:12 +02:00
parent 74d127e205
commit ff2f9ed97e
No known key found for this signature in database
GPG Key ID: 282FD8A6D8F9BCF0
3 changed files with 25 additions and 6 deletions

View File

@ -30,6 +30,19 @@ html, body {
.navbar .navbar__brand {
display: none;
}
/* Reserve space for GitHub star button to prevent shift */
.header-github-link.navbar-link-outlined {
min-width: 120px; /* Reserve space for "Star 12.5k" */
display: inline-flex;
align-items: center;
justify-content: center;
}
/* Ensure navbar items don't shift */
.navbar__items--right {
min-width: 450px; /* Stabilize right navbar width */
}
}
/* Minimal layout structure to prevent major shifts */

View File

@ -144,6 +144,18 @@ html[data-theme="dark"] {
padding-right: 6px;
border: 1px solid var(--ifm-navbar-link-color);
border-radius: 4px;
/* Prevent layout shift by reserving space */
min-width: 120px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
}
/* Ensure the star count doesn't cause reflow */
.navbar-link-outlined strong {
min-width: 45px;
text-align: left;
}
.header-github-link.navbar-link-outlined:hover {

View File

@ -132,12 +132,6 @@ export default function Root({ children }: { children: React.ReactNode }) {
passive: true,
});
// Fallback: load analytics after 10 seconds if no interaction
const fallbackTimer = setTimeout(() => {
loadGoogleAnalytics();
loadGoogleTagManager();
}, 10000);
return () => {
clearTimeout(fallbackTimer);
window.removeEventListener('scroll', handleUserInteraction);