bug fix
This commit is contained in:
parent
b3ac251279
commit
fbe46f3e27
2 changed files with 57 additions and 37 deletions
50
css/ens.css
50
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 {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
|
@ -67,7 +77,7 @@ tr:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background-color: #fff;
|
background-color: #f6f3f3;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
@ -75,25 +85,36 @@ tr:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.card img {
|
.card img {
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-bottom: 10px;
|
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 {
|
.card iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50vw;
|
height: 50vh;
|
||||||
margin-bottom: 10px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.card embed{
|
|
||||||
width: 100%;
|
|
||||||
height: 500px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.card video {
|
.card video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card div {
|
.card div {
|
||||||
|
@ -106,16 +127,11 @@ tr:hover {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive styles */
|
.card a{
|
||||||
@media only screen and (max-width: 600px) {
|
width: fit-content;
|
||||||
.card {
|
grid-column: auto;
|
||||||
padding: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card div {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Styles pour les titres importants */
|
/* Styles pour les titres importants */
|
||||||
.title {
|
.title {
|
||||||
|
|
24
js/ens.js
24
js/ens.js
|
@ -188,10 +188,6 @@ async function gen_contenu() {
|
||||||
titreDiv.textContent = `Titre: ${doc.titre}`;
|
titreDiv.textContent = `Titre: ${doc.titre}`;
|
||||||
card.appendChild(titreDiv);
|
card.appendChild(titreDiv);
|
||||||
|
|
||||||
const typeDiv = document.createElement('div');
|
|
||||||
typeDiv.textContent = `Type: ${doc.type}`;
|
|
||||||
card.appendChild(typeDiv);
|
|
||||||
|
|
||||||
/*const uploadPathDiv = document.createElement('div');
|
/*const uploadPathDiv = document.createElement('div');
|
||||||
uploadPathDiv.textContent = `Upload Path: ${doc.upload_path}`;
|
uploadPathDiv.textContent = `Upload Path: ${doc.upload_path}`;
|
||||||
card.appendChild(uploadPathDiv);*/
|
card.appendChild(uploadPathDiv);*/
|
||||||
|
@ -242,7 +238,8 @@ async function gen_contenu() {
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
text = xmlhttp.responseText;
|
text = xmlhttp.responseText;
|
||||||
textarea.value = text;
|
textarea.value = text;
|
||||||
card.appendChild(textarea)
|
card.appendChild(textarea);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
const unsupportedLink = document.createElement('a');
|
const unsupportedLink = document.createElement('a');
|
||||||
unsupportedLink.href = doc.upload_path;
|
unsupportedLink.href = doc.upload_path;
|
||||||
|
@ -253,11 +250,6 @@ async function gen_contenu() {
|
||||||
break;
|
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
|
// Exercices
|
||||||
if (doc.exercices && doc.exercices.length > 0) {
|
if (doc.exercices && doc.exercices.length > 0) {
|
||||||
|
@ -280,12 +272,24 @@ async function gen_contenu() {
|
||||||
card.appendChild(noExercicesDiv);
|
card.appendChild(noExercicesDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Ajout de la carte au conteneur principal
|
// Ajout de la carte au conteneur principal
|
||||||
dataContainer.appendChild(card);
|
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 {
|
} else {
|
||||||
dataContainer.textContent = data.msg;
|
dataContainer.textContent = data.msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue