mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 11:19:59 +00:00
Changed table heading in food_items.html to indicate values are per 100g/100ml and applied 'bg-body-tertiary' class to table cells for improved readability. Updated add_food_item.html to use 'form-control-plaintext' for the readonly barcode field for better display consistency.
47 lines
1.8 KiB
HTML
47 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
Food Nutritional Info
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container mt-5">
|
|
<h1 class="mb-4">Food Nutritional Information (per 100g/100ml)</h1>
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-hover align-middle">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Energy (kcal)</th>
|
|
<th>Fats (g)</th>
|
|
<th>Saturated Fats (g)</th>
|
|
<th>Sugars (g)</th>
|
|
<th>Carbs (g)</th>
|
|
<th>Protein (g)</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for food in items %}
|
|
<tr>
|
|
<td class="bg-body-tertiary">{{ food.name }}</td>
|
|
<td class="bg-body-tertiary">{{ food.energy_100g }}</td>
|
|
<td class="bg-body-tertiary">{{ food.fats_100g }}</td>
|
|
<td class="bg-body-tertiary">{{ food.saturated_fats_100g }}</td>
|
|
<td class="bg-body-tertiary">{{ food.sugar_100g }}</td>
|
|
<td class="bg-body-tertiary">{{ food.carbs_100g }}</td>
|
|
<td class="bg-body-tertiary">{{ food.protein_100g }}</td>
|
|
<td class="bg-body-tertiary">
|
|
<form method="POST" action="{{ url_for('admin.delete_food', id=food.id) }}"
|
|
onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock%} |