thumbs
This commit is contained in:
parent
58c549781b
commit
7cd9ff12f3
1072 changed files with 271 additions and 3 deletions
|
|
@ -170,6 +170,7 @@
|
|||
box-shadow: 0 8px 40px rgba(0,0,0,0.6);
|
||||
animation: vImgIn 0.2s cubic-bezier(0.4,0,0.2,1);
|
||||
cursor: default;
|
||||
transition: filter 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes vImgIn {
|
||||
|
|
@ -1453,7 +1454,7 @@ function buildPhotoItem(photo, pageIndex) {
|
|||
img.alt = photo.file;
|
||||
img.loading = 'lazy';
|
||||
img.decoding = 'async';
|
||||
img.src = `./photos/${photo.file}`;
|
||||
img.src = `./photos/thumbs/${photo.file}`;
|
||||
|
||||
item.appendChild(img);
|
||||
|
||||
|
|
@ -1546,8 +1547,16 @@ function updateViewer() {
|
|||
const photo = photos[viewerIndex];
|
||||
if (!photo) return;
|
||||
|
||||
viewerImg.src = `./photos/${photo.file}`;
|
||||
viewerImg.alt = photo.file;
|
||||
// Show thumbnail instantly, then load full res on top
|
||||
viewerImg.src = `./photos/thumbs/${photo.file}`;
|
||||
viewerImg.style.filter = 'blur(0px)';
|
||||
|
||||
const full = new Image();
|
||||
full.onload = () => {
|
||||
viewerImg.src = full.src;
|
||||
viewerImg.style.filter = 'blur(0px)';
|
||||
};
|
||||
full.src = `./photos/${photo.file}`;
|
||||
|
||||
// Populate toolbar with metadata
|
||||
const fields = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue