This commit is contained in:
thaaoblues 2024-09-13 15:35:41 +02:00
parent b3ac251279
commit fbe46f3e27
2 changed files with 57 additions and 37 deletions

View file

@ -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,25 +85,36 @@ tr:hover {
}
.card img {
max-width: 100%;
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;
height: 50vh;
}
.card embed{
width: 100%;
height: 500px;
margin-bottom: 10px;
}
.card video {
width: 100%;
height: auto;
}
.card div {
@ -106,16 +127,11 @@ tr:hover {
margin-bottom: 10px;
}
/* Responsive styles */
@media only screen and (max-width: 600px) {
.card {
padding: 15px;
.card a{
width: fit-content;
grid-column: auto;
}
.card div {
font-size: 14px;
}
}
/* Styles pour les titres importants */
.title {

View file

@ -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);
}