feat: Probably functional
This commit is contained in:
31
app/templates/drink_list.html
Normal file
31
app/templates/drink_list.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Drinks Catalogue</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Drinks Catalogue</h1>
|
||||
|
||||
{% if drinks %}
|
||||
{% for drink in drinks %}
|
||||
<div class="card">
|
||||
<strong>{{ drink.name }}</strong>
|
||||
<p class="muted">{{ "%.2f"|format(drink.price) }}€</p>
|
||||
<p>Stock: {{ drink.stock }}</p>
|
||||
|
||||
<div class="actions">
|
||||
<a class="button" href="/drink/{{ drink.id }}">Buy</a>
|
||||
<a class="button button-secondary" href="/drink/{{ drink.id }}/manage">Manage</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No drinks available.</p>
|
||||
{% endif %}
|
||||
<a href="/">Back</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user