1document.addEventListener("DOMContentLoaded", function () { 2 // --- ããã¹ãã®ãã§ã¼ãã¤ã³å¦ç --- 3 const textWrapper = document.querySelector(".heroTextWrapper"); 4 if (textWrapper) { 5 // ãã¼ã¸ãã¼ãå¾ã100msï¼ã»ãã®ä¸ç¬ï¼é ããã¦çºç«ãããã¨ã¹ã ã¼ãºã§ã 6 setTimeout(() => { 7 textWrapper.classList.add("is-visible"); 8 }, 100); 9 } 10 11 // --- æ¢åã®ã¹ã©ã¤ãã¼å¦ç --- 12 function initializeHeroSlider(containerId) { 13 const container = document.querySelector(`#${containerId}`); 14 if (!container) return; 15 16 const slides = container.querySelectorAll(".heroSlide"); 17 const dots = container.querySelectorAll(".heroIndicatorDot"); 18 const totalSlides = slides.length; 19 let currentSlide = 0; 20 let autoPlayInterval; 21 22 function showHeroSlide(index) { 23 slides.forEach((slide, i) => { 24 slide.style.opacity = i === index ? 1 : 0; 25 }); 26 27 dots.forEach((dot, i) => { 28 if (i === index) { 29 dot.classList.add("isIndicatorActive"); 30 } else { 31 dot.classList.remove("isIndicatorActive"); 32 } 33 }); 34 35 currentSlide = index; 36 } 37 38 function nextHeroSlide() { 39 let nextIndex = (currentSlide + 1) % totalSlides; 40 showHeroSlide(nextIndex); 41 } 42 43 function startHeroAutoPlay() { 44 autoPlayInterval = setInterval(nextHeroSlide, 5000); 45 } 46 47 dots.forEach((dot, i) => { 48 dot.addEventListener("click", () => { 49 clearInterval(autoPlayInterval); 50 showHeroSlide(i); 51 startHeroAutoPlay(); 52 }); 53 }); 54 55 showHeroSlide(0); 56 startHeroAutoPlay(); 57 } 58 59 initializeHeroSlider("heroSliderContainer"); 60}); 61 62// GSAPã¨ScrollTriggerãã©ã°ã¤ã³ãæå¹å 63gsap.registerPlugin(ScrollTrigger); 64 65document.addEventListener("DOMContentLoaded", function () { 66 const isSp = window.innerWidth <= 767; 67 68 // ã¢ãã¡ã¼ã·ã§ã³ã®ã¿ã¤ã ã©ã¤ã³å®ç¾© 69 // ããªã¬ã¼ãã»ã¯ã·ã§ã³å ¨ä½ï¼.anxietySectionï¼ã«ãã¦ä¸ããä¸ã¸ã®é£åæ§ãæ ä¿ 70 const anxietyTl = gsap.timeline({ 71 scrollTrigger: { 72 trigger: ".anxietySection", 73 start: "top 70%", // ã¹ã¯ãã¼ã«ã«åããã¦å°ãæ©ãã«å§å 74 toggleActions: "play none none reverse", 75 }, 76 }); 77 78 // 1. ä¸ã®ã¡ã¤ã³ã¿ã¤ãã«ããµãã£ã¨ä¸ã«æµ®ãä¸ãããã 79 anxietyTl.from(".anxietyMainQuestion", { 80 y: 20, 81 opacity: 0, 82 duration: 0.6, 83 ease: "power2.out", 84 }); 85 86 // 2. ä¸å¤®ã®äººç©ã¤ã©ã¹ãï¼ã¿ã¤ãã«ã®çµããéã«è¢«ãã¦ã¹ã¿ã¼ãï¼ 87 anxietyTl.from( 88 ".anxietyPartPeople", 89 { 90 y: 30, 91 opacity: 0, 92 duration: 0.7, 93 ease: "power2.out", 94 }, 95 "-=0.3", // ã¿ã¤ãã«åºç¾ã®å¾åããéãã 96 ); 97 98 // 3. å¹ãåºã1ã4ï¼ãã³ãã³åãè¨å®ï¼ 99 const balloonEase = "back.out(1.5)"; 100 anxietyTl 101 .from( 102 ".balloon1", 103 { 104 scale: 0.4, 105 opacity: 0, 106 duration: 0.55, 107 transformOrigin: isSp ? "28% 25%" : "23% 28%", 108 ease: balloonEase, 109 }, 110 "-=0.25", 111 ) 112 .from( 113 ".balloon2", 114 { 115 scale: 0.4, 116 opacity: 0, 117 duration: 0.55, 118 transformOrigin: isSp ? "72% 25%" : "77% 28%", 119 ease: balloonEase, 120 }, 121 "-=0.4", 122 ) 123 .from( 124 ".balloon3", 125 { 126 scale: 0.4, 127 opacity: 0, 128 duration: 0.55, 129 transformOrigin: isSp ? "30% 55%" : "18% 55%", 130 ease: balloonEase, 131 }, 132 "-=0.4", 133 ) 134 .from( 135 ".balloon4", 136 { 137 scale: 0.4, 138 opacity: 0, 139 duration: 0.55, 140 transformOrigin: isSp ? "70% 55%" : "82% 55%", 141 ease: balloonEase, 142 }, 143 "-=0.4", 144 ); 145 146 // 4. ä¸ã®è§£æ±ºã¡ãã»ã¼ã¸ã¨ãªã¢ï¼ã¿ã¤ãã«ã¨èª¬ææãæéå·®ã§ãã§ã¼ãã¤ã³ 147 anxietyTl.from( 148 [".anxietySolutionTitle", ".anxietySolutionDescription"], 149 { 150 y: 20, // åããå°ãä¸åã«æãã 151 opacity: 0, 152 duration: 0.6, 153 stagger: 0.15, // ã¿ã¤ãã«ãã0.15ç§ãºã©ãã¦èª¬ææã表示 154 ease: "power2.out", 155 }, 156 "-=0.2", // æå¾ã®å¹ãåºããåºå§ãããããã§å§å 157 ); 158 159 // 5. ãä¿®æ£ããã¿ã³åä½ã®ç»å ´ã¢ãã¡ã¼ã·ã§ã³ 160 // ä¸ã¸ã®ç§»åéãã10pxãã«æãããã¨ã§ãä¸èªç¶ãªé£ã³è·³ãæãè§£æ¶ã 161 // å ã®CSSã®å®ä½ç½®ï¼translateY(0)ï¼ã¸æ»ããã«å¸ãä»ãããã«çå°ããã¾ãã 162 anxietyTl.from( 163 ".anxietyServiceButton", 164 { 165 y: 10, // 10pxä¸ããéãã«ç¾ãã 166 opacity: 0, 167 duration: 0.5, 168 ease: "power1.out", // ç·©ããã«æ¸éããã¤ã¼ã¸ã³ã° 169 },
170 "-=0.25", // 説ææã®ãã§ã¼ãã¤ã³ã«å°ã被ãã 171 ); 172 173 // â éè¦â ç»å ´ãçµãã£ãç¬éãGSAPã®ã¤ã³ã©ã¤ã³ã¹ã¿ã¤ã«ãåé¤ãã¦CSSï¼:hoverï¼ã«ããã³ã¿ãã 174 anxietyTl.set(".anxietyServiceButton", { clearProps: "all" }); 175}); 176 177// ========================================== 178// ä½åã¹ã©ã¤ãã¼ã®è¨å®ï¼å¤æ´ãªãï¼ 179// ========================================== 180const worksSlideSpeedPC = 11000; 181const worksSlideSpeedSP = 7000; 182 183window.addEventListener("load", function () { 184 const topWorksSwiper = new Swiper("#topWorksSwiper", { 185 loop: true, 186 allowTouchMove: false, 187 188 // â JSã§ã¹ã©ã¤ãã¼å ¨ä½ã®åãããå³ããå·¦ï¼Right to Leftï¼ãã«è¨å® 189 dir: "rtl", 190 191 autoplay: { 192 delay: 0, 193 disableOnInteraction: false, 194 // reverseDirection ã¯ä¸è¦ï¼ç«¶åãã¦æ¢ã¾ãåå ã«ãªãããåé¤ï¼ 195 }, 196 197 speed: worksSlideSpeedSP, 198 199 breakpoints: { 200 768: { 201 slidesPerView: 3.5, 202 spaceBetween: 30, 203 speed: worksSlideSpeedPC, 204 }, 205 0: { 206 slidesPerView: 1.5, 207 spaceBetween: 15, 208 }, 209 }, 210 }); 211}); 212 213document.addEventListener("DOMContentLoaded", function () { 214 // 1. ä¸å±¤ãããã¼ã®ã¢ãã¡ã¼ã·ã§ã³çºç«ï¼ãããã§ã«ããã°ããã«è¨è¿°ï¼ 215 const headInner = document.querySelector(".headSection .inner"); 216 if (headInner) { 217 setTimeout(() => { 218 headInner.classList.add("is-visible"); 219 }, 100); 220 } 221 222 // 2. ãµã¼ãã¹ç´¹ä»ã»ã¯ã·ã§ã³ã®ã¹ã¯ãã¼ã«ç£è¦ 223 const serviceSection = document.querySelector(".serviceIntroSection"); 224 225 if (serviceSection) { 226 // ç»é¢ã«è¦ç´ ãã©ããããå ¥ã£ããçºç«ããããã®è¨å® 227 const observerOptions = { 228 root: null, // ãã©ã¦ã¶ã®ç»é¢å ¨ä½ãåºæºã«ãã 229 rootMargin: "0px", 230 threshold: 0.2, // è¦ç´ ã20%ãããç»é¢ã«å ¥ã£ããçºç« 231 }; 232 233 const observer = new IntersectionObserver(function (entries, observer) { 234 entries.forEach((entry) => { 235 // ç»é¢å ã«å ¥ã£ããã¯ã©ã¹ãä»ä¸ 236 if (entry.isIntersecting) { 237 entry.target.classList.add("is-visible"); 238 observer.unobserve(entry.target); // ä¸åº¦çºç«ãããç£è¦ãçµäºããï¼ãã©ã¤ã鲿¢ï¼ 239 } 240 }); 241 }, observerOptions); 242 243 // ç£è¦ãéå§ 244 observer.observe(serviceSection); 245 } 246}); 247 248// SHOWROOMãã¼ã¸ menuã®ã¹ã¯ãã¼ã«æã®è²å¤å 249document.addEventListener("DOMContentLoaded", () => { 250 // å¤å®å¯¾è±¡ã®ã»ã¯ã·ã§ã³ãé åã§åå¾ 251 const targetSections = [ 252 document.getElementById("kitchenSection"), 253 document.getElementById("bathroomSection"), 254 document.getElementById("toiletSection"), 255 document.getElementById("washroomSection"), 256 ].filter((el) => el !== null); 257 258 const sidebarNavLinks = document.querySelectorAll(".sidebarNavList a"); 259 260 const changeSectionColorOnScroll = () => { 261 // ç»é¢å¹ ãPCãµã¤ãºï¼768px以ä¸ï¼ã®æã ãã¡ãã¥ã¼è²å¤æ´ãå®è¡ 262 if (window.innerWidth >= 768) { 263 let currentSectionId = ""; 264 265 // åºå®ãããã¼ã®æå¤§é«ãï¼96pxï¼ã«å°ãä½è£ãæãããä½ç½®ï¼180pxï¼ãå¤å®ã®ã©ã¤ã³ã«ãã 266 const triggerPoint = 180; 267 268 targetSections.forEach((section) => { 269 // ç»é¢æä¸é¨ããåã»ã¯ã·ã§ã³ã®é ã¾ã§ã®ããªã¢ã«ã¿ã¤ã ã®è·é¢ããåå¾ 270 const sectionRectTop = section.getBoundingClientRect().top; 271 272 // ã»ã¯ã·ã§ã³ã®é ãããªã¬ã¼ã©ã¤ã³ããä¸ï¼ï¼ãããã¼ä»è¿ã¾ã§ã¹ã¯ãã¼ã«ãããï¼ãªã 273 if (sectionRectTop <= triggerPoint) { 274 currentSectionId = section.getAttribute("id"); 275 } 276 }); 277 278 // 䏿¦ãã¹ã¦ã®ã¡ãã¥ã¼ã®ã¢ã¯ãã£ãã¯ã©ã¹ãæ¶ããç¾å¨å°ã ãã«ä»ä¸ 279 sidebarNavLinks.forEach((link) => { 280 link.classList.remove("is-active"); 281 if (link.getAttribute("href") === `#${currentSectionId}`) { 282 link.classList.add("is-active"); 283 } 284 }); 285 } 286 287 // æ¢åã®å ¨ä½ç¨ã¹ã¯ãã¼ã«å¦çï¼section.active-colorç¨ï¼ 288 const scrollPosition = window.scrollY; 289 const allSections = document.querySelectorAll("section"); 290 allSections.forEach((section) => { 291 const sectionTop = section.offsetTop; 292 const sectionHeight = section.offsetHeight; 293 if ( 294 scrollPosition + window.innerHeight - 200 > sectionTop && 295 scrollPosition + 200 < sectionTop + sectionHeight 296 ) { 297 section.classList.add("active-color"); 298 } else { 299 section.classList.remove("active-color"); 300 } 301 }); 302 }; 303 304 window.addEventListener("scroll", changeSectionColorOnScroll); 305 changeSectionColorOnScroll(); // åæèªã¿è¾¼ã¿æã«ãå¤å®ãå®è¡ 306 307 // --- 以ä¸ãæ¢åã®éãªãæ¤ç¥å¦çï¼ãã®ã¾ã¾ç¶æï¼ --- 308 const sidebarNavListItems = document.querySelectorAll(".sidebarNavList li"); 309 const fullWidthImage = document.querySelector(".fullWidthAspectRatioImage"); 310 311 if (fullWidthImage) { 312 const checkOverlapForNav = () => { 313 const imageRect = fullWidthImage.getBoundingClientRect();
314 sidebarNavListItems.forEach((listItem) => { 315 const link = listItem.querySelector("a"); 316 if (!link) return; 317 const linkRect = link.getBoundingClientRect(); 318 const isOverlapping = !( 319 imageRect.right < linkRect.left || 320 imageRect.left > linkRect.right || 321 imageRect.bottom < linkRect.top || 322 imageRect.top > linkRect.bottom 323 ); 324 if (isOverlapping) { 325 link.classList.add("overlapped"); 326 } else { 327 link.classList.remove("overlapped"); 328 } 329 }); 330 }; 331 window.addEventListener("scroll", checkOverlapForNav); 332 checkOverlapForNav(); 333 } 334}); 335 336// Modal JS 337document.addEventListener("DOMContentLoaded", function () { 338 const modalId = "galleryImageModal"; 339 340 // 1. ã¢ã¼ãã«è¦ç´ ãçæãã¦bodyæ«å°¾ã«è¿½å 341 if (!document.getElementById(modalId)) { 342 document.body.insertAdjacentHTML( 343 "beforeend", 344 ` 345 <div id="${modalId}" class="galleryImageModal"> 346 <span class="modalClose">×</span> 347 <img class="modalContent" id="modalImageTarget"> 348 </div> 349 `, 350 ); 351 } 352 353 const modalElement = document.getElementById(modalId); 354 const modalImg = document.getElementById("modalImageTarget"); 355 const closeBtn = modalElement.querySelector(".modalClose"); 356 357 // ãã§ã¼ãã¢ã¦ãå¦ç 358 function closeModal() { 359 modalElement.classList.remove("modalVisible"); 360 } 361 362 // 2. ã®ã£ã©ãªã¼ç»åï¼modalTriggerã¯ã©ã¹ï¼ãåå¾ãã¦ã¯ãªãã¯ã¤ãã³ãç»é² 363 const triggers = document.querySelectorAll(".modalTrigger"); 364 365 triggers.forEach((img) => { 366 img.addEventListener("click", function () { 367 modalImg.src = this.src; 368 modalImg.alt = this.alt; 369 modalElement.classList.add("modalVisible"); 370 }); 371 }); 372 373 // 3. éããæä½ã®è¨å® 374 if (closeBtn) { 375 closeBtn.addEventListener("click", closeModal); 376 } 377 378 // èæ¯ã¯ãªãã¯ã§éãã 379 modalElement.addEventListener("click", function (event) { 380 if (event.target === modalElement) { 381 closeModal(); 382 } 383 }); 384 385 // Escãã¼ã§éãã 386 document.addEventListener("keydown", function (event) { 387 if ( 388 event.key === "Escape" && 389 modalElement.classList.contains("modalVisible") 390 ) { 391 closeModal(); 392 } 393 }); 394}); 395 396// ã¹ã¯ãã¼ã«ã¢ãã¡ã¼ã·ã§ã³ã®å ±éè¨å® 397document.addEventListener("DOMContentLoaded", () => { 398 // ç£è¦å¯¾è±¡ã«ããè¦ç´ ã®ãªãã·ã§ã³è¨å® 399 const animOptions = { 400 root: null, // ãã¥ã¼ãã¼ãï¼ç»é¢ï¼ãåºæºã«ãã 401 rootMargin: "0px 0px -10% 0px", // ç»é¢ã®ä¸ç«¯ãã10%å å´ã«å ¥ã£ã段éã§çºå 402 threshold: 0, // 1pxã§ãå ¥ã£ããããªã¬ã¼ 403 }; 404 405 // 交差ããã¨ãã«å®è¡ãã颿° 406 const animObserver = new IntersectionObserver((entries, observer) => { 407 entries.forEach((entry) => { 408 // è¦ç´ ãç»é¢å ã«å ¥ã£ã¦ããå ´å 409 if (entry.isIntersecting) { 410 entry.target.classList.add("isVisible"); // åºç¾ã¯ã©ã¹ãä»ä¸ 411 observer.unobserve(entry.target); // ä¸åº¦çºåãããç£è¦ãè§£é¤ï¼è² è·è»½æ¸ï¼ 412 } 413 }); 414 }, animOptions); 415 416 // ã.scrollAnimããã¤ããã¿ã°ããã¹ã¦éãã¦ç£è¦ãéå§ 417 const animElements = document.querySelectorAll(".scrollAnim"); 418 animElements.forEach((element) => { 419 animObserver.observe(element); 420 }); 421});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.