Skip to content

Commit

Permalink
update the basic logic components
Browse files Browse the repository at this point in the history
  • Loading branch information
ctkqiang committed Nov 3, 2024
1 parent d3e1931 commit 909a08b
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions public/pages/aed.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -157,30 +157,29 @@
// Function to create carousel HTML
function createCarouselHTML(images, aedId) {
let html = `
<div id="carousel-${aedId}" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div id="carousel-${aedId}" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
`;
images.forEach((img, index) => {
html += `
<div class="carousel-item ${index === 0 ? 'active' : ''}">
<img src="${img}" class="d-block w-100" alt="Location image ${index + 1}">
</div>
<div class="carousel-item ${index === 0 ? 'active' : ''}">
<img src="${img}" class="d-block w-100" alt="Location image ${index + 1}">
</div>
`;
});
html += `
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-${aedId}" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel-${aedId}" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
html += `
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-${aedId}" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carousel-${aedId}" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
`;
return html;
}
Expand Down Expand Up @@ -233,7 +232,7 @@
</p>
`;
}
popupContent += ' < /div>';
// Create marker and popup
const marker = L.marker([lat, lng]).addTo(map);
const popup = L.popup({
Expand Down

0 comments on commit 909a08b

Please sign in to comment.