première release
This commit is contained in:
57
templates/accompagnements.html
Normal file
57
templates/accompagnements.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mes accompagnements</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="top-nav">
|
||||
<a href="{{ url_for('menu') }}" class="btn btn-secondary">← Retour au menu</a>
|
||||
<a href="{{ url_for('add_accompagnement') }}" class="btn">➕ Ajouter un accompagnement</a>
|
||||
</div>
|
||||
|
||||
<h1>🥗 Mes accompagnements</h1>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }}">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% if accompagnements %}
|
||||
<div class="recettes-list">
|
||||
{% for acc in accompagnements %}
|
||||
<div class="recette-card">
|
||||
<h3>{{ acc['nom'] }}</h3>
|
||||
|
||||
{% if acc['descriptif'] %}
|
||||
<div class="ingredients">
|
||||
<strong>Descriptif :</strong>
|
||||
<pre>{{ acc['descriptif'] }}</pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="actions">
|
||||
<a href="{{ url_for('edit_accompagnement', id=acc['id']) }}" class="btn-edit">✏️ Modifier</a>
|
||||
<form method="POST" action="{{ url_for('delete_accompagnement', id=acc['id']) }}" style="display: inline;">
|
||||
<button type="submit" class="btn-delete" onclick="return confirm('Supprimer cet accompagnement ?')">🗑️ Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p style="text-align: center; color: #666; margin: 40px 0;">
|
||||
Aucun accompagnement pour le moment. Commencez par en ajouter un !
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user