add spring
This commit is contained in:
32
src/main/resources/templates/index.html
Normal file
32
src/main/resources/templates/index.html
Normal 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>
|
||||
Reference in New Issue
Block a user