изменила контактную форму, доработала навбар, партнёры

This commit is contained in:
xomimishka committed 2025-04-12 14:40:04 +03:00
1 parent 79fc2eeb98
commit d24fecd5e4
25 files changed
+620 -236

No files matched your search

+22 -8
View File
@@ -71,16 +71,30 @@ function Root() {
// Определяем, находимся ли мы на главной странице
const isHomePage = location.pathname === "/";
useEffect(() => {
const rootElement = document.getElementById("root");
if (!rootElement) return;
if (location.pathname === "/") {
rootElement.classList.add("main-page");
rootElement.classList.remove("inner-page");
} else {
rootElement.classList.remove("main-page");
rootElement.classList.add("inner-page");
}
}, [location.pathname]);
return (
<RootContext.Provider value={{ setRef }}>
<Navbar />
<div
id="react-page"
style={{ marginTop: isHomePage ? "0px" : "" }} // Устанавливаем margin-top
>
<Outlet />
<div id="layout-wrapper">
<Navbar />
<div id="react-page" style={{ marginTop: isHomePage ? "0px" : "" }}>
<Outlet />
</div>
<Footer />
</div>
<Footer />
{hasScrolled && (
<button
className={`scroll-to-top ${isOnTopVisible ? "visible" : "hidden"}`}
@@ -90,7 +104,7 @@ function Root() {
</button>
)}
</RootContext.Provider>
);
);
}
export default Root;