Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1506,20 +1506,23 @@ <h2 class="text-4xl md:text-5xl font-bold mb-4">Photos</h2>
const card = document.createElement('div');
card.className = 'album-item';

// High-res hack: substitute =s... with =s1200 for better quality than default thumbnail
let src = item.thumbnailLink;
if (src && src.includes('=s')) {
src = src.replace(/=s\d+/, '=s1200');
// Optimized: Use smaller size for grid, larger for lightbox
let thumbSrc = item.thumbnailLink;
let fullSrc = item.thumbnailLink;

if (thumbSrc && thumbSrc.includes('=s')) {
thumbSrc = thumbSrc.replace(/=s\d+/, '=s400');
fullSrc = fullSrc.replace(/=s\d+/, '=s1200');
}

const img = document.createElement('img');
img.alt = item.name || 'Photo';
img.loading = 'lazy';
img.src = src;
img.src = thumbSrc;

// Add Lightbox interaction
img.style.cursor = 'pointer';
img.addEventListener('click', () => openLightbox(src));
img.addEventListener('click', () => openLightbox(fullSrc));

card.appendChild(img);
grid.appendChild(card);
Expand Down
4 changes: 4 additions & 0 deletions server.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
127.0.0.1 - - [31/Jan/2026 16:37:53] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [31/Jan/2026 16:37:53] "GET /flower.jpg HTTP/1.1" 200 -
127.0.0.1 - - [31/Jan/2026 16:38:38] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [31/Jan/2026 16:38:38] "GET /flower.jpg HTTP/1.1" 200 -