diff --git a/app.py b/app.py
new file mode 100644
index 0000000..e32a811
--- /dev/null
+++ b/app.py
@@ -0,0 +1,23 @@
+import time
+
+import redis
+from flask import Flask
+
+app = Flask(__name__)
+cache = redis.Redis(host='redis', port=6379)
+
+def get_hit_count():
+ retries = 5
+ while True:
+ try:
+ return cache.incr('hits')
+ except redis.exceptions.ConnectionError as exc:
+ if retries == 0:
+ raise exc
+ retries -= 1
+ time.sleep(0.5)
+
+@app.route('/')
+def hello():
+ count = get_hit_count()
+ return 'Hello World! I have been seen {} times.\n'.format(count)
\ No newline at end of file
diff --git a/compose.yaml b/compose.yaml
new file mode 100644
index 0000000..3cc69a3
--- /dev/null
+++ b/compose.yaml
@@ -0,0 +1,7 @@
+services:
+ web:
+ build: .
+ ports:
+ - "0:5173"
+ redis:
+ image: "redis:gmoker"
\ No newline at end of file
diff --git a/package.json b/package.json
index 739bc6e..99e92b0 100644
--- a/package.json
+++ b/package.json
@@ -5,12 +5,16 @@
"type": "module",
"scripts": {
"dev": "vite",
- "start": "vite",
+ "start": "bun run vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
+ "@chakra-ui/react": "^2.8.2",
+ "@emotion/react": "^11.13.0",
+ "@emotion/styled": "^11.13.0",
+ "framer-motion": "^11.3.21",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..eadf80f
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+flask
+redis
\ No newline at end of file
diff --git a/src/component/App.jsx b/src/component/App.jsx
index 3fa2430..b3a206d 100644
--- a/src/component/App.jsx
+++ b/src/component/App.jsx
@@ -1,3 +1,7 @@
export function App() {
- return
Bienvenue sur Gmoker.com
;
+ return (
+
+ Bienvenue sur Gmoker.com
+
+ );
}
diff --git a/src/component/Button.jsx b/src/component/Button.jsx
deleted file mode 100644
index 65276ff..0000000
--- a/src/component/Button.jsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export function Button(argv) {
- return ;
-}
diff --git a/src/component/Card.jsx b/src/component/Card.jsx
deleted file mode 100644
index 50a27d3..0000000
--- a/src/component/Card.jsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Button } from "./Button";
-
-export function Postcard(argv) {
- return (
-
- {argv.name}
-
- );
-}
diff --git a/src/component/Head.jsx b/src/component/Head.jsx
index 5d4f958..9461006 100644
--- a/src/component/Head.jsx
+++ b/src/component/Head.jsx
@@ -1,39 +1,27 @@
import chat from ".././assets/chat.jpg";
+import { Button, ButtonGroup } from "@chakra-ui/react";
+import { Flex, Spacer } from "@chakra-ui/react";
-function Button(argv, clicked) {
- return (
-
- );
-}
-
+const button_style = {
+ colorScheme: "cyan",
+ variant: "solid",
+};
export function Header() {
return (
-
-
- {Button("Aceuil")}
- {Button("About")}
- {Button("Product")}
- {Button("Blog")}
- {Button("Serveurs")}
- {Button("Dowloads")}
- {Button("Help")}
-
-
- {Button("Acount")}
- {Button("Get started")}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
}
diff --git a/src/main.jsx b/src/main.jsx
index 2783cab..ad4b8df 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,11 +1,10 @@
import React from "react";
import ReactDOM from "react-dom/client";
+import { ChakraProvider } from "@chakra-ui/react";
import { App } from "./component/App.jsx";
import { Navbar } from "./component/Navbar.jsx";
import { Body } from "./component/Body.jsx";
import { Footer } from "./component/Footer.jsx";
-import { Postcard } from "./component/Card.jsx";
-import { Button } from "./component/Button.jsx";
import { Header } from "./component/Head.jsx";
import back_img from "./assets/img_site.jpg";
import chat from "./assets/chat.jpg";
@@ -17,28 +16,21 @@ function buttoncaller(argv) {
ReactDOM.createRoot(document.getElementById("root")).render(
<>
-
-