diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0aaa092 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,38 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch built-in server and debug", + "type": "php", + "request": "launch", + "runtimeArgs": [ + "-S", + "localhost:8080", + "-t", + "./public" + ], + "port": 8080, + "serverReadyAction": { + "action": "openExternally" + } + }, + { + "name": "Debug current script in console", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "externalConsole": false, + "port": 9003 + }, + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9003 + } + ] +} \ No newline at end of file diff --git a/config.php b/config.php index 6e510c8..01ae8c4 100644 --- a/config.php +++ b/config.php @@ -10,7 +10,6 @@ const SUPPORTS_FAST_REFRESH = _SUPPORTS_FAST_REFRESH; /** * Maps the given relative source uri (relative to the `/front` folder) to its actual location depending on imported profile. * @param string $assetURI relative uri path from `/front` folder - * @return string valid url that points to the given uri */ function asset(string $assetURI): string { return _asset($assetURI); diff --git a/front/assets/account.svg b/front/assets/account.svg new file mode 100644 index 0000000..70d7391 --- /dev/null +++ b/front/assets/account.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/front/assets/court/court.svg b/front/assets/court/court.svg new file mode 100644 index 0000000..e01fd58 --- /dev/null +++ b/front/assets/court/court.svg @@ -0,0 +1,63 @@ + \ No newline at end of file diff --git a/front/components/editor/BasketCourt.tsx b/front/components/editor/BasketCourt.tsx index e57d669..e59bdb7 100644 --- a/front/components/editor/BasketCourt.tsx +++ b/front/components/editor/BasketCourt.tsx @@ -8,6 +8,7 @@ import { useState, } from "react" import CourtPlayer from "./CourtPlayer" + import { Player } from "../../tactic/Player" import { Action, ActionKind } from "../../tactic/Action" import ArrowAction from "../actions/ArrowAction" diff --git a/front/style/ball.css b/front/style/ball.css index c14c196..5169ec7 100644 --- a/front/style/ball.css +++ b/front/style/ball.css @@ -9,3 +9,6 @@ height: 20px; cursor: pointer; } + +.ball-div:focus-within { +} diff --git a/front/style/home.css b/front/style/home.css new file mode 100644 index 0000000..780bb84 --- /dev/null +++ b/front/style/home.css @@ -0,0 +1,114 @@ +@import url(variable.css); + +body { + /* background-color: #303030; */ +} +#main { + /* margin-left : 10%; + margin-right: 10%; */ + /* border : solid 1px #303030; */ + display: flex; + flex-direction: column; + font-family: Helvetica; + height: 100%; +} + +#header { + text-align: center; + background-color: var(--main-color); + margin: 0px; + /* border : var(--accent-color) 1px ésolid; */ + display: flex; + flex-direction: row; + /* border-radius: 0.75cap; */ +} + +#IQBall { + color: var(--accent-color); + font-weight: bold; + font-size: 45px; +} + +#IQBall { + color: #ffa238; + font-weight: bold; + font-size: 45px; +} +#body { + display: flex; + flex-direction: row; + margin: 0px; + height: 100%; + background-color: var(--second-color); +} + +.data { + border: 1.5px solid var(--main-contrast-color); + background-color: var(--main-color); + border-radius: 0.75cap; + color: var(--main-contrast-color); +} + +.data:hover { + border-color: var(--accent-color); + cursor: pointer; +} + +.listTactic { + display: block; +} + +.SetButton { + width: 80%; + margin-left: 5%; + margin-top: 5%; +} + +#img-account { + width: 100%; + cursor: pointer; +} + +#header-right, +#header-left { + width: 10%; + /* border: yellow 2px solid; */ +} + +#header-right { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +#username { + color: var(--main-contrast-color); + margin: 0; +} + +#clickable-header-right:hover #username { + color: var(--accent-color); +} + +#header-center { + width: 80%; +} + +#clickable-header-right { + width: 40%; + border-radius: 1cap; + padding: 2%; +} + +#clickable-header-right:hover { + border: orange 1px solid; +} + +.clickable { + cursor: pointer; +} + +#img-account { + width: 100%; +} diff --git a/front/style/home/titre.css b/front/style/home/titre.css new file mode 100644 index 0000000..ccc7326 --- /dev/null +++ b/front/style/home/titre.css @@ -0,0 +1,94 @@ + +#main { + margin-left : 10%; + margin-right: 10%; + border : solid 2px purple; + display: flex; + flex-direction: column; + font-family: Helvetica,; +} + +.new { + border-radius: 100%; +} + +#header { + text-align: center; +<<<<<<< HEAD:front/style/home.css + background-color: green; + margin : 0px; +} + +#body { + display: flex; + flex-direction: row; + border : solid 10px violet; + margin:0px + } + +#personal-space { + background-color: orange; + display: flex; + flex-direction: column; + +} + +#sideMenu { + background-color: grey; +} + +#titlePersonalSpace h2 { + text-align: center; +} + +#sideMenu h2 { + display: inline-block; + margin-right : 5%; +} + +.titreSideMenu { + border-bottom: black solid 2px; + width: 95%; + +} + +#sideMenu .title { + font-size: 13px; + font-weight: bold; + color : #FFFFFF; + letter-spacing: 1px; + text-transform: uppercase; + background-color: black; + padding : 1.5%; + margin-bottom: 0px; +} + +#bodyPersonalSpace { + width: 95%; + border : 1px red solid; + align-self: center; +} +#bodyPersonalSpace table{ + width: 100%; + border-collapse : separate; + border-spacing : 1em; +} + +td { + border : 3px solid black; + padding-bottom : 1%; + padding-top : 1%; + margin: 80px; + text-align: center; +} + +td:hover { + background-color: red; + +======= +} + +#title { + background-color: aqua; +>>>>>>> 6d36115 (WIP page home):front/style/home/titre.css +} \ No newline at end of file diff --git a/front/style/personnal_space.css b/front/style/personnal_space.css new file mode 100644 index 0000000..4f0c67d --- /dev/null +++ b/front/style/personnal_space.css @@ -0,0 +1,40 @@ +#personal-space { + display: flex; + flex-direction: column; +} + +#titlePersonalSpace h2 { + text-align: center; + color: var(--main-contrast-color); + /* font-family: Helvetica; + font-weight: bold; */ +} + +#bodyPersonalSpace { + width: 95%; + /* background-color: #ccc2b7; */ + border: 3px var(--main-color) solid; + border-radius: 0.5cap; + align-self: center; +} + +#bodyPersonalSpace table { + width: 100%; + border-collapse: separate; + border-spacing: 1em; + table-layout: fixed; + overflow: hidden; +} + +#bodyPersonalSpace td { + width: 80px !important; + padding-bottom: 1%; + padding-top: 1%; + height: fit-content; + text-align: center; + overflow: hidden; +} + +tbody p { + text-align: center; +} diff --git a/front/style/side_menu.css b/front/style/side_menu.css new file mode 100644 index 0000000..0344971 --- /dev/null +++ b/front/style/side_menu.css @@ -0,0 +1,53 @@ +@import url(variable.css); + +#sideMenu { + background-color: var(--third-color); + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; +} + +#sideMenu h2 { + display: inline-block; + margin-right: 5%; +} + +#sideMenuContent { + width: 90%; +} +.titreSideMenu { + border-bottom: var(--main-color) solid 3px; + width: 100%; + margin-bottom: 3%; +} + +#sideMenu .title { + font-size: 12px; + font-weight: bold; + color: var(--main-contrast-color); + letter-spacing: 1px; + text-transform: uppercase; + background-color: var(--main-color); + padding: 3%; + margin-bottom: 0px; + margin-right: 3%; +} + +.new { + border-radius: 100%; +} + +.buttonSideMenu { + /* border : black solid 1px; */ + border-radius: 0.5cap; + width: fit-content; + padding: 2%; + margin-top: 3%; + overflow: hidden; +} + +.buttonSideMenu:hover { + /* background-color: #c9d1e0; */ + cursor: pointer; +} diff --git a/front/style/variable.css b/front/style/variable.css new file mode 100644 index 0000000..e50ec93 --- /dev/null +++ b/front/style/variable.css @@ -0,0 +1,7 @@ +:root { + --main-color: #191a21; + --second-color: #282a36; + --third-color: #303341; + --accent-color: #ffa238; + --main-contrast-color: #e6edf3; +} diff --git a/front/views/Home.tsx b/front/views/Home.tsx new file mode 100644 index 0000000..d44571d --- /dev/null +++ b/front/views/Home.tsx @@ -0,0 +1,306 @@ +import "../style/home.css" +import "../style/personnal_space.css" +import "../style/side_menu.css" +// import AccountSvg from "../assets/account.svg?react" +import { CSSProperties, useRef } from "react" + +interface Tactic { + id: number + name: string + creation_date: string +} + +interface Team { + id: number + name: string + picture: string + main_color: string + second_color: string +} + +export default function Home({ + lastTactics, + allTactics, + teams, + username, +}: { + lastTactics: Tactic[] + allTactics: Tactic[] + teams: Team[] + username: string +}) { + return ( +
{username}
+Aucune tactique créé !
+ } else { + data =