fix les documents que ne s'affichaient pas mais pas encore les apostrophes

This commit is contained in:
thaaoblues 2024-11-27 20:30:30 +01:00
parent 9abc0f4f7d
commit ba552d9955
4 changed files with 7 additions and 8 deletions

View file

@ -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 :

View file

@ -106,7 +106,7 @@ border-radius: 7px;
.card embed{
width: 100%;
height: 50vh;
height: 150vh;
margin-bottom: 10px;
}

View file

@ -163,12 +163,9 @@
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;

View file

@ -46,7 +46,7 @@ async function gen_contenu() {
/*const uploadPathDiv = document.createElement('div');
uploadPathDiv.textContent = `Upload Path: ${doc.upload_path}`;
card.appendChild(uploadPathDiv);*/
console.log(doc.type)
switch (doc.type) {
case 2: // image
const img = document.createElement('img');
@ -54,6 +54,7 @@ async function gen_contenu() {
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');