initializr base version

This commit is contained in:
joachim lusiardi
2015-03-04 08:11:52 +01:00
parent af7ef156fd
commit 927abf425e
11 changed files with 611 additions and 69 deletions

View File

@@ -1,12 +1,54 @@
<!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>
<!--[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>
</head>
<body>
<div class="header-container">
<header class="wrapper clearfix">
<h1 class="title">Rollerverbrauch</h1>
<nav>
<ul>
{% block navigation %}
{% endblock %}
</ul>
</nav>
</header>
</div>
<div class="main-container">
<div class="main wrapper clearfix">
{% block body %}
{% endblock %}
</div> <!-- #main -->
</div> <!-- #main-container -->
<div class="footer-container">
<footer class="wrapper">
<h3>RollerVerbrauch ©2015 by Joachim Lusiardi</h3>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ url_for('static', filename='jquery-1.11.2.min.js') }}"><\/script>')</script>
<script src="{{ url_for('static', filename='main.js') }}"></script>
</body>
</html>

View File

@@ -1,19 +1,32 @@
{% extends "layout.html" %}
{% block navigation %}
{% endblock %}
{% 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 class="form" action="{{ url_for('createPitStop') }}" method='post'>
<ul>
<li>
<label for='date'>Date of Pitstop:</label>
<input type='date' name='date' id='date' value='{{ data.last.date }}'/>
</li>
<li>
<label for='odometer'>Odometer:</label>
<input type='text' name='odometer' id='odometer' value='{{ data.last.odometer }}'/>
</li>
<li>
<label for='litres'>Litres fuelled:</label>
<input type='text' name='litres' id='litres' value='{{ data.last.litres }}'/>
</li>
<li>
<button class="submit" type="submit">Log pit stop</button>
<a href="{{ url_for('getPitStops') }}">Abort</a>
</li>
</ul>
</form>
{% endblock %}

View File

@@ -1,44 +1,46 @@
{% extends "layout.html" %}
{% block navigation %}
<li><a href='{{ url_for('createPitStopForm') }}'>Create Pitstop</a></li>
{% endblock %}
{% 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'] %}
<table>
<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
<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 %}