mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
changed classnames according to BEM structure
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-box {
|
.header__text-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 40%;
|
top: 40%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-box {
|
.header__logo-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4rem;
|
top: 4rem;
|
||||||
left: 4rem;
|
left: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.header__logo {
|
||||||
height: 3.5rem;
|
height: 3.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
margin-bottom: 6rem;
|
margin-bottom: 6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-primary-main {
|
.heading-primary--main {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 6rem;
|
font-size: 6rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
animation: moveInLeft 1s ease-out;
|
animation: moveInLeft 1s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-primary-sub {
|
.heading-primary--sub {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import Button from "../../components/button/button";
|
|||||||
function Header() {
|
function Header() {
|
||||||
return (
|
return (
|
||||||
<header className="header">
|
<header className="header">
|
||||||
<div className="logo-box">
|
<div className="header__logo-box">
|
||||||
<img src={logoWhite} alt="Logo" className="logo"></img>
|
<img src={logoWhite} alt="Logo" className="header__logo"></img>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-box">
|
<div className="header__text-box">
|
||||||
<h1 className="heading-primary">
|
<h1 className="heading-primary">
|
||||||
<span className="heading-primary-main">Outdoors</span>
|
<span className="heading-primary--main">Outdoors</span>
|
||||||
<span className="heading-primary-sub">is where life happens</span>
|
<span className="heading-primary--sub">is where life happens</span>
|
||||||
</h1>
|
</h1>
|
||||||
<Button animationName={"move-in-bottom"} text={"Discover our tours"} />
|
<Button animationName={"move-in--bottom"} text={"Discover our tours"} />
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.move-in-bottom {
|
.move-in--bottom {
|
||||||
animation: moveInBottom 0.5s ease-out 0.75s;
|
animation: moveInBottom 0.5s ease-out 0.75s;
|
||||||
animation-fill-mode: backwards;
|
animation-fill-mode: backwards;
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
|
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-white {
|
.btn--white {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
transition: all 0.4s;
|
transition: all 0.4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-white::after {
|
.btn--white::after {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ function Button(props) {
|
|||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
className={
|
className={
|
||||||
animationName === "move-in-bottom"
|
animationName === "move-in--bottom"
|
||||||
? "btn btn-white move-in-bottom"
|
? "btn btn--white move-in--bottom"
|
||||||
: "btn btn-white"
|
: "btn btn--white"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
|
|||||||
Reference in New Issue
Block a user