- modified web interface: added stylesheet, personal page and divs;

This commit is contained in:
Bernhard Stampfer
2016-02-18 15:18:11 +01:00
parent 476d1b1273
commit be95db1823
6 changed files with 100 additions and 22 deletions

View File

@@ -4,6 +4,7 @@
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/static/style.css">
{% if title %}
<title> {{ title }} - Baroness </title>
{% else %}
@@ -13,27 +14,30 @@
<body>
<!-- Menu -->
<h1> Menu </h1>
<ul>
<li><a href="/index">Home</a></li>
<div class="tops">
<h1> {{ title }} - Baroness</h1>
<a href="/index"><div class="item">Home</div></a>
{% if user %}
<li><a href="/logout">Logout</a></li>
<li><a href="/consume"> Konsumieren</a></li>
<li><a href="/personal">Personal</a></li>
<a href="/logout"><div class="item">Logout</div></a>
<a href="/consume"><div class="item">Konsumieren</div></a>
<a href="/personal"><div class="item">Personal</div></a>
{% if user.isbaron %}
<li><a href="/billing">Billing</a></li>
<li><a href="/manage_beverages">Konsumatverwaltung</a></li>
<li><a href="/manage_users">Konsumentenverwaltung</a></li>
<a href="/billing"><div class="item">Billing</div></a>
<a href="/manage_beverages"><div class="item">Konsumatverwaltung</div></a>
<a href="/manage_users"><div class="item">Konsumentenverwaltung</div></a>
{% endif %}
{% else %}
<li><a href="/login">Login</a></li>
<a href="/login"><div class="item right">Login</div></a>
{% endif %}
</ul>
</div>
{% if user %}
<div class="loggedin">
Du bist eingeloggt als {{user.longname}}
</div>
{% endif %}
<div class="mainblock">
{% block content %}{% endblock %}
</div>
</body>
</html>

View File

@@ -12,7 +12,7 @@
<p>
Möchtest du etwas konsumieren?
{% for product in products %}
<div><p> {{ product.id }}, <a href="/consume?prodid={{product.id}}"> {{product.name}} </a>, {{product.price}} € </p> </div>
<div><p> {{ product.id }}, <a href="/consume?prodid={{product.id}}"> {{product.name}} </a>, {{"%0.2f" % product.price}} € </p> </div>
{% endfor %}
</p>
{% endblock %}

View File

@@ -3,17 +3,18 @@
{% block content %}
<h3>TODO: </h3>
<ul>
<li> graphical beer list</li>
<img src="{{ url_for('static', filename='total.png') }}">
{% if user %}
<li>generate new plots if .png missing</li>
</ul>
<h1> Bierkonsum </h1>
<img src="{{ url_for('static', filename='total.png') }}">
{% if user %}
{% set fils = "total%03d.png" % user.id %}
<img src="{{ url_for('static', filename=fils) }}">
{% endif %}
</ul>
{% endif %}
<h1> Bierliste </h1>
<img src="{{ url_for('static', filename='bierliste_small.png') }}">
<table>
<!-- <table>
<tr>
<th>ID</th>
<th>Produkt Nummer</th>
@@ -30,5 +31,5 @@
<td>{{consumption.time}}</td>
</tr>
{% endfor %}
</table>
</table> -->
{% endblock %}

View File

@@ -0,0 +1,17 @@
{% extends "base.html"%}
{% set title = "Personal" %}
{% block content %}
<h3>TODO: </h3>
<ul>
<li>add money owed</li>
</ul>
<h1> Statistik </h1>
<h2> Bierkonsum </h2>
<img src="{{ url_for('static', filename='total.png') }}">
{% if user %}
{% set fils = "total%03d.png" % user.id %}
<img src="{{ url_for('static', filename=fils) }}">
{% endif %}
{% endblock %}