mirror of
				https://github.com/StefBuwalda/ProjectIOT.git
				synced 2025-10-30 19:29:57 +00:00 
			
		
		
		
	changed files on the frontend
This commit is contained in:
		| @@ -1,68 +1,18 @@ | ||||
| {%extends 'base.html' %} | ||||
| {% block content %} | ||||
|                 <div class="row"> | ||||
|                     <div class="col-md-4"> | ||||
|                         <div class="card mb-4"> | ||||
|                             <div class="card-body"> | ||||
|                                 <h5>Gate Control Dashboard</h5> | ||||
|                                 <form method="POST"> | ||||
|                                     {{ form.hidden_tag() }} | ||||
|                                     <div class="d-grid gap-2 mb-3"> | ||||
|                                         {{ form.open_gate(class="btn btn-dark") }}  | ||||
|                                     </div> | ||||
|                                     <div class="d-grid gap-2 mb-3"> | ||||
|                                         {{ form.close_gate(class="btn btn-dark") }} | ||||
|                                     </div> | ||||
|                                     <div class="d-grid gap-2 mb-3"> | ||||
|                                         {{ form.check_camera(class="btn btn-dark") }} | ||||
|                                     </div> | ||||
|                                     <div class="mb-3"> | ||||
|                                         {{ form.debug_mode() }}  | ||||
|                                         <label for="{{ form.debug_mode.id }}">Enable Debug Mode</label> | ||||
|                                     </div> | ||||
|                                     <div class="d-grid"> | ||||
|                                         <button type="submit" class="btn btn-dark">Submit</button> | ||||
|                                     </div> | ||||
|                                 </form> | ||||
|                                 <h6>Gate Status: {{ gate_status }}</h6> | ||||
|                                 <h6>Camera Status: {{ camera_status }}</h6> | ||||
|                                 {% if debug_mode %} | ||||
|                                     <h7>Debug Mode is Enabled</h7> | ||||
|                                 {% endif %} | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                     <div class="col-md-4"> | ||||
|                         <div class="card mb-4"> | ||||
|                             <div class="card-body"> | ||||
|                                 <h5 class="card-title">System Logs</h5> | ||||
|                                 <div class="log-container" style="max-height: 250px; overflow-y: auto;"> | ||||
|                                     <table class="table table-sm table-hover"> | ||||
|                                         <thead> | ||||
|                                             <tr> | ||||
|                                                 <th scope="col">Time</th> | ||||
|                                                 <th scope="col">Action</th> | ||||
|                                                 <th scope="col">Status</th> | ||||
|                                             </tr> | ||||
|                                         </thead> | ||||
|                                         <tbody> | ||||
|                                             {% for log in recent_logs %} | ||||
|                                             <tr> | ||||
|                                                 <td><small>{{ log.timestamp.strftime('%H:%M:%S') }}</small></td> | ||||
|                                                 <td><small>{{ log.action }}</small></td> | ||||
|                                                 <td> | ||||
|                                                     <span class="badge {% if log.status == 'success' %}bg-success{% elif log.status == 'warning' %}bg-warning{% elif log.status == 'error' %}bg-danger{% else %}bg-secondary{% endif %}"> | ||||
|                                                         {{ log.status }} | ||||
|                                                     </span> | ||||
|                                                 </td> | ||||
|                                             </tr> | ||||
|                                             {% endfor %} | ||||
|                                         </tbody> | ||||
|                                     </table> | ||||
|                                 </div> | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                      | ||||
| </html> | ||||
| {% endblock %} | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <title>Document</title> | ||||
| </head> | ||||
| <body> | ||||
|     <h1>Bedankt voor de moeite. <br>Dit zijn de ingevulde gegevens:</h1> | ||||
| <ul> | ||||
|     <li>Naam: {{ session['naam'] }}</li> | ||||
|     <li>Geslacht: {{ session['geslacht'] }}</li> | ||||
|     <li>Instrument: {{ session['instrument'] }}</li> | ||||
|     <li>Plaats: {{ session['plaats'] }}</li> | ||||
|     <li>Feedback: {{ session['feedback'] }}</li> | ||||
| </ul> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										75
									
								
								AT_frontend/templates/login.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								AT_frontend/templates/login.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,75 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous"> | ||||
|     <title>Login</title> | ||||
|     <style> | ||||
|         .rounded-input { | ||||
|             border-radius: 20px;  | ||||
|         } | ||||
|  | ||||
|         .split-background { | ||||
|             position: fixed; | ||||
|             top: 0; | ||||
|             left: 0; | ||||
|             width: 100%; | ||||
|             height: 50vh; | ||||
|             background-color: #424D66; | ||||
|             z-index: -1; | ||||
|         } | ||||
|         @keyframes moveLeftRight { | ||||
|             0% { | ||||
|                 transform: translateX(0);  | ||||
|             } | ||||
|             100% { | ||||
|                 transform: translateX(1366px);  | ||||
|             } | ||||
|         } | ||||
|         .logo { | ||||
|             margin-top: 70px; | ||||
|             width: 770px;  | ||||
|             height: auto; | ||||
|         } | ||||
|         .car-image-container { | ||||
|             position: fixed; | ||||
|             bottom: 33px; | ||||
|         } | ||||
|         .animate { | ||||
|             animation: moveLeftRight 15s infinite alternate; | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <div class="split-background"> | ||||
|     <div class="container-fluid text-center"> | ||||
|         <img src="../static/images/logo-light.png" alt="Logo" class="logo" class="img-fluid mt-5"> | ||||
|             </div> | ||||
|                 </div> | ||||
|                     <div class="container d-flex justify-content-center align-items-center" style="min-height: 100vh;"> | ||||
|                         <div class="col-md-6 col-lg-4"> | ||||
|                             <form method="POST" class="p-5 border rounded-input shadow-sm bg-white bg-opacity-75"> | ||||
|                                 <div class=" p-4 border rounded-input shadow-sm bg-white"> | ||||
|                                     <label for="username" class="form-label text-center w-100">Username</label> | ||||
|                                             <input type="text" class="form-control rounded-input" id="username" name="username" required> | ||||
|                                                 <label for="password" class="form-label text-center w-100">Password</label> | ||||
|                                                     <input type="password" class="form-control rounded-input" id="password" name="password" required> | ||||
|                                                 <br> | ||||
|                                             <div class="d-grid"> | ||||
|                                         <button type="submit" class="btn btn-dark rounded-input px-4 mx-auto w-50">Sign in</button> | ||||
|                                         </div> | ||||
|                                     </div> | ||||
|                                 </form> | ||||
|                             </div> | ||||
|                         </div> | ||||
|                         <div class="car-image-container"> | ||||
|                         <img src="../static/images/car.png" alt="Moving Image" class="animate"> | ||||
|                         </div> | ||||
|                     <footer class="py-3 bg-dark text-white fixed-bottom""> | ||||
|                 <div class="container text-center"> | ||||
|             <span class="text-muted"> </span> | ||||
|         </div> | ||||
|     </footer> | ||||
| </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user
	 Anh-Thy04
					Anh-Thy04