dockerized it
This commit is contained in:
5
app/templates/index.html
Normal file
5
app/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 %}
|
||||
61
app/templates/layout.html
Normal file
61
app/templates/layout.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!doctype html>
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Rollerverbrauch</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- <link rel="apple-touch-icon" href="{{ url_for('static', filename='apple-touch-icon.png') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='normalize.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
|
||||
|
||||
<script src="{{ url_for('static', filename='modernizr-2.8.3-respond-1.4.2.min.js') }}"></script> -->
|
||||
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
|
||||
|
||||
<!-- Optional theme -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ url_for('getPitStops') }}">Rollerverbrauch</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% block navigation %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="starter-template">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
56
app/templates/newPitStopForm.html
Normal file
56
app/templates/newPitStopForm.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block navigation %}
|
||||
<li><a href='{{ url_for('getPitStops') }}'>Home</a></li>
|
||||
<li><a href='{{ url_for('createPitStopForm') }}' class="active">Create Pitstop</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if data.error %}
|
||||
<div>
|
||||
<p class='error'><strong>Error:</strong> {{ data.error }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form class="form-horizontal" id='createPitStop' action="{{ url_for('createPitStop') }}" method='post'>
|
||||
<fieldset>
|
||||
|
||||
<!-- Form Name -->
|
||||
<legend>Create Pitstop</legend>
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="date">Date of Pitstop</label>
|
||||
<div class="controls">
|
||||
<input id="date" name="date" placeholder="" class="input-large" required="" type="date" value='{{ data.last.date }}' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="odometer">Odometer</label>
|
||||
<div class="controls">
|
||||
<input id="odometer" name="odometer" placeholder="" class="input-large" required="" type="text" value='{{ data.last.odometer }}' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="litres">Litres</label>
|
||||
<div class="controls">
|
||||
<input id="litres" name="litres" placeholder="" class="input-large" required="" type="text" value='{{ data.last.litres }}' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button (Double) -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="buttonLogId"></label>
|
||||
<div class="controls">
|
||||
<button id="buttonLogId" name="buttonLogId" class="btn btn-success" onclick="document.getElementById('createPitStop').submit();">Log Pitstop</button>
|
||||
<button id="buttonAbortId" type="button" name="buttonAbortId" class="btn btn-warning" onclick="window.location.href='{{ url_for('getPitStops') }}'">Abort</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
53
app/templates/pitstops.html
Normal file
53
app/templates/pitstops.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block navigation %}
|
||||
<li><a href='{{ url_for('getPitStops') }}' class="active">Home</a></li>
|
||||
<li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Date
|
||||
</th>
|
||||
<th>
|
||||
Day
|
||||
</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>
|
||||
{% if pitstop.days %}{{pitstop.days}}{% else %} --{% endif %} days
|
||||
</td>
|
||||
<td>
|
||||
{{pitstop.odometer}} km
|
||||
</td>
|
||||
<td>
|
||||
{% if pitstop.distance %}{{pitstop.distance}}{% else %} --{% endif %} km
|
||||
</td>
|
||||
<td>
|
||||
{{pitstop.litres}} l
|
||||
</td>
|
||||
<td>
|
||||
{% if pitstop.average %}{{pitstop.average}}{% else %} --{% endif %} l/100km
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user