diff --git a/front/style/home/titre.css b/front/style/home/titre.css index ccc7326..e4358ff 100644 --- a/front/style/home/titre.css +++ b/front/style/home/titre.css @@ -14,7 +14,6 @@ #header { text-align: center; -<<<<<<< HEAD:front/style/home.css background-color: green; margin : 0px; } @@ -85,10 +84,4 @@ td { 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/views/Settings.tsx b/front/views/Settings.tsx new file mode 100644 index 0000000..d5b2fa1 --- /dev/null +++ b/front/views/Settings.tsx @@ -0,0 +1,46 @@ +import "../style/home.css" + +export default function Settings({username} : {username : string}){ + return ( +
+ + </div> + ) +} + +/** + * + * @param param0 username + * @returns Header + */ +export function Title({ username }: { username: string }) { + return ( + <div id="header"> + <div id="header-left"></div> + <div id="header-center"> + <h1 + id="IQBall" + className="clickable" + onClick={() => { + location.pathname = "/" + }}> + <span id="IQ">IQ</span> + <span id="Ball">Ball</span> + </h1> + </div> + <div id="header-right"> + <div className="clickable" id="clickable-header-right"> + {/* <AccountSvg id="img-account" /> */} + <img + id="img-account" + src="account.svg" + onClick={() => { + location.pathname = "/settings" + }} + /> + <p id="username">{username}</p> + </div> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/App/Controller/UserController.php b/src/App/Controller/UserController.php index a995879..bbe0a34 100644 --- a/src/App/Controller/UserController.php +++ b/src/App/Controller/UserController.php @@ -56,7 +56,7 @@ class UserController { * @return ViewHttpResponse account settings page */ public function settings(SessionHandle $session): ViewHttpResponse { - return ViewHttpResponse::twig("account_settings.twig", []); + return ViewHttpResponse::react("views/Settings.tsx", []); } public function disconnect(MutableSessionHandle $session): HttpResponse {