11<!DOCTYPE html>
2- < html xmlns ="http://www.w3.org/1999/xhtml "
3- xmlns:th ="http://www.thymeleaf.org ">
2+ < html lang ="en " xmlns:th ="http://www.thymeleaf.org ">
43< head >
4+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css " integrity ="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T " crossorigin ="anonymous ">
5+ < meta charset ="UTF-8 ">
6+ < title > Authorization</ title >
7+ < link rel ="icon " href ="../static/elephant.png ">
8+ < script >
9+ function redirect ( ) {
10+ location . href = "/registration" ;
11+ }
12+ </ script >
513</ head >
6- < body >
7- < div >
8- < form name ="f " th:action ="@{/perform-login} " method ="post ">
9- < fieldset >
10- < legend > Войдите</ legend >
11- < div th:if ="${param.error} " class ="alert alert-error ">
12- Неправильные имя и пароль.
14+ < body style ="background-color: #dfdfe9; ">
15+ < div class ="mt-5 pt-5 container-fluid ">
16+ < div class ="row justify-content-center ">
17+ < div class ="col-10 col-xl-5 ">
18+ < div style ="background-color: white; border-radius: 25px ">
19+ < img alt ="elephant? " src ="../static/elephant.png " class ="mx-auto d-block " width ="200px ">
20+ < p class ="text-center display-4 "> Authorization</ p >
21+
22+ < form action ="# " th:action ="@{/perform-login} " method ="post ">
23+
24+ < div class ="mx-5 px-5 form-group form-group-lg ">
25+ < label for ="username " class ="h4 "> Username</ label >
26+ < input type ="text " id ="username " name ="username " class ="form-control input-lg "/>
27+ </ div >
28+
29+ < div class ="mx-5 px-5 ">
30+ < label for ="password " class ="h4 "> Password</ label >
31+ < input type ="password " id ="password " name ="password " class ="form-control "/>
32+ </ div >
33+
34+ < div th:if ="${param.error} " class ="mx-5 px-5 " style ="color: red "> Wrong name or password!</ div >
35+ < div th:if ="${param.logout} " class ="mx-5 px-5 " style ="color: #5700f7 "> You have successfully logged out.</ div >
36+
37+
38+ < div class ="d-flex justify-content-center m-3 pb-3 ">
39+ < button type ="submit " class ="btn btn-primary btn-lg pb-3 mx-4 " style ="background-color: #5700f7 "> LogIn</ button >
40+ < button type ="button " onclick ="redirect() " class ="btn btn-primary btn-lg pb-3 mx-4 " style ="background-color: #5700f7 "> Registration</ button >
41+ </ div >
42+ </ form >
1343 </ div >
14- < div th:if ="${param.logout} " class ="alert alert-success ">
15- You have been logged out.
16- </ div >
17- < label for ="username "> Имя</ label >
18- < input type ="text " id ="username " name ="username "/>
19- < label for ="password "> Пароль</ label >
20- < input type ="password " id ="password " name ="password "/>
21- < div class ="form-actions ">
22- < button type ="submit " class ="btn "> Войти</ button >
23- </ div >
24- </ fieldset >
25- </ form >
44+ </ div >
45+ </ div >
2646</ div >
2747</ body >
2848</ html >
0 commit comments