update: buttons creations and put a background
This commit is contained in:
parent
7a1c302d5a
commit
76ec198868
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
src/assets/img_site.jpg
Normal file
BIN
src/assets/img_site.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 882 KiB |
@ -1,3 +1,18 @@
|
|||||||
|
import chat from ".././assets/chat.jpg";
|
||||||
|
|
||||||
|
function Button(argv, clicked) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
alert(argv);
|
||||||
|
}}
|
||||||
|
style={{ margin: "0 8px", alignItems: "left" }}
|
||||||
|
>
|
||||||
|
{argv}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@ -6,10 +21,19 @@ export function Header() {
|
|||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h1 style={{ textAlign: "left" }}>
|
<h2 style={{ textAlign: "left" }}>
|
||||||
Aceuil About Product Blog Serveurs Dowloads Help
|
{Button("Aceuil")}
|
||||||
</h1>
|
{Button("About")}
|
||||||
<h1 style={{ textAlign: "right" }}>Acount Get started</h1>
|
{Button("Product")}
|
||||||
|
{Button("Blog")}
|
||||||
|
{Button("Serveurs")}
|
||||||
|
{Button("Dowloads")}
|
||||||
|
{Button("Help")}
|
||||||
|
</h2>
|
||||||
|
<h2 style={{ textAlign: "right" }}>
|
||||||
|
{Button("Acount")}
|
||||||
|
{Button("Get started")}
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
32
src/main.jsx
32
src/main.jsx
@ -7,7 +7,8 @@ import { Footer } from "./component/Footer.jsx";
|
|||||||
import { Postcard } from "./component/Card.jsx";
|
import { Postcard } from "./component/Card.jsx";
|
||||||
import { Button } from "./component/Button.jsx";
|
import { Button } from "./component/Button.jsx";
|
||||||
import { Header } from "./component/Head.jsx";
|
import { Header } from "./component/Head.jsx";
|
||||||
import chat from "./assets/chat_sex.jpg";
|
import back_img from "./assets/img_site.jpg";
|
||||||
|
import chat from "./assets/chat.jpg";
|
||||||
|
|
||||||
function buttoncaller(argv) {
|
function buttoncaller(argv) {
|
||||||
console.log(argv);
|
console.log(argv);
|
||||||
@ -16,17 +17,26 @@ function buttoncaller(argv) {
|
|||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
<>
|
<>
|
||||||
<Navbar />
|
<div
|
||||||
<Header />
|
style={{
|
||||||
<App />
|
backgroundImage: `url(${back_img})`,
|
||||||
<Body />
|
minHeight: "100vh",
|
||||||
<Button
|
backgroundSize: "cover",
|
||||||
title="click"
|
backgroundPosition: "center",
|
||||||
clicked={() => {
|
|
||||||
buttoncaller("coucou");
|
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
<Footer />
|
<Navbar />
|
||||||
|
<Header />
|
||||||
|
<App />
|
||||||
|
<Body />
|
||||||
|
<Button
|
||||||
|
title="click"
|
||||||
|
clicked={() => {
|
||||||
|
buttoncaller("coucou");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user