mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
fix: cls
This commit is contained in:
parent
74d127e205
commit
ff2f9ed97e
@ -30,6 +30,19 @@ html, body {
|
|||||||
.navbar .navbar__brand {
|
.navbar .navbar__brand {
|
||||||
display: none;
|
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 */
|
/* Minimal layout structure to prevent major shifts */
|
||||||
|
@ -144,6 +144,18 @@ html[data-theme="dark"] {
|
|||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
border: 1px solid var(--ifm-navbar-link-color);
|
border: 1px solid var(--ifm-navbar-link-color);
|
||||||
border-radius: 4px;
|
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 {
|
.header-github-link.navbar-link-outlined:hover {
|
||||||
|
@ -132,12 +132,6 @@ export default function Root({ children }: { children: React.ReactNode }) {
|
|||||||
passive: true,
|
passive: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fallback: load analytics after 10 seconds if no interaction
|
|
||||||
const fallbackTimer = setTimeout(() => {
|
|
||||||
loadGoogleAnalytics();
|
|
||||||
loadGoogleTagManager();
|
|
||||||
}, 10000);
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(fallbackTimer);
|
clearTimeout(fallbackTimer);
|
||||||
window.removeEventListener('scroll', handleUserInteraction);
|
window.removeEventListener('scroll', handleUserInteraction);
|
||||||
|
Loading…
Reference in New Issue
Block a user