mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 19:16:11 +00:00
created bg-video component and finished stories section
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
@import "./sass/components/feature-box";
|
@import "./sass/components/feature-box";
|
||||||
@import "./sass/components/card";
|
@import "./sass/components/card";
|
||||||
@import "./sass/components/story";
|
@import "./sass/components/story";
|
||||||
|
@import "./sass/components/bg-video";
|
||||||
|
|
||||||
@import "./sass/layout/header";
|
@import "./sass/layout/header";
|
||||||
@import "./sass/layout/grid";
|
@import "./sass/layout/grid";
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
import ButtonSecondary from "../../components/button/button-secondary";
|
import ButtonSecondary from "../../components/button/button-secondary";
|
||||||
import nat8 from "../images/nat-8.jpg";
|
import nat8 from "../images/nat-8.jpg";
|
||||||
import nat9 from "../images/nat-9.jpg";
|
import nat9 from "../images/nat-9.jpg";
|
||||||
|
import bgmp4 from "../images/video.mp4";
|
||||||
|
import bgwebm from "../images/video.webm";
|
||||||
|
|
||||||
function Stories() {
|
function Stories() {
|
||||||
return (
|
return (
|
||||||
<section className="section-stories">
|
<section className="section-stories">
|
||||||
|
<div className="bg-video">
|
||||||
|
<video className="bg-video__content" autoPlay muted loop>
|
||||||
|
<source src={bgmp4} type="video/mp4" />
|
||||||
|
<source src={bgwebm} type="video/webm" />
|
||||||
|
Your browser is not supporting the video format!
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
<div className="u-center-text u-margin-bottom-big">
|
<div className="u-center-text u-margin-bottom-big">
|
||||||
<h2 className="heading-secondary">We make people geniunely happy</h2>
|
<h2 className="heading-secondary">We make people geniunely happy</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
.bg-video {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
opacity: 0.15;
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid $color-primary;
|
border-bottom: 1px solid $color-primary;
|
||||||
padding: 0.3rem;
|
padding: 0.3rem;
|
||||||
background-color: $color-grey-light-1;
|
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $color-primary;
|
background-color: $color-primary;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
width: 75%;
|
width: 75%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
box-shadow: 0 3rem 6rem rgba($color-black, 0.1);
|
box-shadow: 0 3rem 6rem rgba($color-black, 0.1);
|
||||||
background-color: $color-white;
|
background-color: rgba($color-white, 60%);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 6rem;
|
padding: 6rem;
|
||||||
padding-left: 9rem;
|
padding-left: 9rem;
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: all 0.5s;
|
transition: all 0.5s;
|
||||||
|
backface-visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover &__caption {
|
&:hover &__caption {
|
||||||
|
|||||||
@@ -30,5 +30,5 @@
|
|||||||
|
|
||||||
.section-stories {
|
.section-stories {
|
||||||
padding: 15rem;
|
padding: 15rem;
|
||||||
background-color: $color-grey-light-1;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user