initial commit
This commit is contained in:
5
templates/index.html
Normal file
5
templates/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<a href='{{ url_for('getPitStops') }}'>Pitstop List</a>
|
||||
<a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a>
|
||||
{% endblock %}
|
||||
12
templates/layout.html
Normal file
12
templates/layout.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Rollerverbrauch</title>
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rollerverbrauch</h1>
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
19
templates/newPitStopForm.html
Normal file
19
templates/newPitStopForm.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if data.error %}
|
||||
<div>
|
||||
<p class='error'><strong>Error:</strong> {{ data.error }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="{{ url_for('createPitStop') }}" method='post'>
|
||||
<label for='date'>Date of Pitstop</label>
|
||||
<input type='date' name='date' id='date' value='{{ data.last.date }}'/>
|
||||
<br />
|
||||
<label for='odometer'>Odometer</label>
|
||||
<input type='text' name='odometer' id='odometer' value='{{ data.last.odometer }}'/>
|
||||
<label for='litres'>Litres fuelled</label>
|
||||
<input type='text' name='litres' id='litres' value='{{ data.last.litres }}'/>
|
||||
<input type='submit' value='Log pit stop'>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
44
templates/pitstops.html
Normal file
44
templates/pitstops.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Date
|
||||
</th>
|
||||
<th>
|
||||
Odometer
|
||||
</th>
|
||||
<th>
|
||||
Distance
|
||||
</th>
|
||||
<th>
|
||||
Litres
|
||||
</th>
|
||||
<th>
|
||||
Average
|
||||
</th>
|
||||
</tr>
|
||||
{% for pitstop in data['pitstops'] %}
|
||||
<tr>
|
||||
<td>
|
||||
{{pitstop.date}}
|
||||
</td>
|
||||
<td class='right-aligned'>
|
||||
{{pitstop.odometer}} km
|
||||
</td>
|
||||
<td class='right-aligned'>
|
||||
{% if pitstop.distance %}{{pitstop.distance}}{% else %} --{% endif %} km
|
||||
</td>
|
||||
<td class='right-aligned'>
|
||||
{{pitstop.litres}} l
|
||||
</td>
|
||||
<td class='right-aligned'>
|
||||
{% if pitstop.average %}{{pitstop.average}}{% else %} --{% endif %} l/100km
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user