diff --git a/api.php b/api.php index 3ec1efc..ca4a813 100644 --- a/api.php +++ b/api.php @@ -95,7 +95,7 @@ while ($doc = $resultDocu->fetch_assoc()) { switch ($doc['type']) { - case 1: + default: // on va maintenant prendre chaque exercice un par un // et afficher les bonnes infos : diff --git a/css/ens.css b/css/ens.css index 9b3dfca..768bf78 100644 --- a/css/ens.css +++ b/css/ens.css @@ -106,7 +106,7 @@ border-radius: 7px; .card embed{ width: 100%; -height: 50vh; +height: 150vh; margin-bottom: 10px; } diff --git a/css/index.css b/css/index.css index ff38268..188e1f8 100644 --- a/css/index.css +++ b/css/index.css @@ -162,13 +162,10 @@ margin-bottom: 20px; padding: 20px; } - - - .card-doc { margin-top: 5vh; - background-color: #dfdaba; + background-color: #bad8df; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); margin-bottom: 20px; diff --git a/js/ens.js b/js/ens.js index 6048ce9..0eb4d12 100644 --- a/js/ens.js +++ b/js/ens.js @@ -46,14 +46,15 @@ async function gen_contenu() { /*const uploadPathDiv = document.createElement('div'); uploadPathDiv.textContent = `Upload Path: ${doc.upload_path}`; card.appendChild(uploadPathDiv);*/ - - switch (doc.type) { + console.log(doc.type) + switch (doc.type) { case 2: // image const img = document.createElement('img'); img.src = doc.upload_path; img.alt = doc.titre; card.appendChild(img); + const imageLink = document.createElement('a'); imageLink.href = doc.upload_path; imageLink.classList.add('lien'); @@ -64,6 +65,7 @@ async function gen_contenu() { case 3: // pdf const embed = document.createElement('embed'); embed.src = doc.upload_path; + card.appendChild(embed); const pdfLink = document.createElement('a');