feat: redesign dark futuriste (Luca) — thème cyan/volt, sidebar dark, JetBrains Mono + README
This commit is contained in:
+60
-38
@@ -1,58 +1,80 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Véhicules - GarageManager{% endblock %}
|
||||
{% block title %}Véhicules — GarageManager{% endblock %}
|
||||
{% block content %}
|
||||
<div class="flex justify-between items-center mb-8">
|
||||
<div><h2 class="text-2xl font-bold text-slate-800">Véhicules</h2><p class="text-slate-500 mt-1">{{ vehicules|length }} véhicule(s)</p></div>
|
||||
<a href="/vehicules/new" class="bg-orange-500 text-white px-4 py-2 rounded-lg text-sm hover:bg-orange-600 transition flex items-center gap-2"><i class="fas fa-plus"></i> Nouveau véhicule</a>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl shadow">
|
||||
<div class="p-4 border-b border-gray-100">
|
||||
<form method="get" class="flex gap-2">
|
||||
<input name="q" value="{{ q }}" placeholder="Immatriculation, marque, modèle, VIN..." class="flex-1 border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">
|
||||
<button type="submit" class="bg-slate-700 text-white px-4 py-2 rounded-lg text-sm">Rechercher</button>
|
||||
{% if q %}<a href="/vehicules" class="text-slate-500 px-3 py-2 text-sm flex items-center">✕</a>{% endif %}
|
||||
</form>
|
||||
|
||||
<div class="page-header flex justify-between items-center">
|
||||
<div>
|
||||
<h1 class="page-title"><i class="fas fa-car text-electric" style="margin-right:0.5rem"></i>Véhicules</h1>
|
||||
<p class="page-subtitle">{{ vehicules|length }} véhicule(s) enregistré(s)</p>
|
||||
</div>
|
||||
<a href="/vehicules/new" class="btn-primary">
|
||||
<i class="fas fa-plus"></i> Nouveau véhicule
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Search -->
|
||||
<div class="card mb-4" style="padding:1rem 1.25rem">
|
||||
<form method="get" class="flex gap-2">
|
||||
<input name="q" value="{{ q }}" placeholder="Immatriculation, marque, modèle, VIN…" style="flex:1">
|
||||
<button type="submit" class="btn-secondary" style="width:auto;white-space:nowrap">
|
||||
<i class="fas fa-search"></i> Rechercher
|
||||
</button>
|
||||
{% if q %}
|
||||
<a href="/vehicules" class="btn-secondary" style="width:auto">✕</a>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
<div class="card" style="padding:0">
|
||||
<div class="overflow-x-auto">
|
||||
{% if vehicules %}
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-slate-600 text-xs uppercase">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="px-6 py-3 text-left">Immatriculation</th>
|
||||
<th class="px-6 py-3 text-left">Marque / Modèle</th>
|
||||
<th class="px-6 py-3 text-left">Année</th>
|
||||
<th class="px-6 py-3 text-left">VIN</th>
|
||||
<th class="px-6 py-3 text-left">Kilométrage</th>
|
||||
<th class="px-6 py-3 text-left">Interventions</th>
|
||||
<th class="px-6 py-3 text-left">Actions</th>
|
||||
<th>Immatriculation</th>
|
||||
<th>Marque / Modèle</th>
|
||||
<th>Année</th>
|
||||
<th>VIN</th>
|
||||
<th>Kilométrage</th>
|
||||
<th>Interventions</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<tbody>
|
||||
{% for v in vehicules %}
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-6 py-4 font-bold text-slate-800">{{ v.immatriculation }}</td>
|
||||
<td class="px-6 py-4 font-medium text-slate-700">{{ v.marque }} {{ v.modele }}</td>
|
||||
<td class="px-6 py-4 text-slate-500">{{ v.annee or '-' }}</td>
|
||||
<td class="px-6 py-4 text-slate-400 text-xs font-mono">{{ v.vin or '-' }}</td>
|
||||
<td class="px-6 py-4 text-slate-600">{{ (v.kilometrage|string + ' km') if v.kilometrage else '-' }}</td>
|
||||
<td class="px-6 py-4"><span class="bg-gray-100 text-gray-600 px-2 py-1 rounded-full text-xs">{{ v.nb_interventions }}</span></td>
|
||||
<td class="px-6 py-4 flex gap-3">
|
||||
<a href="/vehicules/{{ v.id }}" class="text-blue-500 hover:underline">Voir</a>
|
||||
<a href="/vehicules/{{ v.id }}/edit" class="text-orange-500 hover:underline">Modifier</a>
|
||||
<form method="post" action="/vehicules/{{ v.id }}/delete" class="inline" onsubmit="return confirm('Supprimer ce véhicule ?')">
|
||||
<button class="text-red-500 hover:underline">Supprimer</button>
|
||||
</form>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/vehicules/{{ v.id }}" class="font-bold mono" style="color:var(--accent-electric);font-size:0.95rem;text-decoration:none">{{ v.immatriculation }}</a>
|
||||
</td>
|
||||
<td class="font-medium">{{ v.marque }} {{ v.modele }}</td>
|
||||
<td class="text-secondary">{{ v.annee or '—' }}</td>
|
||||
<td class="mono text-xs text-muted">{{ v.vin or '—' }}</td>
|
||||
<td class="mono text-sm">{{ (v.kilometrage|string + ' km') if v.kilometrage else '—' }}</td>
|
||||
<td>
|
||||
<span class="badge badge-info">{{ v.nb_interventions }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex gap-3">
|
||||
<a href="/vehicules/{{ v.id }}" class="link-action">Voir</a>
|
||||
<a href="/vehicules/{{ v.id }}/edit" class="link-edit">Modifier</a>
|
||||
<form method="post" action="/vehicules/{{ v.id }}/delete" style="display:inline" onsubmit="return confirm('Supprimer ce véhicule et toutes ses données ?')">
|
||||
<button class="link-danger">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="p-8 text-center text-slate-400">
|
||||
<i class="fas fa-car text-3xl mb-3"></i><p>Aucun véhicule trouvé</p>
|
||||
<a href="/vehicules/new" class="text-orange-500 hover:underline text-sm mt-2 inline-block">Ajouter le premier →</a>
|
||||
<div class="empty-state">
|
||||
<i class="fas fa-car"></i>
|
||||
<p>Aucun véhicule trouvé</p>
|
||||
<a href="/vehicules/new" class="link-action">Ajouter le premier →</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user