feat:avant apres+media queries+modale de suppression
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -8,14 +9,6 @@
|
||||
<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: 100px;
|
||||
}
|
||||
.img-preview {
|
||||
max-width: 150px;
|
||||
border-radius: 8px;
|
||||
@@ -23,68 +16,83 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<body class="bg-light py-4 py-md-5">
|
||||
|
||||
<h2 class="mb-5 text-center">Ajouter une paire avant/après</h2>
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
Nouvelle paire ajoutée avec succès !
|
||||
<h1 class="mb-4 mb-md-5 text-center">Ajouter une paire avant/après</h1>
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
Nouvelle paire ajoutée avec succès !
|
||||
</div>
|
||||
|
||||
<!-- Message erreur -->
|
||||
<div id="errorMsg" class="alert alert-danger d-none">
|
||||
Merci de remplir tous les champs obligatoires.
|
||||
</div>
|
||||
|
||||
<!-- Erreur : format invalide -->
|
||||
<div id="errorFormat" class="alert alert-danger d-none">
|
||||
Format d'image invalide. Formats acceptés : JPG, PNG, WEBP.
|
||||
</div>
|
||||
|
||||
<form id="addPairForm" class="mt-3">
|
||||
|
||||
<!-- Titre / label -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pairTitle">Titre de la paire (obligatoire)</label>
|
||||
<input type="text" id="pairTitle" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pairType">Type (obligatoire)</label>
|
||||
<select id="pairType" class="form-select" required>
|
||||
<option value="">-- Choisir --</option>
|
||||
<option value="Chien">Chien</option>
|
||||
<option value="Chat">Chat</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Image AVANT -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="beforeImage">Image AVANT (obligatoire)</label>
|
||||
<input type="file" id="beforeImage" class="form-control" accept="image/*" required>
|
||||
|
||||
<img id="beforePreview" class="img-preview border mt-2" src="#" alt="image avant">
|
||||
</div>
|
||||
|
||||
<!-- Image APRÈS -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="afterImage">Image APRÈS (obligatoire)</label>
|
||||
<input type="file" id="afterImage" class="form-control" accept="image/*" required>
|
||||
|
||||
<img id="afterPreview" class="img-preview border mt-2" src="#" alt="image après">
|
||||
</div>
|
||||
|
||||
<!-- Boutons : empilés en mobile, côte à côte en md+ -->
|
||||
<div class="row mt-4 g-3">
|
||||
<div class="col-12 col-md-6">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary w-100">
|
||||
Annuler
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Ajouter
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Message erreur -->
|
||||
<div id="errorMsg" class="alert alert-danger d-none">
|
||||
Merci de remplir tous les champs obligatoires.
|
||||
</div>
|
||||
|
||||
<form id="addPairForm">
|
||||
|
||||
<!-- Titre / label -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Titre de la paire *</label>
|
||||
<input type="text" id="pairTitle" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Type *</label>
|
||||
<select id="pairType" class="form-select" required>
|
||||
<option value="">-- Choisir --</option>
|
||||
<option value="Chien">Chien</option>
|
||||
<option value="Chat">Chat</option>
|
||||
<option value="Autre">Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Image AVANT -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Image AVANT *</label>
|
||||
<input type="file" id="beforeImage" class="form-control" accept="image/*">
|
||||
|
||||
<img id="beforePreview" class="img-preview border mt-2">
|
||||
</div>
|
||||
|
||||
<!-- Image APRÈS -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Image APRÈS *</label>
|
||||
<input type="file" id="afterImage" class="form-control" accept="image/*">
|
||||
|
||||
<img id="afterPreview" class="img-preview border mt-2">
|
||||
</div>
|
||||
|
||||
<!-- Boutons -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">Annuler</a>
|
||||
<button type="submit" class="btn btn-primary">Ajouter</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="ajouter_avant_apres.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="ajouter_avant_apres.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