Skip to content

Commit

Permalink
Update mediaSlider.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ledangtrung committed Dec 2, 2024
1 parent 3371fd5 commit afad7b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/mediaSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class MediaSlider {

createMediaElement(url) {
if (!url) {
return `<i class="bi bi-file-earmark-x" title="Documents not available"></i>`;
return `<div style="display: flex; justify-content: center; align-items: center; height: 40vh; font-weight: bold; color: #666;">πŸ“„ No documents πŸ“‹</div>`;
}
const mediaType = this.detectMediaType(url);
switch(mediaType) {
Expand All @@ -127,7 +127,7 @@ class MediaSlider {

createSlider() {
if (this.mediaUrls.length === 0) {
document.getElementById(this.containerId).innerHTML = '<div>Documents unavailable</div>';
document.getElementById(this.containerId).innerHTML = '<div style="display: flex; justify-content: center; align-items: center; height: 40vh; font-weight: bold; color: #666;">πŸ“„ No documents πŸ“‹</div>';
return; // Exit if there are no media URLs
}

Expand Down

0 comments on commit afad7b9

Please sign in to comment.