Add footer, correct error page template
This commit is contained in:
		
							parent
							
								
									343d7a68ba
								
							
						
					
					
						commit
						ed9bac4d4e
					
				
					 9 changed files with 187 additions and 140 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -1 +1,2 @@ | ||||||
| postgres/docker-compose.yml | postgres/docker-compose.yml | ||||||
|  | target/ | ||||||
|  |  | ||||||
|  | @ -4,13 +4,20 @@ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| body { | body { | ||||||
| 	margin-top: 0; |  | ||||||
| 	margin-bottom: 0; |  | ||||||
| 	margin-right: 0; |  | ||||||
| 	margin-left: 0; |  | ||||||
| 	font-family: Terminus; | 	font-family: Terminus; | ||||||
| 	background-color: #212121; | 	background-color: #212121; | ||||||
| 	color: #cfcfcf; | 	color: #cfcfcf; | ||||||
|  | 	margin: 0; | ||||||
|  | 	padding: 0; | ||||||
|  | 	height: 100vh; | ||||||
|  | 	display: flex; | ||||||
|  | 	flex-direction: column; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .page{ | ||||||
|  | 	flex: 1 0 auto; | ||||||
|  | 	padding: 0 0 0; | ||||||
|  | 	width: 100%; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .validationError { | .validationError { | ||||||
|  | @ -179,3 +186,46 @@ button:hover { | ||||||
| 	margin-right: auto; | 	margin-right: auto; | ||||||
| 	width: 25em; | 	width: 25em; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | /* footer */ | ||||||
|  | .footer{ | ||||||
|  | 	background: #323833; | ||||||
|  | 	color: #a7a691; | ||||||
|  | 	margin-top: 20px; | ||||||
|  | 	width: 100%; | ||||||
|  | } | ||||||
|  | .inner_footer{ | ||||||
|  | 	padding: 10px; | ||||||
|  | 	display: block; | ||||||
|  | 	float: right; | ||||||
|  | } | ||||||
|  | .copy_link{ | ||||||
|  | 	font-family: sans-serif; | ||||||
|  | 	text-shadow: -1px -1px 0 #1e1e1e, 1px -1px 0 #1e1e1e, -1px 1px 0 #1e1e1e, 1px 1px 0 #1e1e1e; | ||||||
|  | 	color: #74bfbd; | ||||||
|  | } | ||||||
|  | .copy_link:hover { | ||||||
|  | 	color: #b6a795; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* error */ | ||||||
|  | .error { | ||||||
|  | 	text-align: center; | ||||||
|  | 	background: #283338; | ||||||
|  | 	padding: 20px; | ||||||
|  | 	box-shadow: 0 0 8px -3px #37474e; | ||||||
|  | 	border-radius: 3px; | ||||||
|  | 	margin: auto; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .bli { | ||||||
|  | 	padding: 3px; | ||||||
|  | 	background-color: #D00000; | ||||||
|  | 	animation: blinker 2.5s ease infinite; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @keyframes blinker { | ||||||
|  | 	50% { | ||||||
|  | 		opacity: 0.0; | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | @ -3,50 +3,19 @@ | ||||||
| 
 | 
 | ||||||
| <head> | <head> | ||||||
|     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||||||
|     <style type=text/css> |     <link rel="icon" type="image/x-icon" href="/favicon.ico"> | ||||||
|         html { |     <link rel="stylesheet" th:href="@{/styles/styles.css}" /> | ||||||
|             height: 100%; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         body { |  | ||||||
|             width: 100%; |  | ||||||
|             height: 100%; |  | ||||||
|             margin: 0; |  | ||||||
|             padding: 0; |  | ||||||
|             display: flex; |  | ||||||
|             flex-direction: column; |  | ||||||
|             align-items: center; |  | ||||||
|             justify-content: center; |  | ||||||
|             background-color: #212121; |  | ||||||
|             color: #cfcfcf; |  | ||||||
|             font-family: Terminus; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         .error { |  | ||||||
|             border-width: 3px; |  | ||||||
|             border-style: double; |  | ||||||
|             padding: 8px; |  | ||||||
|             margin: auto; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         .bli { |  | ||||||
|             padding: 3px; |  | ||||||
|             background-color: #D00000; |  | ||||||
|             animation: blinker 2.5s ease infinite; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         @keyframes blinker { |  | ||||||
|             50% { |  | ||||||
|                 opacity: 0.0; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     </style> |  | ||||||
|     <title th:text="${code}">title</title> |     <title th:text="${code}">title</title> | ||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|     <div class='error'> |     <div class='error'> | ||||||
|         ОШИБКА: <span class='bli' th:text="${code}"></span> |         <a href="/"> | ||||||
|  |             <img height="65px" th:src="@{/images/s_logo.svg}" alt="Marinesco"> | ||||||
|  |         </a> | ||||||
|  |         <p> | ||||||
|  |             ОШИБКА <span class='bli' th:text="${code}"></span> | ||||||
|  |         </p> | ||||||
|     </div> |     </div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,10 +1,19 @@ | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
|   <head> | 
 | ||||||
|   </head> | <head> | ||||||
|   <body> | </head> | ||||||
|     <div th:fragment="footer"> | 
 | ||||||
|         <a href="https://redrise.ru">© 2023 Dmitry Isaenko</a> | <body> | ||||||
|  |   <div class="footer" th:fragment="footer"> | ||||||
|  |     <div class="container"> | ||||||
|  |       <footer class="inner_footer"> | ||||||
|  |         <a class="entry" href="https://redrise.ru"> | ||||||
|  |           <div class="copy_link">© 2023 Dmitry Isaenko</div> | ||||||
|  |         </a> | ||||||
|  |       </footer> | ||||||
|     </div> |     </div> | ||||||
|   </body> |   </div> | ||||||
|  | </body> | ||||||
|  | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -9,6 +9,7 @@ | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|   <div th:replace="~{fragments/header :: 'header'}"></div> |   <div th:replace="~{fragments/header :: 'header'}"></div> | ||||||
|  |   <div class="page"> | ||||||
|     <div class="center"> |     <div class="center"> | ||||||
|       <div class="container base"> |       <div class="container base"> | ||||||
|         <h1>Log in</h1> |         <h1>Log in</h1> | ||||||
|  | @ -18,7 +19,8 @@ | ||||||
|             password.</span> |             password.</span> | ||||||
|           <p> |           <p> | ||||||
|             <label for="username" class="sr-only">Username</label> |             <label for="username" class="sr-only">Username</label> | ||||||
|           <input type="text" id="username" name="login" class="form-control" placeholder="Username" required autofocus> |             <input type="text" id="username" name="login" class="form-control" placeholder="Username" required | ||||||
|  |               autofocus> | ||||||
|           </p> |           </p> | ||||||
|           <p> |           <p> | ||||||
|             <label for="password" class="sr-only">Password</label> |             <label for="password" class="sr-only">Password</label> | ||||||
|  | @ -28,6 +30,8 @@ | ||||||
|         </form> |         </form> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|  |   </div> | ||||||
|  |   <div th:replace="~{fragments/footer :: 'footer'}"></div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|  |     <div class="page"> | ||||||
|         <div th:replace="~{fragments/header :: 'header'}"></div> |         <div th:replace="~{fragments/header :: 'header'}"></div> | ||||||
|         <div class="container base"> |         <div class="container base"> | ||||||
|             <h1 th:text="${header_text}"></h1> |             <h1 th:text="${header_text}"></h1> | ||||||
|  | @ -30,6 +31,8 @@ | ||||||
|                 <br /> |                 <br /> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  |     </div> | ||||||
|  |     <div th:replace="~{fragments/footer :: 'footer'}"></div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -9,18 +9,21 @@ | ||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|  |     <div class="page"> | ||||||
|         <div th:replace="~{fragments/header :: 'header'}"></div> |         <div th:replace="~{fragments/header :: 'header'}"></div> | ||||||
|         <div class="container base"> |         <div class="container base"> | ||||||
|             <h1>Register</h1> |             <h1>Register</h1> | ||||||
|             <form class="regForm" method="POST" th:action="@{/register}" th:object="${registrationForm}"> |             <form class="regForm" method="POST" th:action="@{/register}" th:object="${registrationForm}"> | ||||||
| 
 | 
 | ||||||
|             <span class="validationError" th:if="${#fields.hasErrors('username')}" th:errors="*{username}">Error</span> |                 <span class="validationError" th:if="${#fields.hasErrors('username')}" | ||||||
|  |                     th:errors="*{username}">Error</span> | ||||||
|                 <br /> |                 <br /> | ||||||
|                 <label for="username">Username: </label> |                 <label for="username">Username: </label> | ||||||
|                 <br /> |                 <br /> | ||||||
|                 <input type="text" name="username" id="username" size="50%" /><br /> |                 <input type="text" name="username" id="username" size="50%" /><br /> | ||||||
| 
 | 
 | ||||||
|             <span class="validationError" th:if="${#fields.hasErrors('password')}" th:errors="*{password}">Error</span> |                 <span class="validationError" th:if="${#fields.hasErrors('password')}" | ||||||
|  |                     th:errors="*{password}">Error</span> | ||||||
|                 <br /> |                 <br /> | ||||||
|                 <label for="password">Password: </label> |                 <label for="password">Password: </label> | ||||||
|                 <br /> |                 <br /> | ||||||
|  | @ -44,6 +47,8 @@ | ||||||
|                 </p> |                 </p> | ||||||
|             </form> |             </form> | ||||||
|         </div> |         </div> | ||||||
|  |     </div> | ||||||
|  |     <div th:replace="~{fragments/footer :: 'footer'}"></div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|  |     <div class="page"> | ||||||
|         <div th:replace="~{fragments/header :: 'header'}"></div> |         <div th:replace="~{fragments/header :: 'header'}"></div> | ||||||
|         <div class="container base"> |         <div class="container base"> | ||||||
|             <img th:src="@{/images/logo.svg}" /> |             <img th:src="@{/images/logo.svg}" /> | ||||||
|  | @ -16,6 +17,8 @@ | ||||||
|             <br /><a href="/manage_users">/manage_users</a> |             <br /><a href="/manage_users">/manage_users</a> | ||||||
|             <br /><a href="/h2">H2</a> |             <br /><a href="/h2">H2</a> | ||||||
|         </div> |         </div> | ||||||
|  |     </div> | ||||||
|  |     <div th:replace="~{fragments/footer :: 'footer'}"></div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| </head> | </head> | ||||||
| 
 | 
 | ||||||
| <body> | <body> | ||||||
|  |     <div class="page"> | ||||||
|         <div th:replace="~{fragments/header :: 'header'}"></div> |         <div th:replace="~{fragments/header :: 'header'}"></div> | ||||||
|         <div class="container base"> |         <div class="container base"> | ||||||
|             <h1 th:text="${header_text}">welcome</h1> |             <h1 th:text="${header_text}">welcome</h1> | ||||||
|  | @ -30,6 +31,8 @@ | ||||||
|                 <button class="sign" type="submit">Save Changes</button> |                 <button class="sign" type="submit">Save Changes</button> | ||||||
|             </form> |             </form> | ||||||
|         </div> |         </div> | ||||||
|  |     </div> | ||||||
|  |     <div th:replace="~{fragments/footer :: 'footer'}"></div> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
		Loading…
	
		Reference in a new issue
	
	 Dmitry Isaenko
						Dmitry Isaenko