add spring

This commit is contained in:
Σlie *
2026-02-27 21:02:08 +01:00
parent 14fbdc348a
commit fcff7c1c23
7 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Iceberg Price Tracker</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-900 text-white p-10">
<h1 class="text-3xl font-bold mb-6">🧊 Iceberg Dashboard</h1>
<form action="/add" method="POST" class="mb-10">
<input type="text" name="link" placeholder="Lien Amazon..." class="p-2 rounded bg-gray-800 border border-gray-700 w-1/2">
<button type="submit" class="bg-blue-600 px-4 py-2 rounded">Ajouter</button>
</form>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div th:each="product : ${products}" class="bg-gray-800 p-4 rounded-xl shadow-lg">
<div class="flex items-center gap-4 mb-4">
<img th:src="${product.imageUrl}" class="w-16 h-16 object-contain rounded">
<h2 class="flex-1 font-semibold text-sm" th:text="${product.name}">Nom du produit</h2>
<a th:href="@{'/delete/' + ${product.id}}" class="text-red-500">🗑️</a>
</div>
<canvas th:id="'chart-' + ${product.id}"></canvas>
<script th:inline="javascript">
/* Code pour générer le graphique Chart.js pour chaque produit */
</script>
</div>
</div>
</body>
</html>