feat: redesign dark futuriste (Luca) — thème cyan/volt, sidebar dark, JetBrains Mono + README

This commit is contained in:
Luca
2026-03-15 21:24:59 +01:00
parent 97ae64caf0
commit c8b704216d
12 changed files with 1552 additions and 691 deletions
+72 -58
View File
@@ -1,63 +1,77 @@
{% extends "base.html" %}
{% block title %}Interventions - GarageManager{% endblock %}
{% block title %}Interventions GarageManager{% endblock %}
{% block content %}
<div class="flex justify-between items-center mb-8">
<div><h2 class="text-2xl font-bold text-slate-800">Interventions</h2><p class="text-slate-500 mt-1">{{ interventions|length }} intervention(s)</p></div>
<a href="/interventions/new" class="bg-orange-500 text-white px-4 py-2 rounded-lg text-sm hover:bg-orange-600 flex items-center gap-2"><i class="fas fa-plus"></i> Nouvelle intervention</a>
</div>
<div class="flex gap-2 mb-6 flex-wrap">
<a href="/interventions" class="px-4 py-2 rounded-full text-sm {% if not statut %}bg-slate-800 text-white{% else %}bg-white text-slate-600 border hover:bg-gray-50{% endif %}">Toutes</a>
<a href="/interventions?statut=en_attente" class="px-4 py-2 rounded-full text-sm {% if statut == 'en_attente' %}bg-yellow-500 text-white{% else %}bg-white text-slate-600 border hover:bg-gray-50{% endif %}">⏳ En attente</a>
<a href="/interventions?statut=en_cours" class="px-4 py-2 rounded-full text-sm {% if statut == 'en_cours' %}bg-blue-500 text-white{% else %}bg-white text-slate-600 border hover:bg-gray-50{% endif %}">🔧 En cours</a>
<a href="/interventions?statut=termine" class="px-4 py-2 rounded-full text-sm {% if statut == 'termine' %}bg-green-500 text-white{% else %}bg-white text-slate-600 border hover:bg-gray-50{% endif %}">✅ Terminées</a>
</div>
<div class="bg-white rounded-xl shadow overflow-x-auto">
{% if interventions %}
<table class="w-full text-sm">
<thead class="bg-gray-50 text-slate-600 text-xs uppercase">
<tr>
<th class="px-6 py-3 text-left">Véhicule</th>
<th class="px-6 py-3 text-left">Description</th>
<th class="px-6 py-3 text-left">Statut</th>
<th class="px-6 py-3 text-left">Pièces</th>
<th class="px-6 py-3 text-left">Total</th>
<th class="px-6 py-3 text-left">Date</th>
<th class="px-6 py-3 text-left">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
{% for i in interventions %}
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 font-medium text-slate-800">
<a href="/vehicules/{{ i.vehicule_id }}" class="hover:text-orange-500">{{ i.immatriculation }}<br><span class="text-xs font-normal text-slate-400">{{ i.marque }} {{ i.modele }}</span></a>
</td>
<td class="px-6 py-4 text-slate-600 max-w-xs">
<a href="/interventions/{{ i.id }}" class="hover:text-orange-500">{{ i.description[:60] }}{% if i.description|length > 60 %}...{% endif %}</a>
</td>
<td class="px-6 py-4">
{% if i.statut == 'en_attente' %}<span class="bg-yellow-100 text-yellow-700 px-2 py-1 rounded-full text-xs">En attente</span>
{% elif i.statut == 'en_cours' %}<span class="bg-blue-100 text-blue-700 px-2 py-1 rounded-full text-xs">En cours</span>
{% else %}<span class="bg-green-100 text-green-700 px-2 py-1 rounded-full text-xs">Terminé</span>{% endif %}
</td>
<td class="px-6 py-4 text-slate-500 text-xs">{{ "%.2f"|format(i.cout_pieces) }} €</td>
<td class="px-6 py-4 font-semibold text-slate-700">{{ "%.0f"|format(i.cout_main_oeuvre + i.cout_pieces) }} €</td>
<td class="px-6 py-4 text-slate-400 text-xs">{{ i.created_at[:10] }}</td>
<td class="px-6 py-4 flex gap-3">
<a href="/interventions/{{ i.id }}" class="text-blue-500 hover:underline">Voir</a>
<a href="/interventions/{{ i.id }}/edit" class="text-orange-500 hover:underline">Modifier</a>
<form method="post" action="/interventions/{{ i.id }}/delete" class="inline" onsubmit="return confirm('Supprimer ?')">
<button class="text-red-500 hover:underline">Supprimer</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="p-8 text-center text-slate-400">
<i class="fas fa-tools text-3xl mb-3"></i><p>Aucune intervention trouvée</p>
<a href="/interventions/new" class="text-orange-500 hover:underline text-sm mt-2 inline-block">Créer la première →</a>
<div class="page-header flex justify-between items-center">
<div>
<h1 class="page-title"><i class="fas fa-tools text-electric" style="margin-right:0.5rem"></i>Interventions</h1>
<p class="page-subtitle">{{ interventions|length }} intervention(s)</p>
</div>
{% endif %}
<a href="/interventions/new" class="btn-primary">
<i class="fas fa-plus"></i> Nouvelle intervention
</a>
</div>
<div class="card" style="padding:0">
<div class="overflow-x-auto">
{% if interventions %}
<table>
<thead>
<tr>
<th>Véhicule</th>
<th>Description</th>
<th>Date</th>
<th>Kilométrage</th>
<th>Pièces</th>
<th class="text-right">Total</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for i in interventions %}
<tr>
<td>
<a href="/vehicules/{{ i.vehicule_id }}" style="text-decoration:none">
<span class="font-semibold mono" style="color:var(--accent-electric);font-size:0.85rem">{{ i.immatriculation }}</span>
<br>
<span class="text-xs text-muted">{{ i.marque }} {{ i.modele }}</span>
</a>
</td>
<td style="max-width:260px">
<a href="/interventions/{{ i.id }}" class="font-medium" style="text-decoration:none;color:var(--text-primary)">
{{ i.description[:60] }}{% if i.description|length > 60 %}…{% endif %}
</a>
</td>
<td class="text-secondary text-xs">{{ i.date_intervention or '—' }}</td>
<td class="mono text-xs text-secondary">{{ (i.kilometrage_intervention|string + ' km') if i.kilometrage_intervention else '—' }}</td>
<td>
<span class="text-xs text-secondary">{{ i.nb_pieces }} pièce(s)</span><br>
<span class="text-xs text-muted">{{ "%.2f"|format(i.cout_pieces) }} €</span>
</td>
<td class="text-right font-semibold" style="color:var(--accent-volt)">
{{ "%.0f"|format(i.cout_main_oeuvre + i.cout_pieces) }} €
</td>
<td>
<div class="flex gap-3">
<a href="/interventions/{{ i.id }}" class="link-action">Voir</a>
<a href="/interventions/{{ i.id }}/edit" class="link-edit">Modifier</a>
<form method="post" action="/interventions/{{ i.id }}/delete" style="display:inline" onsubmit="return confirm('Supprimer cette intervention ?')">
<button class="link-danger">Supprimer</button>
</form>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="empty-state">
<i class="fas fa-tools"></i>
<p>Aucune intervention pour l'instant</p>
<a href="/interventions/new" class="link-action">Créer la première →</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}