init
This commit is contained in:
commit
ce1095bb24
27 changed files with 621 additions and 0 deletions
37
app/templates/admin.html
Normal file
37
app/templates/admin.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Admin</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/admin.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Admin-Einstellungen</h2>
|
||||
<form id="adminForm">
|
||||
<label>
|
||||
Startlichtschranke GPIO:
|
||||
<input type="number" name="start_pin" value="17">
|
||||
</label><br>
|
||||
<label>
|
||||
Zielllichtschranke GPIO:
|
||||
<input type="number" name="ziel_pin" value="27">
|
||||
</label><br>
|
||||
<label>
|
||||
Schutzzeit (Sekunden):
|
||||
<input type="number" name="schutzzeit" value="3">
|
||||
</label><br>
|
||||
<label>
|
||||
Ziellichtschranke aktiv:
|
||||
<input type="checkbox" name="ziel_aktiviert" checked>
|
||||
</label><br><br>
|
||||
<button type="submit" class="green">Speichern</button>
|
||||
</form>
|
||||
<hr>
|
||||
<h3>Systemsteuerung</h3>
|
||||
<button onclick="systemCommand('restart')">Dienst neustarten</button>
|
||||
<button onclick="systemCommand('reboot')">Neu starten</button>
|
||||
<button onclick="systemCommand('shutdown')">Herunterfahren</button>
|
||||
<button onclick="fetchLogs()">Live-Logs anzeigen</button>
|
||||
<pre id="logs"></pre>
|
||||
</body>
|
||||
</html>
|
||||
18
app/templates/countdown.html
Normal file
18
app/templates/countdown.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Countdown</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
||||
</head>
|
||||
<body class="countdown">
|
||||
<div class="ampel-overlay">
|
||||
<div class="licht rot" id="licht1"></div>
|
||||
<div class="licht rot" id="licht2"></div>
|
||||
<div class="licht rot" id="licht3"></div>
|
||||
</div>
|
||||
<script>
|
||||
startCountdown();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
20
app/templates/ergebnis.html
Normal file
20
app/templates/ergebnis.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ergebnis</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h1>🏁 Ergebnis</h1>
|
||||
<div class="ergebnis">
|
||||
{% for e in ergebnisse %}
|
||||
<div class="fahrerbox" style="background-color: {{ e.farbe }}">
|
||||
<h3>#{{ e.nummer }} - {{ e.name }}</h3>
|
||||
<p>Beste Zeit: {{ e.beste }} s</p>
|
||||
<p>Durchschnitt: {{ e.durchschnitt }} s</p>
|
||||
<p>Gesamtzeit: {{ e.gesamt }} s</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
27
app/templates/fahrerverwaltung.html
Normal file
27
app/templates/fahrerverwaltung.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Fahrerverwaltung</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/fahrer.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fahrer verwalten</h2>
|
||||
<form id="fahrerForm">
|
||||
<div id="fahrerListe">
|
||||
{% for f in fahrer %}
|
||||
<div class="fahrer-eintrag">
|
||||
<label>Fahrer {{ loop.index }}:
|
||||
<input type="text" name="name" value="{{ f.name }}">
|
||||
<input type="number" name="nummer" value="{{ f.nummer }}">
|
||||
<input type="color" name="farbe" value="{{ f.farbe }}">
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="button" onclick="addFahrer()">+ Fahrer hinzufügen</button>
|
||||
<button type="submit" class="green">Speichern</button>
|
||||
</form>
|
||||
<a href="{{ url_for('main.index') }}">Zurück</a>
|
||||
</body>
|
||||
</html>
|
||||
15
app/templates/index.html
Normal file
15
app/templates/index.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Rennstoppuhr</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rennstoppuhr</h1>
|
||||
<div class="menu">
|
||||
<a href="{{ url_for('main.rennen_starten') }}">🏁 Rennen starten</a>
|
||||
<a href="{{ url_for('main.fahrerverwaltung') }}">👤 Fahrerverwaltung</a>
|
||||
<a href="{{ url_for('main.admin') }}">⚙️ Einstellungen (Admin)</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
29
app/templates/rennbildschirm.html
Normal file
29
app/templates/rennbildschirm.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Rennbildschirm</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="kleine-ampel"></div>
|
||||
<div class="zeitinfo">
|
||||
<h3>Aktuelle Runde: <span id="aktuell">--.--</span></h3>
|
||||
<p>Beste Runde: <span id="beste">--.--</span></p>
|
||||
<p>Durchschnitt: <span id="schnitt">--.--</span></p>
|
||||
</div>
|
||||
<div class="rundenstand">
|
||||
Runde <span id="runde">1</span> / <span id="gesamt">3</span>
|
||||
</div>
|
||||
<div class="fahrer">
|
||||
{% for f in fahrer %}
|
||||
<div class="fahrerbox" style="background-color: {{ f.farbe }}">
|
||||
#{{ f.nummer }} - {{ f.name }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="aktionen">
|
||||
<button class="gelb">Safety</button>
|
||||
<button class="rot">Unterbrechen</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
17
app/templates/rennen_starten.html
Normal file
17
app/templates/rennen_starten.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Rennen starten</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h2>Rennen starten</h2>
|
||||
<form method="POST" action="{{ url_for('main.countdown_starten') }}">
|
||||
<label>Anzahl Runden:
|
||||
<input type="number" name="runden" min="1" value="1">
|
||||
</label>
|
||||
<button type="submit" class="green">Countdown starten</button>
|
||||
</form>
|
||||
<p><a href="{{ url_for('main.fahrerverwaltung') }}">Zur Fahrerverwaltung</a></p>
|
||||
</body>
|
||||
</html>
|
||||
25
app/templates/zeit_zuordnen.html
Normal file
25
app/templates/zeit_zuordnen.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Zeit zuordnen</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<script src="{{ url_for('static', filename='js/zuordnen.js') }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Zeit zuordnen</h2>
|
||||
<form id="zuordnungForm">
|
||||
{% for z in zeiten %}
|
||||
<div class="zuordnung">
|
||||
<span>{{ z.zeit }}</span>
|
||||
<select name="fahrer">
|
||||
<option value="">-- Fahrer wählen --</option>
|
||||
{% for f in fahrer %}
|
||||
<option value="{{ f.nummer }}">#{{ f.nummer }} - {{ f.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button type="submit" class="green">Speichern</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in a new issue