mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
created stories section and stories component
This commit is contained in:
@@ -2,6 +2,7 @@ import "./App.scss";
|
||||
import About from "./commons/about-section/about";
|
||||
import Feature from "./commons/feature-section/feature";
|
||||
import Header from "./commons/header/header.jsx";
|
||||
import Stories from "./commons/stories-section/stories";
|
||||
import Tours from "./commons/tours-section/tours";
|
||||
|
||||
function App() {
|
||||
@@ -11,6 +12,7 @@ function App() {
|
||||
<About />
|
||||
<Feature />
|
||||
<Tours />
|
||||
<Stories />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
@import "./sass/components/composition";
|
||||
@import "./sass/components/feature-box";
|
||||
@import "./sass/components/card";
|
||||
@import "./sass/components/story";
|
||||
|
||||
@import "./sass/layout/header";
|
||||
@import "./sass/layout/grid";
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import ButtonSecondary from "../../components/button/button-secondary";
|
||||
import nat8 from "../images/nat-8.jpg";
|
||||
import nat9 from "../images/nat-9.jpg";
|
||||
|
||||
function Stories() {
|
||||
return (
|
||||
<section className="section-stories">
|
||||
<div className="u-center-text u-margin-bottom-big">
|
||||
<h2 className="heading-secondary">We make people geniunely happy</h2>
|
||||
</div>
|
||||
|
||||
<div className="row">
|
||||
<div className="story">
|
||||
<figure className="story__shape">
|
||||
<img src={nat8} alt="Person on a tour" className="story__img" />
|
||||
<figcaption className="story__caption">Mary Smith</figcaption>
|
||||
</figure>
|
||||
<div className="story__text">
|
||||
<h3 className="heading-tertiary u-margin-bottom-small">
|
||||
I had the best week ever with my family
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore,
|
||||
amet. Ipsa fugiat consequatur amet esse deserunt natus. Blanditiis
|
||||
ex similique harum adipisci voluptatem iste esse voluptates,
|
||||
provident odio, vel quae!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="story">
|
||||
<figure className="story__shape">
|
||||
<img src={nat9} alt="Person on a tour" className="story__img" />
|
||||
<figcaption className="story__caption">Jack Wilson</figcaption>
|
||||
</figure>
|
||||
<div className="story__text">
|
||||
<h3 className="heading-tertiary u-margin-bottom-small">
|
||||
WOW! My life is completely different now
|
||||
</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore,
|
||||
amet. Ipsa fugiat consequatur amet esse deserunt natus. Blanditiis
|
||||
ex similique harum adipisci voluptatem iste esse voluptates,
|
||||
provident odio, vel quae!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="u-center-text u-margin-top-huge">
|
||||
<ButtonSecondary text={"Read all stories ➯"} />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export default Stories;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
.story {
|
||||
width: 75%;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 3rem 6rem rgba($color-black, 0.1);
|
||||
background-color: $color-white;
|
||||
border-radius: 3px;
|
||||
padding: 6rem;
|
||||
padding-left: 9rem;
|
||||
font-size: $default-font-size;
|
||||
transform: skewX(-12deg);
|
||||
|
||||
&__shape {
|
||||
width: 15rem;
|
||||
height: 15rem;
|
||||
float: left;
|
||||
shape-outside: circle(50% at 50% 50%);
|
||||
clip-path: circle(50% at 50% 50%);
|
||||
transform: translateX(-3rem) skewX(12deg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__img {
|
||||
height: 100%;
|
||||
transform: translateX(-4rem) scale(1.4);
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
&__text {
|
||||
transform: skewX(12deg);
|
||||
}
|
||||
|
||||
&__caption {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 20%);
|
||||
color: $color-white;
|
||||
text-transform: uppercase;
|
||||
font-size: 1.7rem;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
&:hover &__caption {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
&:hover &__img {
|
||||
transform: translateX(-4rem) scale(1);
|
||||
filter: blur(3px) brightness(80%);
|
||||
}
|
||||
}
|
||||
@@ -27,3 +27,8 @@
|
||||
padding: 25rem 0 15rem 0;
|
||||
margin-top: -12rem;
|
||||
}
|
||||
|
||||
.section-stories {
|
||||
padding: 15rem;
|
||||
background-color: $color-grey-light-1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user