created button component and moved header to commons folder

This commit is contained in:
Yusuf Ipek
2021-04-29 15:23:08 +03:00
parent 4a6a7e8890
commit 9452abba7d
5 changed files with 40 additions and 1 deletions
+89
View File
@@ -0,0 +1,89 @@
.header {
height: 95vh;
background-image: linear-gradient(
to right bottom,
rgba(126, 213, 111, 0.8),
rgba(40, 180, 133, 0.8)
),
url(../../commons/images/hero.jpg);
background-size: cover;
background-position: top;
clip-path: polygon(0 0, 100% 0, 100% 75vh, 0 100%);
position: relative;
}
.text-box {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.logo-box {
position: absolute;
top: 40px;
left: 40px;
}
.logo {
height: 35px;
}
.heading-primary {
color: #ffff;
text-transform: uppercase;
backface-visibility: hidden;
margin-bottom: 60px;
}
.heading-primary-main {
display: block;
font-size: 60px;
font-weight: 400;
letter-spacing: 35px;
animation: moveInLeft 1s ease-out;
}
.heading-primary-sub {
display: block;
font-size: 20px;
font-weight: 700;
letter-spacing: 17.4px;
animation: moveInRight 1s ease-out;
}
@keyframes moveInLeft {
0% {
opacity: 0;
transform: translateX(-100px);
}
80% {
transform: translateX(10px);
}
100% {
opacity: 1;
transform: translate(0);
}
}
@keyframes moveInRight {
0% {
opacity: 0;
transform: translateX(100px);
}
80% {
transform: translateX(-10px);
}
100% {
opacity: 1;
transform: translate(0);
}
}
+22
View File
@@ -0,0 +1,22 @@
import "./header.css";
import logoWhite from "../../commons/images/logo-white.png";
import Button from "../../components/button/button";
function Header() {
return (
<header className="header">
<div className="logo-box">
<img src={logoWhite} alt="Logo" className="logo"></img>
</div>
<div className="text-box">
<h1 className="heading-primary">
<span className="heading-primary-main">Outdoors</span>
<span className="heading-primary-sub">is where life happens</span>
</h1>
<Button text={"Discover our tours"} />
</div>
</header>
);
}
export default Header;