mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:29:45 +00:00
Merge remote-tracking branch 'origin/bgwp'
This commit is contained in:
commit
54698c455d
11 files changed
+175
-108
No files matched your search
@@ -156,7 +156,7 @@ function LabBoard() {
|
||||
<div className={styles.featureContent}>
|
||||
{activeFeature !== null && (
|
||||
<div className={styles.featureDescription}>
|
||||
{features[activeFeature].content}
|
||||
<p>{features[activeFeature].content}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { HashLink } from "react-router-hash-link";
|
||||
|
||||
function Test() {
|
||||
return <>ddddddddddddd</>;
|
||||
}
|
||||
export default Test;
|
||||
|
||||
@@ -19,7 +19,7 @@ body {
|
||||
margin: 0;
|
||||
margin-bottom: 20px;
|
||||
color: $text-secondary;
|
||||
background-image: url("/src/shared/assets/images/art.bmp");
|
||||
//background-image: url("/src/shared/assets/images/art.bmp");
|
||||
background-color: $bg-image;
|
||||
background-blend-mode: multiply;
|
||||
background-position: center;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import styles from "./MainPage.module.scss";
|
||||
import { HashLink } from "react-router-hash-link";
|
||||
import { useContext, useEffect } from "react";
|
||||
import { RootContext } from "@/app/Layout/Root";
|
||||
import Partners from "@/widgets/Partners";
|
||||
import Gallery from "@/pages/MainPage/ui/components/Gallery";
|
||||
import ContactUs from "@/widgets/ContactUs";
|
||||
import { useMedia } from "@/modules/media/hooks/useMedia";
|
||||
|
||||
import {
|
||||
LabsList,
|
||||
@@ -15,8 +16,15 @@ import Numbers from "@/widgets/Numbers";
|
||||
|
||||
const MainPage = () => {
|
||||
const { setRef } = useContext(RootContext);
|
||||
const [headerBgUrl, setHeaderBgUrl] = useState("");
|
||||
const { data: mediaData, isLoading, isError } = useMedia();
|
||||
|
||||
useEffect(() => {
|
||||
const artMedia = mediaData?.filter((el) => el.category === "art");
|
||||
if (artMedia && artMedia.length > 0) {
|
||||
setHeaderBgUrl(artMedia[0].src);
|
||||
}
|
||||
|
||||
const navbar = document.getElementById("navbar");
|
||||
if (navbar) {
|
||||
navbar.classList.add("transparent");
|
||||
@@ -27,10 +35,25 @@ const MainPage = () => {
|
||||
navbar.classList.remove("transparent");
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
}, [mediaData]);
|
||||
|
||||
if (isLoading) {
|
||||
return <div>Loading...</div>;
|
||||
}
|
||||
|
||||
if (isError) {
|
||||
console.error("Error loading media");
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div id={styles.mainpageheader} ref={(element) => setRef(element)}>
|
||||
<div
|
||||
id={styles.mainpageheader}
|
||||
ref={(element) => setRef(element)}
|
||||
style={{
|
||||
backgroundImage: headerBgUrl ? `url(${headerBgUrl})` : "none",
|
||||
}}
|
||||
>
|
||||
<section className={styles.container}>
|
||||
<h1>Думай иначе, будь креативным!</h1>
|
||||
<h2>
|
||||
@@ -66,4 +89,4 @@ const MainPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default MainPage;
|
||||
export default MainPage;
|
||||
Reference in new issue
Block a user