some improvements

This commit is contained in:
derlole
2025-05-09 18:36:01 +00:00
parent 83e6ff3958
commit 41b276c734
16 changed files with 283 additions and 42 deletions

23
templates/beans.html Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="icon" href="{{ url_for('static', filename='gimmiCoffee_Logo.png') }}" type="image/png">
</head>
<body>
<div class="container">
<h1>Bohnenstatus</h1>
<div class="status">
<p><strong>Zuletzt gefüllt:</strong> {{ last_filled }}</p><!-- refactor the variable names-->
<p><strong>Aktueller Füllstand:</strong> {{ current_level }}%</p><!-- refactor the variable names-->
<p><strong>Kaffees seit letzter Füllung:</strong> {{ coffees_made }}</p><!-- refactor the variable names-->
<p><strong>Gesamtanzahl der Füllungen:</strong> {{ total_refills }}</p><!-- refactor the variable names-->
</div>
</div>
<button class="homeBut" onclick="window.location.href = '/unsecure'">Get Me Home</button>
</body>
</html>

34
templates/coffees.html Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="icon" href="{{ url_for('static', filename='gimmiCoffee_Logo.png') }}" type="image/png">
</head>
<body>
<h1>Coffee History</h1>
<button class="homeBut" onclick="window.location.href = '/unsecure'">get me home</button>
<table>
<thead>
<tr>
<th>User</th>
<th>Status</th>
<th>Timestamp</th>
</tr>
</thead>
<tbody>
{% for coffee in coffees %}
<tr>
<td>{{ coffee.user }}</td>
<td>{{ coffee.status }}</td>
<td>{{ coffee.tstamp }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<script src="{{ url_for('static', filename='coffeesmade.js') }}"></script>
</body>
</html>

View File

@@ -52,20 +52,19 @@
<div class="top-left-text">Maschine</div>
<div class="center-number" id="machine-status">AUS</div>
</div>
<div class="grid-button deniePress initBackRed" id="machine-ready-butt">
<div class="top-left-text">Maschine</div>
<div class="center-number" id="machiene-ready-text">Nicht Bereit</div>
</div>
<div class="grid-button deniePress" id="machine-error-butt">
<div class="top-left-text">Fehler</div>
<div class="center-number" id="machiene-error-text">Keiner</div>
</div>
<div class="grid-button defaultGray">
<div class="grid-button deniePress initBackRed" id="machine-ready-butt">
<div class="top-left-text">Maschine</div>
<div class="center-number" id="machiene-ready-text">Nicht Bereit</div>
</div>
<div class="grid-button defaultGray" onclick="waterRefill()">
<div class="top-left-text">Wasser</div>
<div class="center-number">Nachgefüllt?</div>
</div>
<div class="grid-button defaultGray">
<div class="grid-button defaultGray" onclick="beansRefill()">
<div class="top-left-text">Bohnen</div>
<div class="center-number">Nachgefüllt?</div>
</div>
@@ -74,15 +73,15 @@
<section class="right stats-box">
<h2 class="stats-title">Statistiken</h2>
<div class="clickable">
<div class="clickable" onclick="showCoffeeHistory()">
<div class="top-left-text">Coffee made</div>
<div class="center-number">XXX</div>
<div class="center-number">{{ coffee_count }}</div>
</div>
<div class="clickable">
<div class="clickable" onclick=" window.location.href = '/unsecure/beans'">
<div class="top-left-text">Bohnen Füllstand</div>
<div class="center-number" id="beans-fill">XX%</div>
</div>
<div class="clickable">
<div class="clickable" onclick=" window.location.href = '/unsecure/water'">
<div class="top-left-text">Wasser Füllstand</div>
<div class="center-number" id="water-fill">XX%</div>
</div>
@@ -101,10 +100,4 @@
<script src="{{ url_for('static', filename='script.js') }}"></script>
<script src="{{ url_for('static', filename='socketio.js') }}"></script>
</body>
</html>
</html>

23
templates/water.html Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="icon" href="{{ url_for('static', filename='gimmiCoffee_Logo.png') }}" type="image/png">
</head>
<body>
<div class="container">
<h1>Wasserstatus</h1>
<div class="status">
<p><strong>Zuletzt gefüllt:</strong> {{ last_filled }}</p><!-- refactor the variable names-->
<p><strong>Aktueller Füllstand:</strong> {{ current_level }}%</p><!-- refactor the variable names-->
<p><strong>Kaffees seit letzter Füllung:</strong> {{ coffees_made }}</p><!-- refactor the variable names-->
<p><strong>Gesamtanzahl der Füllungen:</strong> {{ total_refills }}</p><!-- refactor the variable names-->
</div>
</div>
<button class="homeBut" onclick="window.location.href = '/unsecure'">Get Me Home</button>
</body>
</html>