chore: remove trailing whitespace from README.md formatting

This commit is contained in:
2025-11-12 03:48:43 +00:00
parent 6427458bd0
commit 4e83ddf9d0
10 changed files with 115 additions and 87 deletions
+10 -1
View File
@@ -30,10 +30,19 @@ class PhotoGallery extends HTMLElement {
async renderPhotos() {
const grid = this.querySelector('.gallery-grid');
if (this.photos.length === 0) {
grid.innerHTML = '<p class="empty-state">No photos found.</p>';
grid.innerHTML = '';
const header = this.querySelector('.gallery-header');
const empty = document.createElement('p');
empty.className = 'empty-state';
empty.textContent = 'No photos found.';
header.insertAdjacentElement('afterend', empty);
return;
}
// Remove any existing empty-state
const existingEmpty = this.querySelector('.empty-state');
if (existingEmpty) existingEmpty.remove();
grid.innerHTML = this.photos.map(photo => `
<div class="photo-item" data-file-id="${photo.id}">
<img