);
diff --git a/cryptide_project/src/Pages/InGame.css b/cryptide_project/src/Pages/InGame.css
index 690147a..9e12155 100644
--- a/cryptide_project/src/Pages/InGame.css
+++ b/cryptide_project/src/Pages/InGame.css
@@ -7,7 +7,7 @@
width: 30%;
border-radius: 0px 0px 30px 30px;
- border: solid #85C9C2;
+ border: solid;
border-width: 2px 5px;
background-color: white;
@@ -89,7 +89,7 @@
}
.button{
- background-color: #85C9C2;
+ /*background-color: #85C9C2;*/
border: solid 2px #85C9C2;
border-radius: 10px;
diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx
index 139d6d3..2a65c88 100644
--- a/cryptide_project/src/Pages/InGame.tsx
+++ b/cryptide_project/src/Pages/InGame.tsx
@@ -3,7 +3,7 @@ import Switch from "react-switch";
/* Style */
import "./InGame.css"
-
+import {useTheme} from '../Style/ThemeContext'
/* Component */
import GraphContainer from '../Components/GraphContainer';
import ChoiceBar from '../Components/ChoiceBar';
@@ -31,6 +31,7 @@ import Stub from '../source/Stub';
import { HiLanguage } from 'react-icons/hi2';
import { Nav, NavDropdown } from 'react-bootstrap';
import { FormattedMessage } from 'react-intl';
+import Color from '../source/Color';
//@ts-ignore
const InGame = ({locale, changeLocale}) => {
@@ -55,7 +56,7 @@ const InGame = ({locale, changeLocale}) => {
];
-
+ const theme = useTheme();
const [showChoiceBar, setShowChoiceBar] = useState(false);
@@ -116,7 +117,10 @@ const InGame = ({locale, changeLocale}) => {
return (
-
+
{/* texte changeable et a traduire */}
Dummy, à vous de jouer !
@@ -125,20 +129,34 @@ const InGame = ({locale, changeLocale}) => {
-
+
Players
-
+
-
+
@@ -147,12 +165,20 @@ const InGame = ({locale, changeLocale}) => {
*/}
-
+
-
+
@@ -226,7 +252,7 @@ const InGame = ({locale, changeLocale}) => {
{showChoiceBar && }
-
diff --git a/cryptide_project/src/Pages/Lobby.css b/cryptide_project/src/Pages/Lobby.css
index 0c9ce5f..5aed52c 100644
--- a/cryptide_project/src/Pages/Lobby.css
+++ b/cryptide_project/src/Pages/Lobby.css
@@ -5,7 +5,7 @@
background-color: #fff;
min-height: 100vh;
font-size: calc(10px + 2vmin);
- color: #2A4541;
+ /* color: #2A4541; */
}
.left-section {
@@ -15,8 +15,8 @@
}
.lobby-vertical-divider{
- width: 5px;
- background-color: #2A4541;
+ width: 10px;
+ /* background-color: #2A4541; */
}
.right-section {
diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx
index 38a59e0..cf30190 100644
--- a/cryptide_project/src/Pages/Lobby.tsx
+++ b/cryptide_project/src/Pages/Lobby.tsx
@@ -1,13 +1,21 @@
import React from 'react';
+
+/* Style */
import './Lobby.css';
-import PlayerItemList from '../Components/PlayerItemList'
+import { useTheme } from '../Style/ThemeContext';
+
+/* res */
import Person from '../res/img/Person.png';
import Bot from '../res/img/bot.png';
import param from '../res/icon/param.png';
import cible from '../res/icon/cible.png';
+
+/* Component */
import ButtonImgNav from '../Components/ButtonImgNav';
+import PlayerItemList from '../Components/PlayerItemList'
function Lobby() {
+ const theme=useTheme();
return (
@@ -19,7 +27,7 @@ function Lobby() {
-
+
diff --git a/cryptide_project/src/Pages/Play.css b/cryptide_project/src/Pages/Play.css
index 5f736f4..f688821 100644
--- a/cryptide_project/src/Pages/Play.css
+++ b/cryptide_project/src/Pages/Play.css
@@ -79,10 +79,13 @@
width:200px;
height: 8vh;
- background-color: #85C9C2;
- color: #2A4541;
+ /* background-color: #85C9C2;
+ color: #2A4541; */
+ color: white;
+
+ border: solid;
border-radius: 15px;
- border-width: 0;
+ border-width: 2px;
font-size:larger;
}
\ No newline at end of file
diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx
index 4ca8821..1fa0785 100644
--- a/cryptide_project/src/Pages/Play.tsx
+++ b/cryptide_project/src/Pages/Play.tsx
@@ -1,7 +1,8 @@
import React from 'react';
-/* Page */
+/* Style */
import './Play.css';
+import { useTheme } from '../Style/ThemeContext';
/* Nav */
import { Link } from 'react-router-dom';
@@ -19,6 +20,7 @@ import share from '../res/icon/share.png';
function Play() {
+ const theme=useTheme()
return (
@@ -41,13 +43,13 @@ function Play() {
- Jouer seul
+ Jouer seul
- Créer une partie
+ Créer une partie
- Rejoindre
+ Rejoindre
diff --git a/cryptide_project/src/Style/Color.tsx b/cryptide_project/src/Style/Color.tsx
new file mode 100644
index 0000000..458fa7d
--- /dev/null
+++ b/cryptide_project/src/Style/Color.tsx
@@ -0,0 +1,10 @@
+const COLORS = {
+ primary:'#0064E0',
+ secondary:'',
+ tertiary:'',
+
+ white: '#fff',
+ black: '#000',
+}
+
+export default COLORS;
diff --git a/cryptide_project/src/Style/Global.css b/cryptide_project/src/Style/Global.css
index 42bab6c..1a0f41f 100644
--- a/cryptide_project/src/Style/Global.css
+++ b/cryptide_project/src/Style/Global.css
@@ -23,7 +23,7 @@
}
.statusDiv{
- background-color: #A7E2DC;
+ /* background-color: #A7E2DC; */
border-radius: 15px;
height: 30px;
diff --git a/cryptide_project/src/Style/Theme.tsx b/cryptide_project/src/Style/Theme.tsx
new file mode 100644
index 0000000..50df20a
--- /dev/null
+++ b/cryptide_project/src/Style/Theme.tsx
@@ -0,0 +1,13 @@
+// theme.js
+const theme = {
+ colors: {
+ primary: '#0064E0',
+ secondary: '#0052B8',
+
+ text: '#fff'
+
+ //faire une gestion dark/light
+ },
+};
+
+export default theme;
diff --git a/cryptide_project/src/Style/ThemeContext.tsx b/cryptide_project/src/Style/ThemeContext.tsx
new file mode 100644
index 0000000..feada7d
--- /dev/null
+++ b/cryptide_project/src/Style/ThemeContext.tsx
@@ -0,0 +1,15 @@
+// ThemeContext.js
+import React, { createContext, useContext } from 'react';
+import theme from './Theme';
+
+const ThemeContext = createContext(theme);
+
+export const useTheme = () => useContext(ThemeContext);
+
+//@ts-ignore
+export const ThemeProvider = ({ children }) => (
+
{children}
+);
+
+
+//* style={{ color: theme.colors.primary }}
\ No newline at end of file
From 6f38874b0f9e885373fcd884f8434ba56a983590 Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Mon, 13 Nov 2023 10:55:54 +0100
Subject: [PATCH 11/11] =?UTF-8?q?modif=20d=C3=BB=20au=20merge=20avec=20mas?=
=?UTF-8?q?ter=20:wrench:?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cryptide_project/src/Pages/InGame.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx
index 2a65c88..38946bc 100644
--- a/cryptide_project/src/Pages/InGame.tsx
+++ b/cryptide_project/src/Pages/InGame.tsx
@@ -27,11 +27,11 @@ import Button from 'react-bootstrap/Button';
import Offcanvas from 'react-bootstrap/Offcanvas';
/* Model */
-import Stub from '../source/Stub';
+import Stub from '../model/Stub';
import { HiLanguage } from 'react-icons/hi2';
import { Nav, NavDropdown } from 'react-bootstrap';
import { FormattedMessage } from 'react-intl';
-import Color from '../source/Color';
+import Color from '../model/Color';
//@ts-ignore
const InGame = ({locale, changeLocale}) => {