fix les documents que ne s'affichaient pas mais pas encore les apostrophes
This commit is contained in:
parent
9abc0f4f7d
commit
ba552d9955
4 changed files with 7 additions and 8 deletions
2
api.php
2
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 :
|
||||
|
|
|
@ -106,7 +106,7 @@ border-radius: 7px;
|
|||
|
||||
.card embed{
|
||||
width: 100%;
|
||||
height: 50vh;
|
||||
height: 150vh;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue