dashboard + base html created

This commit is contained in:
Anh-Thy04
2025-05-06 18:01:21 +02:00
parent 7717ac3b7a
commit 7f8dec3cb3
6 changed files with 81 additions and 20 deletions

View File

@@ -1,18 +1,36 @@
<!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>
{%extends 'base.html' %}
{% block content %}
<div class="col-md-12">
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title fs-4">Numberplate 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" class="fs-5">Time</th>
<th scope="col" class="fs-5">Numberplate</th>
<th scope="col" class="fs-5">Gate Status</th>
</tr>
</thead>
<tbody>
{% for log in recent_logs %}
<tr>
<td><small class="fs-6">{{ log.timestamp.strftime('%H:%M:%S') }}</small></td>
<td><small class="fs-6">{{ 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 %} fs-6">
{{ log.status }}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}