diff --git a/WEB-INF/src/controleurs/Account.java b/WEB-INF/src/controleurs/Account.java index 3f727476eadc49b84a93e338313b76144ce6a15e..5dcefb0c94b7b4dbb4baa801a3b15eec4b0b56d5 100644 --- a/WEB-INF/src/controleurs/Account.java +++ b/WEB-INF/src/controleurs/Account.java @@ -38,12 +38,13 @@ public class Account extends HttpServlet { out.println("</body>"); - + out.println("<section class=\"account_section\">"); out.println("<h2>CHANGE YOUR PASSWORD</h2>"); out.println("<form class=\"changepwdForm\" action=\"/s4a021-web-backend/Account\">"); out.println("<input name=\"newPwd\" type=\"password\" placeholder=\"New password\">"); out.println("<button type=\"submit\">Change it !</button>"); out.println("</form>"); + out.println("</section>"); String npwd = req.getParameter("newPwd"); if (npwd != null){ @@ -65,10 +66,12 @@ public class Account extends HttpServlet { // out.println("<button type=\"submit\">Delete Account</button>"); // out.println("</form>"); + out.println("<section class=\"account_section\">"); out.println("<h2>DELETE YOUR ACCOUNT</h2>"); out.println("<form class=\"delForm\" action=\"/s4a021-web-backend/deletedAccount\" method=\"post\">"); out.println("<button type=\"submit\">Delete Account</button>"); out.println("</form>"); + out.println("</section>"); out.println("<footer>"); out.println("Connected as " + login); diff --git a/WEB-INF/src/controleurs/Following.java b/WEB-INF/src/controleurs/Following.java index 2dee0a0429ab112c4666e21f7c76d9eddf04d11c..aec25aba1a56d71ab6119ab0d22c774ea17e889b 100644 --- a/WEB-INF/src/controleurs/Following.java +++ b/WEB-INF/src/controleurs/Following.java @@ -42,16 +42,11 @@ public class Following extends HttpServlet { out.println("<html><body><meta charset=\"utf-8\">"); out.println("<link rel=\"stylesheet\" href=\"css/feed.css\">"); out.println("<title>Followed</title>"); - - out.println("<nav>"); - out.println("<ul class=\"menu\">"); - out.println("<li class=\"menu_option\"><a href=\"http://localhost:8080/s4a021-web-backend/Welcome\">\uD83C\uDFE0 Home</a></li>"); - out.println("<li class=\"menu_option\"><a href=\"http://localhost:8080/s4a021-web-backend/Followed\">\uD83E\uDDF5 Followed</a></li>"); - out.println("<li class=\"menu_option\"><a href=\"http://localhost:8080/s4a021-web-backend/Account\">\uD83D\uDC64 Account</a></li>"); - out.println("</ul></nav>"); out.println("<h1>Threads followed</h1>"); + out.println(PageGeneration.generateNavMenu()); + if (!threadsFollowedByUser.isEmpty()) { for (Integer t : threadsFollowedByUser) { MyThread thread = null; diff --git a/WEB-INF/src/controleurs/NewThread.java b/WEB-INF/src/controleurs/NewThread.java index d5d9102900e7b1b77a7f25ef6fdd6b7365b2aad8..4efafdc053f9ab069576580c27832348c79baa77 100644 --- a/WEB-INF/src/controleurs/NewThread.java +++ b/WEB-INF/src/controleurs/NewThread.java @@ -60,7 +60,8 @@ public class NewThread extends HttpServlet { out.println("<title>New thread</title>"); out.println("<div class=\"write\">"); - out.println("<h3>Create a new thread</h3>"); + out.println("<h1>Create a new thread</h1>"); + out.println(PageGeneration.generateNavMenu()); out.println("<form action=\"http://localhost:8080/s4a021-web-backend/NewThread\" method=\"post\">"); out.println("<input name=\"threadname\" type=\"text\" placeholder=\"Name of new thread\">"); out.println("<textarea name=\"first_message\" type=\"text\" rows=\"2\" cols=\"30\" placeholder=\"Post the first message of your new thread!\"></textarea>"); diff --git a/create.html b/create.html index 3223a90236a244f0dcde6575df99df4b53411724..fe770024611b9b1971a3e70d9e2534e2420662c1 100644 --- a/create.html +++ b/create.html @@ -7,12 +7,14 @@ </head> <body> <div class="form"> - <h1>REGISTER</h1> - <form action="http://localhost:8080/s4a021-web-backend/SignUp" method="post"> - <input name="login" type="text" placeholder="username"> - <input name="pwd" type="password" placeholder="password"> - <button type="submit">Create my Account !</button> - </form> + <section> + <h1>REGISTER</h1> + <form action="http://localhost:8080/s4a021-web-backend/SignUp" method="post"> + <input name="login" type="text" placeholder="username"> + <input name="pwd" type="password" placeholder="password"> + <button type="submit">Create my Account !</button> + </form> + </section> </div> </body> </html> \ No newline at end of file diff --git a/css/account.css b/css/account.css index b06fd30084c8e4ad5dbb08b2253b0a303bfd2469..7e7ed35fd0192e757bf32a0ba9c6a025422268ea 100644 --- a/css/account.css +++ b/css/account.css @@ -2,4 +2,15 @@ background-color : red; border-color : red; color : white; +} + +.account_section{ + background-color : #333333; + border-radius : 15px; + margin-right : auto; + margin-left : auto; + padding : 1%; + width : 50%; + margin-top : 5%; + text-align : center; } \ No newline at end of file diff --git a/css/form.css b/css/form.css index c597176ffba8995cccaa90f180d76c970ebc801b..3d03def1ec666a7a4bd72d93d3807d27174fa80e 100644 --- a/css/form.css +++ b/css/form.css @@ -7,7 +7,7 @@ body{ background-color: #232323; } -body{ +section{ display: flex; align-items: center; justify-content: center; diff --git a/index.html b/index.html index f034766a0cba274e47e7965707440244c71585a9..77e3d557ab12a618c8d09f02fb11f062d94e395f 100644 --- a/index.html +++ b/index.html @@ -10,13 +10,15 @@ </head> <body> <div class="form"> - <h1>LOGIN</h1> - <form action="http://localhost:8080/s4a021-web-backend/LogIn" method="post"> - <input name="login" type="text" placeholder="username"> - <input name="pwd" type="password" placeholder="password"> - <button type="submit">Let's go !</button> - <p><i>New user ? Click <a href="./create.html">here</a> to create an account</i></p> - </form> + <section> + <h1>LOGIN</h1> + <form action="http://localhost:8080/s4a021-web-backend/LogIn" method="post"> + <input name="login" type="text" placeholder="username"> + <input name="pwd" type="password" placeholder="password"> + <button type="submit">Let's go !</button> + <p><i>New user ? Click <a href="./create.html">here</a> to create an account</i></p> + </form> + </section> </div> </body> </html> \ No newline at end of file