created card component and tours section

This commit is contained in:
Yusuf Ipek
2021-05-02 13:34:49 +03:00
parent 12ab9e618c
commit 741b44c5d1
8 changed files with 90 additions and 3 deletions
+2
View File
@@ -2,6 +2,7 @@ import "./App.scss";
import About from "./commons/about-section/about"; import About from "./commons/about-section/about";
import Feature from "./commons/feature-section/feature"; import Feature from "./commons/feature-section/feature";
import Header from "./commons/header/header.jsx"; import Header from "./commons/header/header.jsx";
import Tours from "./commons/tours-section/tours";
function App() { function App() {
return ( return (
@@ -9,6 +10,7 @@ function App() {
<Header /> <Header />
<About /> <About />
<Feature /> <Feature />
<Tours />
</div> </div>
); );
} }
+2 -1
View File
@@ -10,8 +10,9 @@
@import "./sass/components/button"; @import "./sass/components/button";
@import "./sass/components/composition"; @import "./sass/components/composition";
@import "./sass/components/feature-box"; @import "./sass/components/feature-box";
@import "./sass/layout/header"; @import "./sass/components/card";
@import "./sass/layout/header";
@import "./sass/layout/grid"; @import "./sass/layout/grid";
@import "./sass/pages/home"; @import "./sass/pages/home";
+24
View File
@@ -0,0 +1,24 @@
function Tours() {
return (
<section className="section-tours">
<div className="u-center-text u-margin-bottom-big">
<h2 className="heading-secondary">Most popular tours</h2>
</div>
<div className="row">
<div className="col-1-of-3">
<div className="card">
<div className="card__side card__side--front">Front</div>
<div className="card__side card__side--back card__side--back-1">
Back
</div>
</div>
</div>
<div className="col-1-of-3"></div>
<div className="col-1-of-3"></div>
</div>
</section>
);
}
export default Tours;
+11
View File
@@ -3,6 +3,12 @@ $color-primary: #55c57a;
$color-primary-light: #55c57a; $color-primary-light: #55c57a;
$color-primary-dark: #28b485; $color-primary-dark: #28b485;
$color-secondary-light: #ffb900;
$color-secondary-dark: #ff7730;
$color-tertiary-light: #2998ff;
$color-tertiary-dark: #5643fa;
$color-grey-light-1: #f7f7f7; $color-grey-light-1: #f7f7f7;
$color-grey-dark: #777; $color-grey-dark: #777;
@@ -16,3 +22,8 @@ $default-font-size: 1.6rem;
$grid-width: 114rem; $grid-width: 114rem;
$gutter-vertical: 8rem; $gutter-vertical: 8rem;
$gutter-horizontal: 6rem; $gutter-horizontal: 6rem;
// OTHER
$shadow-default: 0 1.5rem 4rem rgba($color-black, 0.15);
$shadow-light: 0.5rem 1rem 2rem rgba($color-black, 0.2);
+1 -1
View File
@@ -49,7 +49,7 @@ body {
&:hover { &:hover {
transform: skewY(2deg) skewX(15deg) scale(1.1); transform: skewY(2deg) skewX(15deg) scale(1.1);
text-shadow: 0.5rem 1rem 2rem rgba($color-black, 0.2); text-shadow: $shadow-light;
} }
} }
+43
View File
@@ -0,0 +1,43 @@
.card {
perspective: 150rem;
position: relative;
height: 50rem;
&__side {
font-size: 2rem;
height: 50rem;
transition: all 0.58s ease;
position: absolute;
top: 0;
left: 0;
width: 100%;
backface-visibility: hidden;
border-radius: 3px;
box-shadow: $shadow-default;
&--front {
background-color: $color-white;
}
&--back {
transform: rotateY(180deg);
&-1 {
background-image: linear-gradient(
to right bottom,
$color-secondary-light,
$color-secondary-dark
);
}
}
}
&:hover &__side--front {
transform: rotateY(180deg);
}
&:hover &__side--back {
transform: rotateY(0deg);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
padding: 2.5rem; padding: 2.5rem;
text-align: center; text-align: center;
border-radius: 0.3rem; border-radius: 0.3rem;
box-shadow: 0 1.5rem 4rem rgba($color-black, 0.15); box-shadow: $shadow-default;
transition: transform 0.3s; transition: transform 0.3s;
&__icon { &__icon {
+6
View File
@@ -21,3 +21,9 @@
transform: skewY(7deg); transform: skewY(7deg);
} }
} }
.section-tours {
background-color: $color-grey-light-1;
padding: 25rem 0 50rem 0;
margin-top: -12rem;
}