creation page liste des articles

This commit is contained in:
ben
2025-12-05 15:52:25 +01:00
parent fe1a9d55a3
commit 7a112bb595
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des articles</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<style>
body {
background: #f4f6f9;
}
.container {
margin-top: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="mb-0">Listes des articles</h2>
<a href="ajouter_articles.html" class="btn btn-primary">Ajouter un article</a>
</div>
<table class="table table-bordered table-hover bg-white">
<thead class="table-light">
<tr>
<th>Titre</th>
<th>Catégorie</th>
<th>Publié</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<!--Exemple d'article-->
<tr>
<td>Mon premier article</td>
<td>Chien</td>
<td>Oui</td>
<td>
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
<a href="modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
<button class="btn btn-sm btn-outline-danger" onclick="confirmerSuppression('Mon premier article')">Supprimer</button>
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@@ -0,0 +1,7 @@
function confirmerSuppression(titre) {
const confirmation = confirm(`Êtes-vous sûr de vouloir supprimer l'article "${titre}" ?`);
if (confirmation) {
alert(`L'article "${titre}" a été supprimé.`);
}
}