-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22ec687
commit 7961af0
Showing
7 changed files
with
104 additions
and
43 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
import React from "react"; | ||
import { Button, Col, Container, Row } from "react-bootstrap"; | ||
import { DASHBOARD_PAGE } from "@/constants/pages-url.constants"; | ||
import VideoBackground from "@/components/welcome/VideoBackground"; | ||
|
||
const HeroSection = () => { | ||
return ( | ||
<div className="hero-section text-center text-white bg-dark landing-section"> | ||
<Container> | ||
<Row> | ||
<Col> | ||
<h1 className="py-5">Добро пожаловать!</h1> | ||
<p className="lead py-4">Курсы от тренеров любого уровня с возможностью<br />саморазвития и | ||
публикации <b>собственных</b> курсов <b>бесплатно</b>!</p> | ||
<Button href={ DASHBOARD_PAGE } variant="primary" size="lg">Начнем!</Button> | ||
</Col> | ||
</Row> | ||
</Container> | ||
</div> | ||
); | ||
<> | ||
<VideoBackground /> | ||
<div className="hero-section text-center text-white bg-opacity-0 landing-section" | ||
style={ { position: "relative", zIndex: 1 } }> | ||
<Container> | ||
<Row> | ||
<Col> | ||
<h1 className="py-5">Добро пожаловать!</h1> | ||
<p className="lead py-4">Курсы от тренеров любого уровня с возможностью<br />саморазвития и | ||
публикации <b>собственных</b> курсов <b>бесплатно</b>!</p> | ||
<Button href={ DASHBOARD_PAGE } variant="primary" size="lg">Начнем!</Button> | ||
</Col> | ||
</Row> | ||
</Container> | ||
</div> | ||
</>); | ||
}; | ||
|
||
export default HeroSection; |
29 changes: 29 additions & 0 deletions
29
frontend/src/components/welcome/VideoBackground.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* components/welcome/VideoBackground.module.css */ | ||
.videoContainer { | ||
position: fixed; /* Use fixed to ensure it covers the viewport */ | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100vh; /* Full viewport height */ | ||
overflow: hidden; | ||
z-index: -1; /* Ensure the video is behind other content */ | ||
} | ||
|
||
.video { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.overlay { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.5); /* Adjust opacity as needed */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import styles from './VideoBackground.module.css'; | ||
|
||
const VideoBackground = () => { | ||
return ( | ||
<div className={styles.videoContainer}> | ||
<video autoPlay loop muted className={styles.video}> | ||
<source src="/athlete.mp4" type="video/mp4" /> | ||
Your browser does not support the video tag. | ||
</video> | ||
<div className={styles.overlay}></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default VideoBackground; |