diff --git a/.vscode/settings.json b/.vscode/settings.json index d83b5ba6c..b4cb7ea09 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,8 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "workbench.editorAssociations": { "*.md": "vscode.markdown.preview.editor" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "vscode.typescript-language-features" } } \ No newline at end of file diff --git a/src/js/component/Card/Card.jsx b/src/js/component/Card/Card.jsx new file mode 100644 index 000000000..c822e7fc8 --- /dev/null +++ b/src/js/component/Card/Card.jsx @@ -0,0 +1,15 @@ +import React from "react"; + +const Card = () => { + return ( +
+ ... +
+
Card title
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+ Go somewhere +
+
+ ) +} +export default Card; \ No newline at end of file diff --git a/src/js/component/Footer/Footer.jsx b/src/js/component/Footer/Footer.jsx new file mode 100644 index 000000000..0abb681d0 --- /dev/null +++ b/src/js/component/Footer/Footer.jsx @@ -0,0 +1,15 @@ +import React from "react"; + +const Footer = () => { + return ( + <> + + + ) +} + +export default Footer; \ No newline at end of file diff --git a/src/js/component/Jumbotron/Jumbotron.jsx b/src/js/component/Jumbotron/Jumbotron.jsx new file mode 100644 index 000000000..34b8c724d --- /dev/null +++ b/src/js/component/Jumbotron/Jumbotron.jsx @@ -0,0 +1,19 @@ +import React from "react"; + +const Jumbotron = () => { + return ( + <> +
+
+

A warm welcome!

+

+ Lorem ipsum dolor sit amet, consectetur adispisicing elit, ipsa, ipsam, eligendi, in quo sunt possimus non incidunt odit vero aliquid smilique quaerat narm nobis ilo aspernatur vitae fugia numquam repletiat +

+ +
+
+ + ) +} + +export default Jumbotron; \ No newline at end of file diff --git a/src/js/component/Navbar/Navbar.jsx b/src/js/component/Navbar/Navbar.jsx new file mode 100644 index 000000000..64162daf1 --- /dev/null +++ b/src/js/component/Navbar/Navbar.jsx @@ -0,0 +1,32 @@ +import React from "react"; + +const Navbar = () => { + return ( + + ) +} + +export default Navbar; \ No newline at end of file diff --git a/src/js/component/home.jsx b/src/js/component/home.jsx deleted file mode 100644 index 737b22c9d..000000000 --- a/src/js/component/home.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react"; - -//include images into your bundle -import rigoImage from "../../img/rigo-baby.jpg"; - -//create your first component -const Home = () => { - return ( -
-

Hello Rigo!

-

- -

- - If you see this green button... bootstrap is working... - -

- Made by{" "} - 4Geeks Academy, with - love! -

-
- ); -}; - -export default Home; diff --git a/src/js/index.js b/src/js/index.js index 6b2056c50..50bb7a425 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -6,7 +6,7 @@ import ReactDOM from "react-dom/client"; import "../styles/index.css"; //import your own components -import Home from "./component/home.jsx"; +import Home from "../pages/home.jsx"; //render your react application ReactDOM.createRoot(document.getElementById('app')).render(); diff --git a/src/pages/home.jsx b/src/pages/home.jsx new file mode 100644 index 000000000..ced9c494a --- /dev/null +++ b/src/pages/home.jsx @@ -0,0 +1,45 @@ +import React from "react"; +import Navbar from "../js/component/Navbar/Navbar"; +import Jumbotron from "../js/component/Jumbotron/Jumbotron"; +import Card from "../js/component/Card/Card"; +import Footer from "../js/component/Footer/Footer"; + +//include images into your bundle +//create your first component +const Home = () => { + + function repeatCards(count) { + let cards = [] + for (let i = 0; i < count; i++) { + cards.push( + <> +
+ +
+ + ) + } + return cards + } + return ( + <> + + + +
+ + +
+ {repeatCards(4)} +
+ +
+ +