diff --git a/front/style/home.css b/front/style/home.css index 156e3f4..965f880 100644 --- a/front/style/home.css +++ b/front/style/home.css @@ -1,11 +1,11 @@ body { - background-color: #f8f8f1; + /* background-color: #303030; */ } #main { - margin-left : 10%; - margin-right: 10%; - border : solid 2px purple; + /* margin-left : 10%; + margin-right: 10%; */ + border : solid 1px #303030; display: flex; flex-direction: column; font-family: Helvetica; @@ -43,7 +43,7 @@ body { } #sideMenu { - background-color: grey; + background-color: #a7a7a7; display: flex; flex-direction: column; align-items: center; @@ -63,7 +63,7 @@ body { width: 90%; } .titreSideMenu { - border-bottom: black solid 2px; + border-bottom: black solid 3px; width: 100%; margin-bottom: 3%; @@ -77,7 +77,7 @@ body { letter-spacing: 1px; text-transform: uppercase; background-color: black; - padding : 1.5%; + padding : 3%; margin-bottom: 0px; margin-right: 3%; @@ -85,7 +85,9 @@ body { #bodyPersonalSpace { width: 95%; - border : 1px red solid; + background-color: #ccc2b7; + /* border : 2px #303030 solid; */ + border-radius: 0.5cap; align-self: center; } #bodyPersonalSpace table{ @@ -105,12 +107,14 @@ body { overflow: hidden ; } .dataTactic { - border : 2px solid black; + border : 1.5px solid black; + background-color: #ccc2b7; border-radius: 0.75cap; } .dataTactic:hover { background-color: #c9d1e0; + /* color : #ffa238; */ cursor : pointer; } @@ -124,7 +128,6 @@ ul { } .SetButton { - border: 0px solid brown; width: 80%; margin-left : 5%; margin-top : 5%; diff --git a/front/views/Home.tsx b/front/views/Home.tsx index 605e0e3..307e016 100644 --- a/front/views/Home.tsx +++ b/front/views/Home.tsx @@ -16,7 +16,7 @@ interface Team { } export default function Home({ lastTactics, allTactics, teams } : { lastTactics : Tactic[] , allTactics : Tactic[], teams : Team[]}) { - console.log(teams); + console.log(allTactics); return (
@@ -34,7 +34,7 @@ export function Title() { } export function Body({ lastTactics, allTactics, teams } : { lastTactics : Tactic[], allTactics : Tactic[], teams : Team[]}) { - const widthPersonalSpace = 80; + const widthPersonalSpace = 78; const widthSideMenu = 100-widthPersonalSpace return ( <div id="body"> @@ -79,7 +79,7 @@ function TitlePersonalSpace() { ) } -function BodyPersonalSpace({ allTactics } : { allTactics : Tactic[]}) { +function TableData({allTactics} : {allTactics : Tactic[]} ) { const nbRow = Math.floor(allTactics.length/3)+1; let listTactic = Array(nbRow); for (let i = 0; i < nbRow; i++) { @@ -118,6 +118,20 @@ function BodyPersonalSpace({ allTactics } : { allTactics : Tactic[]}) { {tactic} </tr> ); + return data; +} + +function BodyPersonalSpace({ allTactics } : { allTactics : Tactic[]}) { + let data; + if (allTactics.length == 0) { + data = ( + <p>Aucune tactique créé !</p> + ); + } + else { + data = (<TableData allTactics={allTactics}/>); + } + return ( <div id="bodyPersonalSpace"> <table>