Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"[javascriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/4geeks.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello Rigo with Vanilla.js</title>
<title>Landing page with React- Johanna / Valero</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 11 additions & 16 deletions src/js/components/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
import React from "react";

import Navbar from "./Navbar.jsx";
import Jumbotron from "./Jumbotron.jsx"

//include images into your bundle
import rigoImage from "../../img/rigo-baby.jpg";


//create your first component
const Home = () => {
return (
<div className="text-center">


<h1 className="text-center mt-5">Hello Rigo!</h1>
<p>
<img src={rigoImage} />
</p>
<a href="#" className="btn btn-success">
If you see this green button... bootstrap is working...
</a>
<p>
Made by{" "}
<a href="http://www.4geeksacademy.com">4Geeks Academy</a>, with
love!
</p>
<div className = "Home">
<div className="barra-navegacion">
<Navbar/>
</div>
<div className= "container-fluid">
<Jumbotron/>
</div>
</div>
);
};
Expand Down
14 changes: 14 additions & 0 deletions src/js/components/Jumbotron.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";

const Jumbotron = () => {
return(
<div className= "Jumbotron bg-secondary-subtle p-5 m-3">
<h1>A Warm Welcome</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos deleniti doloremque, ipsam voluptatum perspiciatis assumenda debitis consectetur doloribus, ut hic non nisi totam, ipsa alias. Quis explicabo similique eligendi repellendus.</p>
<button type="button" className="btn btn-primary">Call to Action!</button>
</div>
)
}


export default Jumbotron;
24 changes: 24 additions & 0 deletions src/js/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";

const Navbar = () => {
return (
<nav className="navbar navbar-expand-lg bg-body-tertiary bg-dark border-bottom border-body" data-bs-theme="dark">
<div className="container-fluid d-flex">
<a className="navbar-brand ms-4" href="#">Start Bootstrap</a>
<button className="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span className="navbar-toggler-icon"></span>
</button>
<div className="collapse navbar-collapse justify-content-end me-4" id="navbarNavAltMarkup">
<div className="navbar-nav">
<a className="nav-link active" aria-current="page" href="#">Home</a>
<a className="nav-link" href="#">About</a>
<a className="nav-link" href="#">Services</a>
<a className="nav-link" href="#">Contact</a>
</div>
</div>
</div>
</nav>
);
};

export default Navbar;