ajout de la page accueil blog + page liste categorie_article regroupant les pages articles et categorie
This commit is contained in:
@@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
<!-- UNE SEULE CARTE : Articles + Catégories -->
|
<!-- UNE SEULE CARTE : Articles + Catégories -->
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<a href="../html/liste_article.html" class="text-decoration-none">
|
<a href="../html/liste_categorie_article.html" class="text-decoration-none">
|
||||||
<div class="card p-4 menu-card">
|
<div class="card p-4 menu-card">
|
||||||
<div class="menu-icon">📝</div>
|
<div class="menu-icon">📝</div>
|
||||||
<h4 class="mt-3 text-dark">Articles & Catégories</h4>
|
<h4 class="mt-3 text-dark">Articles & Catégories</h4>
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
|
|
||||||
<!--Boutons-->
|
<!--Boutons-->
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../html/liste_categorie_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../../../blog/categories/liste_categorie/liste_categorie.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../html/liste_categorie_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
185
blog/html/liste_categorie_article.html
Normal file
185
blog/html/liste_categorie_article.html
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Blog – Catégories & Articles</title>
|
||||||
|
|
||||||
|
<!-- BOOTSTRAP CSS -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||||
|
|
||||||
|
<!-- BOOTSTRAP ICONS -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: #f4f6f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-container {
|
||||||
|
padding: 30px;
|
||||||
|
margin: 40px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
line-height: 1;
|
||||||
|
padding-top: 0.25rem;
|
||||||
|
padding-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1399.98px) {
|
||||||
|
.navbar .nav-item {
|
||||||
|
background-color: var(--bs-light);
|
||||||
|
border: 1px solid var(--bs-border-color);
|
||||||
|
border-radius: .25rem;
|
||||||
|
margin-bottom: .375rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#navbarSupportedContent > ul:first-child { margin-top: .5rem; }
|
||||||
|
#navbarSupportedContent > ul:last-child { margin-top: 1rem; }
|
||||||
|
.bi { display: none; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- HEADER -->
|
||||||
|
<header>
|
||||||
|
<nav class="navbar navbar-expand-xxl bg-body-tertiary shadow-sm">
|
||||||
|
<div class="container-fluid align-items-center">
|
||||||
|
<a class="navbar-brand" href="#">L'Il'eau chiens - Admin</a>
|
||||||
|
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
|
||||||
|
aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
|
|
||||||
|
<!-- MENU GAUCHE -->
|
||||||
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||||
|
<li class="nav-item"><a class="nav-link active" href="#">Blog</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#">Boutique</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#">Prestations</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#">FAQ</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#">Fiche de renseignements</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#">Partenaires</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- MENU DROIT -->
|
||||||
|
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#"><i class="bi bi-megaphone me-1"></i> Message d'actu</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#"><i class="bi bi-box-arrow-up-right me-1"></i> Voir le site</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#"><i class="bi bi-gear me-1"></i> Configuration</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item dropdown">
|
||||||
|
<a class="nav-link dropdown-toggle" href="#" id="userMenu" data-bs-toggle="dropdown">
|
||||||
|
<i class="bi bi-person-circle me-1"></i> <span id="userFirstName">Prénom</span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
|
<li><a class="dropdown-item" href="#">Profil</a></li>
|
||||||
|
<li><hr class="dropdown-divider"></li>
|
||||||
|
<li><a class="dropdown-item" href="#">Sortir</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- CONTENU -->
|
||||||
|
<main class="page-container">
|
||||||
|
|
||||||
|
<!-- ===================== -->
|
||||||
|
<!-- LISTE CATEGORIES -->
|
||||||
|
<!-- ===================== -->
|
||||||
|
<section class="mb-5">
|
||||||
|
<h2 class="text-center mb-4">Liste des catégories</h2>
|
||||||
|
|
||||||
|
<!-- Message succès catégories -->
|
||||||
|
<div id="successCategoriesMsg" class="alert alert-success d-none"></div>
|
||||||
|
|
||||||
|
<!-- Bouton ajouter catégorie -->
|
||||||
|
<div class="d-flex justify-content-end mb-4">
|
||||||
|
<a href="ajouter_categorie.html" class="btn btn-primary">Ajouter une catégorie</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Tableau catégories -->
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Nom</th>
|
||||||
|
<th class="text-end">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="categoriesTableBody">
|
||||||
|
<!-- rempli en JS -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ===================== -->
|
||||||
|
<!-- LISTE ARTICLES -->
|
||||||
|
<!-- ===================== -->
|
||||||
|
<!-- Solution 2 : espace supérieur important -->
|
||||||
|
<section style="margin-top: 120px;">
|
||||||
|
<h2 class="text-center mb-4">Liste des articles</h2>
|
||||||
|
|
||||||
|
<!-- Message succès articles -->
|
||||||
|
<div id="successArticlesMsg" class="alert alert-success d-none"></div>
|
||||||
|
|
||||||
|
<!-- Bouton ajouter article -->
|
||||||
|
<div class="d-flex justify-content-end mb-4">
|
||||||
|
<a href="ajouter_article.html" class="btn btn-primary">Ajouter un article</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Tableau articles -->
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Titre</th>
|
||||||
|
<th class="text-end">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody id="articlesTableBody">
|
||||||
|
<tr>
|
||||||
|
<td>Mon premier article</td>
|
||||||
|
<td class="text-end">
|
||||||
|
<a href="modifier_article.html" class="btn btn-sm btn-outline-primary me-1">Modifier</a>
|
||||||
|
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mon deuxième article</td>
|
||||||
|
<td class="text-end">
|
||||||
|
<a href="modifier_article.html" class="btn btn-sm btn-outline-primary me-1">Modifier</a>
|
||||||
|
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- SCRIPTS -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="../js/liste_categorie.js"></script>
|
||||||
|
<script src="../js/liste_articles.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
<!--Boutons-->
|
<!--Boutons-->
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../../blog/html/liste_categorie_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../../categories/liste_categorie/liste_categorie.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../html/liste_categorie_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,6 @@ form.addEventListener('submit', function(e) {
|
|||||||
|
|
||||||
// Redirection après 1 seconde
|
// Redirection après 1 seconde
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = "../html/liste_article.html";
|
window.location.href = "../html/liste_categorie_article.html";
|
||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ existingCategories.push(nom);
|
|||||||
|
|
||||||
// Redirection après 1 seconde
|
// Redirection après 1 seconde
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = "../html/liste_categorie.html";
|
window.location.href = "../html/liste_categorie_article.html";
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,6 @@ form.addEventListener("submit", function (e) {
|
|||||||
|
|
||||||
// Redirection après succès
|
// Redirection après succès
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = "../html/liste_article.html";
|
window.location.href = "../../blog/html/liste_categorie_article.html";
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ form.addEventListener("submit", function (e) {
|
|||||||
|
|
||||||
// Redirection après succès
|
// Redirection après succès
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = "../html/liste_categorie.html";
|
window.location.href = "../html/liste_categorie_article.html";
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user