chore: remove trailing whitespace from README.md formatting
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user