refonte arborescence + correction des chemins
This commit is contained in:
123
blog/html/ajouter_article.html
Normal file
123
blog/html/ajouter_article.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ajouter un article</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/translations/fr.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
}
|
||||
.container {
|
||||
max-width: 700px;
|
||||
margin: 40px auto;
|
||||
}
|
||||
.ck-editor__editable {
|
||||
min-height: 350px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-5 text-center">Ajouter un article</h2>
|
||||
<form id="ajouterArticleForm">
|
||||
|
||||
|
||||
<!--Erreur titre vide-->
|
||||
<div id="errorEmpty" class="alert alert-danger d-none">Le titre de l'article est obligatoire</div>
|
||||
|
||||
<!--Erreur image invalide-->
|
||||
<div id="errorImage" class="alert alert-danger d-none">
|
||||
Format d'image invalide. Formats acceptés : JPG, PNG
|
||||
</div>
|
||||
|
||||
<!--Erreur titre existant-->
|
||||
<div id="errorExists" class="alert alert-danger d-none">Ce titre existe déjà. Choisissez un autre titre.</div>
|
||||
|
||||
<!--Succès ajout article-->
|
||||
<div id="successMsg" class="alert alert-success d-none">Article ajouté avec succès !</div>
|
||||
|
||||
<!-- Catégorie -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Catégorie de l'article</label>
|
||||
<input list="categories" id="articleCategory" class="form-control" placeholder="Entrez une catégorie">
|
||||
|
||||
<datalist id="categories">
|
||||
<option value="actualités">
|
||||
<option value="chien">
|
||||
<option value="chat">
|
||||
<option value="boutique">
|
||||
</datalist>
|
||||
</div>
|
||||
|
||||
<!-- Titre -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-bold">Titre de l'article (obligatoire)</label>
|
||||
<input type="text" id="articleTitle" class="form-control" placeholder="Entrez le titre de l'article">
|
||||
</div>
|
||||
|
||||
<!-- Contenu -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Contenu de l'article</label>
|
||||
<textarea id="articleContent" class="form-control" rows="5" placeholder="Entrez le contenu de l'article"></textarea>
|
||||
</div>
|
||||
|
||||
<!-- Image -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-bold">Image de l'article</label>
|
||||
<input type="file" id="articleImage" class="form-control" accept="image/*">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--Publié-->
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" id="articlePublished">
|
||||
<label class="form-check-label" for="articlePublished">Publié (sera publié sur le blog)</label>
|
||||
</div>
|
||||
|
||||
|
||||
<!--Boutons-->
|
||||
<div class="d-flex gap-3 mt-4">
|
||||
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="../js/ajouter_article.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
|
||||
ClassicEditor
|
||||
.create(document.querySelector('#articleContent'), {
|
||||
language: 'fr',
|
||||
toolbar: [
|
||||
'heading',
|
||||
'bold', 'italic', 'underline',
|
||||
'bulletedList', 'numberedList',
|
||||
'undo', 'redo'
|
||||
]
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
57
blog/html/ajouter_categorie.html
Normal file
57
blog/html/ajouter_categorie.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ajouter une catégorie</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body{
|
||||
background: #f4f6f981;
|
||||
|
||||
}
|
||||
.container{
|
||||
max-width: 600px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-5 text-center">Ajouter une catégorie</h2>
|
||||
|
||||
<!--Erreur champ vide -->
|
||||
<div id="errorEmpty" class="alert alert-danger d-none">Le nom de catégorie est obligatoire.</div>
|
||||
|
||||
<!--Erreur nom deja existant -->
|
||||
<div id="errorExists" class="alert alert-danger d-none">Cette catégorie existe déjà. Veuillez en choisir une autre.</div>
|
||||
|
||||
<!--Succès ajout catégorie -->
|
||||
<div id="successMessage" class="alert alert-success d-none">Catégorie ajoutée avec succès !</div>
|
||||
|
||||
<form id="addCategoryForm">
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-bold">Nom de la catégorie (obligatoire)</label>
|
||||
<input type="text" id="categoryName" class="form-control" placeholder="Actualité, chien, chat .." required></div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Description</label>
|
||||
<textarea id="categoryDescription" class="form-control" rows="4" placeholder="Entrez une description (optionnel)"></textarea>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="../js/ajouter_categorie.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
67
blog/html/liste_article.html
Normal file
67
blog/html/liste_article.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Liste des article</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: 60px;
|
||||
}
|
||||
</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_article.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>
|
||||
<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="../html/modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Mon deuxième article</td>
|
||||
<td>Chat</td>
|
||||
<td>Oui</td>
|
||||
<td>
|
||||
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
|
||||
<a href="../html/modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="../js/liste_articles.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
56
blog/html/liste_categorie.html
Normal file
56
blog/html/liste_categorie.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Liste des catégories</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
padding: 30px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="text-center mb-4">Liste des catégories</h2>
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="successMsg" class="alert alert-success d-none"></div>
|
||||
|
||||
<!-- Bouton ajouter -->
|
||||
<div class="d-flex justify-content-end mb-4">
|
||||
<a href="../html/ajouter_categorie.html" class="btn btn-primary">
|
||||
Ajouter une catégorie
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Tableau -->
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Description</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="categoriesTableBody">
|
||||
<!-- rempli en JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="../js/liste_categorie.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
134
blog/html/modifier_article.html
Normal file
134
blog/html/modifier_article.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Modifier un article</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/translations/fr.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
}
|
||||
.container {
|
||||
max-width: 700px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.preview-img {
|
||||
max-width: 15px;
|
||||
border-radius: 8px
|
||||
}
|
||||
.ck-editor__editable {
|
||||
min-height: 350px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-4 text-center">Modifier un article</h2>
|
||||
|
||||
<!--Erreur titre vide-->
|
||||
<div id="errorEmpty" class="alert alert-danger d-none">
|
||||
g Le titre de l'article est obligatoire.
|
||||
</div>
|
||||
|
||||
<!--Erreur image invalide-->
|
||||
<div id="errorImage" class="alert alert-danger d-none">
|
||||
Format d'image invalide. Formats acceptés : JPG, PNG, GIF.
|
||||
</div>
|
||||
|
||||
<!--Erreur titre existant-->
|
||||
<div id="errorExists" class="alert alert-danger d-none">
|
||||
Ce titre existe déjà. Veuillez en choisir un autre.
|
||||
</div>
|
||||
|
||||
<!--Succès-->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
L'article a été modifié avec succès !
|
||||
</div>
|
||||
|
||||
<!-- Formulaire -->
|
||||
<form id="editArticleForm">
|
||||
|
||||
|
||||
|
||||
<!--Titre-->
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Titre de l'article (obligatoire)</label>
|
||||
<input type="text" id="articleTitle" class="form-control" value="Titre de l'article actuel" placeholder="Modifier le titre">
|
||||
</div>
|
||||
|
||||
<!--Contenu-->
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Contenu de l'article</label>
|
||||
<textarea id="articleContent" class="form-control" rows="5">Contenu de l'article actuel...</textarea>
|
||||
</div>
|
||||
|
||||
<!--Catégorie-->
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-bold">Catégorie de l'article</label>
|
||||
<input
|
||||
type="text"
|
||||
id="articleCategory"
|
||||
class="form-control"
|
||||
list="categories"
|
||||
placeholder="Entrez une catégorie">
|
||||
|
||||
<datalist id="categories">
|
||||
<option value="actualités">
|
||||
<option value="chien">
|
||||
<option value="chat">
|
||||
<option value="boutique">
|
||||
</datalist>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Image actuelle -->
|
||||
<label class="fw-bold">Image actuelle</label>
|
||||
<div class="mb-4">
|
||||
<img src="/blog/categories/images/article1.jpg" alt="Image actuelle" class="preview-img mb-2">
|
||||
<input type="file" id="articleImage" class="form-control" accept="image/*">
|
||||
</div>
|
||||
|
||||
<!--Publié-->
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" id="articlePublished" checked>
|
||||
<label class="form-check-label">Publié</label>
|
||||
</div>
|
||||
|
||||
<!--Boutons-->
|
||||
<div class="d-flex gap-3 mt-4">
|
||||
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
ClassicEditor
|
||||
.create(document.querySelector('#articleContent'), {
|
||||
language: 'fr',
|
||||
toolbar: [
|
||||
'heading',
|
||||
'bold', 'italic', 'underline',
|
||||
'bulletedList', 'numberedList',
|
||||
'undo', 'redo'
|
||||
]
|
||||
})
|
||||
</script>
|
||||
|
||||
<script src="../js/modifier_article.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
58
blog/html/modifier_categorie.html
Normal file
58
blog/html/modifier_categorie.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Modifier une catégorie</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f981;
|
||||
|
||||
}
|
||||
.container {
|
||||
max-width: 600px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-5 text-center">Modifier une catégorie</h2>
|
||||
|
||||
<div id="errorMsg" class="alert alert-danger d-none">Veuillez ezmplir tous les champs obligatoires</div>
|
||||
|
||||
<div id="successMsg" class="alert alert-success d-none">La catégorie a été modifiée avec succès !</div>
|
||||
|
||||
<form id="modifierCategorie">
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-bold">Nom de la catégorie (obligatoire)</label>
|
||||
<input type="text" id="categoryName" class="form-control" placeholder="Entrez le nom de la catégorie" required>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Description (optionnel)</label>
|
||||
<textarea id="categorieDescription" class="form-control" rows="4" placeholder="Entrez une description" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-3 mt-4">
|
||||
<a href="../../categories/liste_categorie/liste_categorie.html" class="btn btn-secondary w-50">Annuler</a>
|
||||
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="../js/modifier_categorie.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user