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()) {
|
while ($doc = $resultDocu->fetch_assoc()) {
|
||||||
|
|
||||||
switch ($doc['type']) {
|
switch ($doc['type']) {
|
||||||
case 1:
|
default:
|
||||||
|
|
||||||
// on va maintenant prendre chaque exercice un par un
|
// on va maintenant prendre chaque exercice un par un
|
||||||
// et afficher les bonnes infos :
|
// et afficher les bonnes infos :
|
||||||
|
|
|
@ -106,7 +106,7 @@ border-radius: 7px;
|
||||||
|
|
||||||
.card embed{
|
.card embed{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50vh;
|
height: 150vh;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,13 +162,10 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-doc {
|
.card-doc {
|
||||||
margin-top: 5vh;
|
margin-top: 5vh;
|
||||||
background-color: #dfdaba;
|
background-color: #bad8df;
|
||||||
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;
|
||||||
|
|
|
@ -46,14 +46,15 @@ async function gen_contenu() {
|
||||||
/*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);*/
|
||||||
|
console.log(doc.type)
|
||||||
switch (doc.type) {
|
switch (doc.type) {
|
||||||
case 2: // image
|
case 2: // image
|
||||||
const img = document.createElement('img');
|
const img = document.createElement('img');
|
||||||
img.src = doc.upload_path;
|
img.src = doc.upload_path;
|
||||||
img.alt = doc.titre;
|
img.alt = doc.titre;
|
||||||
card.appendChild(img);
|
card.appendChild(img);
|
||||||
|
|
||||||
|
|
||||||
const imageLink = document.createElement('a');
|
const imageLink = document.createElement('a');
|
||||||
imageLink.href = doc.upload_path;
|
imageLink.href = doc.upload_path;
|
||||||
imageLink.classList.add('lien');
|
imageLink.classList.add('lien');
|
||||||
|
@ -64,6 +65,7 @@ async function gen_contenu() {
|
||||||
case 3: // pdf
|
case 3: // pdf
|
||||||
const embed = document.createElement('embed');
|
const embed = document.createElement('embed');
|
||||||
embed.src = doc.upload_path;
|
embed.src = doc.upload_path;
|
||||||
|
|
||||||
card.appendChild(embed);
|
card.appendChild(embed);
|
||||||
|
|
||||||
const pdfLink = document.createElement('a');
|
const pdfLink = document.createElement('a');
|
||||||
|
|
Loading…
Reference in a new issue