diff --git a/images/thumbs/gallery/250525.jpg b/images/thumbs/gallery/250525.jpg new file mode 100644 index 0000000..cabd509 Binary files /dev/null and b/images/thumbs/gallery/250525.jpg differ diff --git a/images/thumbs/gallery/250625.jpg b/images/thumbs/gallery/250625.jpg new file mode 100644 index 0000000..a00fc75 Binary files /dev/null and b/images/thumbs/gallery/250625.jpg differ diff --git a/images/thumbs/gallery/250806.jpg b/images/thumbs/gallery/250806.jpg new file mode 100644 index 0000000..8f463bf Binary files /dev/null and b/images/thumbs/gallery/250806.jpg differ diff --git a/images/thumbs/gallery/250829_100.jpg b/images/thumbs/gallery/250829_100.jpg new file mode 100644 index 0000000..bb6cc77 Binary files /dev/null and b/images/thumbs/gallery/250829_100.jpg differ diff --git a/images/thumbs/gallery/251009.jpg b/images/thumbs/gallery/251009.jpg new file mode 100644 index 0000000..162d399 Binary files /dev/null and b/images/thumbs/gallery/251009.jpg differ diff --git a/images/thumbs/gallery/251030.jpg b/images/thumbs/gallery/251030.jpg new file mode 100644 index 0000000..edae01e Binary files /dev/null and b/images/thumbs/gallery/251030.jpg differ diff --git a/images/thumbs/gallery/251130_2.jpg b/images/thumbs/gallery/251130_2.jpg new file mode 100644 index 0000000..1ffdc1a Binary files /dev/null and b/images/thumbs/gallery/251130_2.jpg differ diff --git a/images/thumbs/gallery/251206_2.jpg b/images/thumbs/gallery/251206_2.jpg new file mode 100644 index 0000000..7e0b55c Binary files /dev/null and b/images/thumbs/gallery/251206_2.jpg differ diff --git a/images/thumbs/gallery/251216.jpg b/images/thumbs/gallery/251216.jpg new file mode 100644 index 0000000..8f64271 Binary files /dev/null and b/images/thumbs/gallery/251216.jpg differ diff --git a/images/thumbs/gallery/251225.jpg b/images/thumbs/gallery/251225.jpg new file mode 100644 index 0000000..889559a Binary files /dev/null and b/images/thumbs/gallery/251225.jpg differ diff --git a/images/thumbs/gallery/260109.jpg b/images/thumbs/gallery/260109.jpg new file mode 100644 index 0000000..d373562 Binary files /dev/null and b/images/thumbs/gallery/260109.jpg differ diff --git a/images/thumbs/gallery/260203.jpg b/images/thumbs/gallery/260203.jpg new file mode 100644 index 0000000..73e79a8 Binary files /dev/null and b/images/thumbs/gallery/260203.jpg differ diff --git a/images/thumbs/gallery/260207_1.jpg b/images/thumbs/gallery/260207_1.jpg new file mode 100644 index 0000000..ef6f5a9 Binary files /dev/null and b/images/thumbs/gallery/260207_1.jpg differ diff --git a/images/thumbs/gallery/260207_2.jpg b/images/thumbs/gallery/260207_2.jpg new file mode 100644 index 0000000..8979ada Binary files /dev/null and b/images/thumbs/gallery/260207_2.jpg differ diff --git a/images/thumbs/gallery/260221.jpg b/images/thumbs/gallery/260221.jpg new file mode 100644 index 0000000..cb13cd8 Binary files /dev/null and b/images/thumbs/gallery/260221.jpg differ diff --git a/images/thumbs/gallery/260326.jpg b/images/thumbs/gallery/260326.jpg new file mode 100644 index 0000000..813912a Binary files /dev/null and b/images/thumbs/gallery/260326.jpg differ diff --git a/images/thumbs/gallery/260404.jpg b/images/thumbs/gallery/260404.jpg new file mode 100644 index 0000000..fb38eb2 Binary files /dev/null and b/images/thumbs/gallery/260404.jpg differ diff --git a/images/thumbs/gallery/260425.jpg b/images/thumbs/gallery/260425.jpg new file mode 100644 index 0000000..eebc8d8 Binary files /dev/null and b/images/thumbs/gallery/260425.jpg differ diff --git a/images/thumbs/gallery/260425_2.jpg b/images/thumbs/gallery/260425_2.jpg new file mode 100644 index 0000000..3be0490 Binary files /dev/null and b/images/thumbs/gallery/260425_2.jpg differ diff --git a/images/thumbs/gallery/260429.jpg b/images/thumbs/gallery/260429.jpg new file mode 100644 index 0000000..b232167 Binary files /dev/null and b/images/thumbs/gallery/260429.jpg differ diff --git a/images/thumbs/hero.jpg b/images/thumbs/hero.jpg new file mode 100644 index 0000000..13a6765 Binary files /dev/null and b/images/thumbs/hero.jpg differ diff --git a/images/thumbs/time/250524.jpg b/images/thumbs/time/250524.jpg new file mode 100644 index 0000000..c447e68 Binary files /dev/null and b/images/thumbs/time/250524.jpg differ diff --git a/images/thumbs/time/250826.jpg b/images/thumbs/time/250826.jpg new file mode 100644 index 0000000..45f7c12 Binary files /dev/null and b/images/thumbs/time/250826.jpg differ diff --git a/images/thumbs/time/251026.jpg b/images/thumbs/time/251026.jpg new file mode 100644 index 0000000..4037485 Binary files /dev/null and b/images/thumbs/time/251026.jpg differ diff --git a/images/thumbs/time/251031.jpg b/images/thumbs/time/251031.jpg new file mode 100644 index 0000000..f4c99fd Binary files /dev/null and b/images/thumbs/time/251031.jpg differ diff --git a/images/thumbs/time/251130.jpg b/images/thumbs/time/251130.jpg new file mode 100644 index 0000000..88d197b Binary files /dev/null and b/images/thumbs/time/251130.jpg differ diff --git a/images/thumbs/time/251206.jpg b/images/thumbs/time/251206.jpg new file mode 100644 index 0000000..309a44c Binary files /dev/null and b/images/thumbs/time/251206.jpg differ diff --git a/images/thumbs/time/260214.jpg b/images/thumbs/time/260214.jpg new file mode 100644 index 0000000..8886097 Binary files /dev/null and b/images/thumbs/time/260214.jpg differ diff --git a/index.html b/index.html index 16d9a5f..e46dcc1 100644 --- a/index.html +++ b/index.html @@ -95,7 +95,7 @@ align-items: stretch; justify-content: center; padding: 0; - background: #d8cbc4; + background: #f7f7f7; overflow: hidden; margin-left: -215px; transition: @@ -115,7 +115,7 @@ .hero-spacer { height: 100vh; height: 100svh; - background: #d8cbc4; + background: #f7f7f7; transition: height 420ms cubic-bezier(.2, .8, .2, 1); } @@ -128,7 +128,7 @@ height: 100%; display: block; object-fit: contain; - background: #d8cbc4; + background: #f7f7f7; image-rendering: auto; } @@ -743,7 +743,7 @@
- 김도아 돌잔치 초대장 + 김도아 돌잔치 초대장
@@ -937,6 +937,18 @@ img.src = DATA.images[img.dataset.img]; }); + const toThumbnailPath = (image) => { + if (image.startsWith("./images/")) { + return image.replace("./images/", "./images/thumbs/"); + } + + if (image.startsWith("/images/")) { + return image.replace("/images/", "/images/thumbs/"); + } + + return image; + }; + const openRouteLink = (event) => { const route = DATA.links[event.currentTarget.dataset.link]; const isMobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent); @@ -1082,7 +1094,7 @@ document.querySelector("#timeline").innerHTML = DATA.timeline.map(([date, text, image]) => `
- +
@@ -1104,7 +1116,7 @@ galleryGridSlides.innerHTML = galleryGroups.map((group) => `
`).join(""); @@ -1155,7 +1167,7 @@ }; document.querySelectorAll(".milestone img, .gallery-grid img, .slider .swiper-slide img").forEach((image) => { - image.addEventListener("click", () => openLightbox(image.currentSrc || image.src, image.alt)); + image.addEventListener("click", () => openLightbox(image.dataset.full || image.currentSrc || image.src, image.alt)); }); closeButton.addEventListener("click", closeLightbox); @@ -1232,6 +1244,7 @@ const heroSpacer = document.querySelector(".hero-spacer"); let touchStartY = 0; let isDismissed = false; + let isRestoringHero = false; if (!hero) { return; @@ -1242,8 +1255,28 @@ hero.classList.remove("is-dismissed"); heroSpacer?.classList.remove("is-collapsed"); + const showHero = () => { + if (!isDismissed || isRestoringHero) { + return; + } + + isRestoringHero = true; + isDismissed = false; + window.scrollTo({ top: 0, behavior: "auto" }); + heroSpacer?.classList.remove("is-collapsed"); + hero.classList.add("aos-init", "aos-animate"); + hero.classList.remove("is-dismissed"); + + window.setTimeout(() => { + isRestoringHero = false; + if (window.AOS) { + AOS.refreshHard(); + } + }, 460); + }; + const dismissHero = () => { - if (isDismissed) { + if (isDismissed || isRestoringHero) { return; } @@ -1291,6 +1324,14 @@ event.preventDefault(); dismissHero(); }); + + window.addEventListener("scroll", () => { + if (!isDismissed || window.scrollY > 1) { + return; + } + + showHero(); + }, { passive: true }); }; if (document.readyState === "complete") {