diff --git a/css/ens.css b/css/ens.css index 1d54ef2..7fd0ff8 100644 --- a/css/ens.css +++ b/css/ens.css @@ -1,3 +1,13 @@ +@media only screen and (orientation: portrait){ + +.gros-titre{ + width: 90vw; + overflow-x: hidden; + font-weight: bolder; + font-size: small; +} + +} body { font-family: Arial, sans-serif; background-color: #f4f4f4; @@ -67,7 +77,7 @@ tr:hover { } .card { - background-color: #fff; + background-color: #f6f3f3; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); margin-bottom: 20px; @@ -75,48 +85,54 @@ tr:hover { } .card img { - max-width: 100%; - height: auto; - margin-bottom: 10px; +width: 100%; +height: auto; +margin-bottom: 10px; +border-radius: 7px; + +} + +.card textarea{ +width: 100%; +height: 100vh; +margin-bottom: 10px; +border-radius: 7px; +} + +.card embed{ +width: 100%; +height: 50vh; +margin-bottom: 10px; } .card iframe { - width: 100%; - height: 50vw; - margin-bottom: 10px; +width: 100%; +height: 50vh; } -.card embed{ - width: 100%; - height: 500px; - margin-bottom: 10px; -} + .card video { - width: 100%; - height: auto; +width: 100%; +height: auto; + } .card div { - margin-bottom: 10px; - line-height: 1.5; +margin-bottom: 10px; +line-height: 1.5; } .card ul { - padding-left: 20px; - margin-bottom: 10px; +padding-left: 20px; +margin-bottom: 10px; } -/* Responsive styles */ -@media only screen and (max-width: 600px) { - .card { - padding: 15px; - } - - .card div { - font-size: 14px; - } +.card a{ +width: fit-content; +grid-column: auto; } + /* Styles pour les titres importants */ .title { font-size: 20px; diff --git a/js/ens.js b/js/ens.js index d14af88..0c3ef36 100644 --- a/js/ens.js +++ b/js/ens.js @@ -188,10 +188,6 @@ async function gen_contenu() { titreDiv.textContent = `Titre: ${doc.titre}`; card.appendChild(titreDiv); - const typeDiv = document.createElement('div'); - typeDiv.textContent = `Type: ${doc.type}`; - card.appendChild(typeDiv); - /*const uploadPathDiv = document.createElement('div'); uploadPathDiv.textContent = `Upload Path: ${doc.upload_path}`; card.appendChild(uploadPathDiv);*/ @@ -242,7 +238,8 @@ async function gen_contenu() { xmlhttp.send(); text = xmlhttp.responseText; textarea.value = text; - card.appendChild(textarea) + card.appendChild(textarea); + break; default: const unsupportedLink = document.createElement('a'); unsupportedLink.href = doc.upload_path; @@ -253,11 +250,6 @@ async function gen_contenu() { break; } - // Ajout du contenu restant de la carte - const commentaireDiv = document.createElement('div'); - commentaireDiv.classList.add('title'); - commentaireDiv.textContent = `Commentaire Auteur: ${data.msg.commentaire_auteur || ''}`; - card.appendChild(commentaireDiv); // Exercices if (doc.exercices && doc.exercices.length > 0) { @@ -280,12 +272,24 @@ async function gen_contenu() { card.appendChild(noExercicesDiv); } + // Ajout de la carte au conteneur principal dataContainer.appendChild(card); }); + + + + // Ajout du contenu restant de la carte + const commentaireDiv = document.createElement('div'); + commentaireDiv.classList.add('title'); + commentaireDiv.textContent = `Commentaire Auteur: ${data.msg.commentaire_auteur || ''}`; + document.appendChild(commentaireDiv); } else { dataContainer.textContent = data.msg; } + + + } catch (error) { console.error(error); }