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 6b0f216 commit c05cd80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 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="Not available"></i>`;
return `<i class="bi bi-file-earmark-x" title="Documents not available"></i>`;
}
const mediaType = this.detectMediaType(url);
switch(mediaType) {
Expand All @@ -127,8 +127,7 @@ class MediaSlider {

createSlider() {
if (this.mediaUrls.length === 0) {
document.getElementById(this.containerId).innerHTML = '<div style="display: flex; justify-content: center; align-items: center; height: 100vh; font-weight: bold;">
📷 No media available 🎬</div>';
document.getElementById(this.containerId).innerHTML = '<div>Documents unavailable</div>';
return; // Exit if there are no media URLs
}

Expand Down

0 comments on commit c05cd80

Please sign in to comment.