Simple React Page
Simple React Page
Simple React Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-
zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
</body>
</html>
Styles (css)
.nav-header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
box-shadow: 0 5px 10px -2px rgba(0, 0, 0, 0.2);
margin-bottom: 20px;
}
.nav-items {
list-style: none;
display: flex;
justify-content: space-evenly;
}
.nav-items > li {
padding: 10px;
}
.img-style {
width: 60px;
}
Javascript (React)
// header component
function Header() {
return (
<header>
<nav className="nav-header container-fluid">
<img className="img-style" src="./react-2.svg" />
<ul className="nav-items">
<li>Pricing</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</header>
)
}
// Footer component
function Footer() {
return (
<footer className="footer">© 2022 Akewak Biru development. All rights reserved.</footer>
)
}
// Body component
function Body() {
return (
<div className="container-fluid">
<h1>Reasons that i am excited to learn javascript</h1>
<ol>
<li>i want to make some money</li>
<li>i want to make some money</li>
<li>i want to make some money</li>
</ol>
</div>
)
}