lien bdd & html liste des articles

This commit is contained in:
ionak
2024-04-22 22:08:12 +02:00
parent 3480ce9aeb
commit 2fcafc0ea1
22 changed files with 211 additions and 34 deletions

View File

@@ -0,0 +1,5 @@
.v-center {
display: flex;
align-items: center;
height: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

View File

@@ -7,8 +7,43 @@
<link href="assets/bootstrap-icons/bootstrap-icons.min.css" rel="stylesheet">
</head>
<body>
<div id="container-main"><h1>hello world !</h1></div>
<div id="container-main">
<div class="container mt-4">
<div class="row mb-4">
<div class="col-12">
<form th:action="@{/search}" method="get" class="input-group">
<input type="text" class="form-control" placeholder="Rechercher un article par nom..." name="searchTerm" th:value="${searchTerm}">
<button type="submit" class="btn btn-primary">Recherche</button>
</form>
</div>
</div>
<div class="row">
<div th:each="article : ${articles}" class="col-md-6 mb-4">
<div class="card shadow-sm h-100">
<div class="row g-0">
<div class="col-md-4 d-flex align-items-center justify-content-center p-3">
<img th:src="${'images/articles/' + article.id + '.jpg'}" alt="Image de l'article" class="img-fluid rounded">
</div>
<div class="col-md-8">
<div class="card-body d-flex flex-column">
<h5 class="card-title" th:text="${article.nom}">Nom de l'article</h5>
<p class="card-text mb-auto" th:text="${article.desc}">Description</p>
<div class="d-flex justify-content-between align-items-center">
<div>
<h6>Prix de vente: <span th:text="${article.prixVente}"></span></h6>
<h6 class="text-muted">Fin de l'enchere: <span th:text="${#dates.format(article.dateFinEnch, 'dd/MM/yyyy')}"></span></h6>
<script src="js/bootstrap/bootstrap.min.js"></script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/bootstrap/bootstrap.min.js"></script>
</body>
</html>