1/*-----------------------------------------------� 2 * Root� 3-------------------------------------------------*/� 4var root = $("body").data('root');� 5var page = $("body").data('page');� 6/*-----------------------------------------------� 7 * COMMON� 8-------------------------------------------------*/� 9$(function(){� 10 // Anchor Smooth Scroll� 11 $(document).on('click', '.js-anchor', function(){� 12 var speed = 1000;� 13 var href= $(this).attr("href");� 14 var target = $(href == "#" || href == "" ? 'html' : href);� 15 var position = target.offset().top;� 16 $('body,html').animate({scrollTop:position}, speed, 'easeOutQuart');� 17 return false;� 18 });� 19 // Menu� 20 $('.js-menu').on('click', function(){� 21 $(this).toggleClass('is-active');� 22 � 23 if($(this).hasClass('is-active')){� 24 $('.js-header').addClass('is-active');� 25 $('.header__txtSlider').removeClass('--paused');� 26 $('body').css({'overflow':'hidden'});� 27 } else {� 28 $('.header__txtSlider').addClass('--paused'); � 29 $('.js-header').removeClass('is-active');� 30 $('body').css({'overflow':''});� 31 }� 32 });� 33� 34 $(document).on('click', '.js-navlink', function(){� 35 $('.header__txtSlider').addClass('--paused'); � 36 $(".js-header").removeClass("is-active");� 37 $(".js-menu").removeClass("is-active");� 38 $('body').css({'overflow':''});� 39 });� 40� 41 /**� 42 * Modal open� 43 */� 44 // Common� 45 $('.js-modalOpen').on('click', function(){� 46 var modalID = $(this).data('modal');� 47 $('#' + modalID).fadeIn(500);� 48 $('.modalBox').fadeIn(500);� 49 $('body').css({'overflow':'hidden'});� 50 });� 51� 52 /**� 53 * Modal close� 54 * iframeã®srcãcloseã®éã«æ¶ã� 55 */� 56 var $modalIF = $('.js-youtubeIframe');� 57� 58 // Closeå¦ç� 59 function modalClose() {� 60 $('.oneModal').fadeOut(500);� 61 $('.modalBox').fadeOut(500); � 62 setTimeout(function(){� 63 $modalIF.attr('src','');� 64 },500);� 65 $('body').css({'overflow':''});� 66 }� 67� 68 // Closeãã¿ã³� 69 $(document).on('click', '.js-modalClose', function(){� 70 modalClose();� 71 });� 72� 73 // Close ã¨ãªã¢å¤� 74 $('.js-oneModalIn').on('click touchend', function(e) {� 75 if (!$(e.target).closest('.js-oneModalIn__cont').length) {� 76 modalClose();� 77 }� 78 });� 79});� 80� 81/*-----------------------------------------------� 82 * text in span [plugin]� 83-------------------------------------------------*/� 84$.fn.txtSpan = function () {� 85 $(this).each(function () {� 86 let txt = $.trim(this.textContent),� 87 h = "";� 88 txt.split("").forEach(function (v) {� 89 h += "<span>" + v + "</span>";� 90 });� 91 this.innerHTML = h;� 92 });� 93}� 94$(function () {� 95 $(".js-txtSpan").txtSpan();� 96});� 97/*-----------------------------------------------� 98 * movie short� 99-------------------------------------------------*/� 100function movie(_ytid,_option){� 101 $('#youtubeModal').fadeIn(500);� 102 if(_option){� 103 $(".modalBox").attr('data-option',_option);� 104 }� 105 $('.modalBox').fadeIn(500);� 106 var ytURL = _ytid + '&autoplay=1';� 107 setTimeout(function(){� 108 $('.js-youtubeIframe').attr('src',ytURL);� 109 },100);� 110 $('body').css({'overflow':'hidden'});� 111}� 112/*-----------------------------------------------� 113 * ã¢ãã¡ã¼ã·ã§ã³� 114-------------------------------------------------*/� 115const visibleState = new Map();� 116const targets = document.querySelectorAll('.js-animate');� 117� 118// IntersectionObserverï¼ãã¹ã¦ã® .js-animate è¦ç´ ã®å¯è¦ç¶æ ãç£è¦� 119const observer = new IntersectionObserver((entries) => {� 120 entries.forEach(entry => {� 121 const el = entry.target;� 122 const isVisible = entry.isIntersecting;� 123 visibleState.set(el, isVisible);� 124� 125 el.classList.toggle('--paused', !isVisible);� 126 });� 127}, { threshold: 0.1 });� 128� 129targets.forEach(target => observer.observe(target));� 130� 131// ã¢ãã¡ã¼ã·ã§ã³å¦ç㯠data-interval / data-duration ãããè¦ç´ ã®ã¿ã«éå®� 132$(window).on('load', function () {� 133 targets.forEach(el => {� 134 const intervalAttr = el.dataset.interval;� 135 const durationAttr = el.dataset.duration;� 136� 137 // interval/duration ã®æå®ãããè¦ç´ ã ã対象ã«ãã� 138 if (intervalAttr && durationAttr) {� 139 const interval = parseInt(intervalAttr, 10);� 140 const duration = parseInt(durationAttr, 10);� 141� 142 setInterval(() => {� 143 if (visibleState.get(el)) {� 144 el.classList.add('--animate');� 145 setTimeout(() => {� 146 el.classList.remove('--animate');� 147 }, duration);� 148 }� 149 }, interval);� 150 }� 151 });� 152});� 153� 154/*-----------------------------------------------� 155 * ScrollAnimation for IntersectionObserver [.js-scrani è¦ç´ ãè¦ããã is-ani ãaddclass ãããã¤]� 156-------------------------------------------------*/� 157const set_scrani = () =>{� 158 const SCRANI_ACTIVE_CLASSNAME = 'is-ani';� 159 const scrani_callback = (entries) => {� 160 //å entryï¼IntersectionObserverEntry ãªãã¸ã§ã¯ãï¼ã«å¯¾ãã¦�
161 entries.forEach( (entry) => {� 162 //ç£è¦å¯¾è±¡ã®è¦ç´ ãé åå ã«å ¥ã£ãå ´åã®å¦ç� 163 if (entry.isIntersecting) {� 164 //ç£è¦å¯¾è±¡ã®è¦ç´ ï¼entry.targetï¼ã« is-ani ã¯ã©ã¹ã追å � 165 entry.target.classList.add(SCRANI_ACTIVE_CLASSNAME);� 166 }� 167 });� 168 }� 169 const scrani_option = {� 170 rootMargin: '-35% 0px',� 171 }� 172 const scrani_observer = new IntersectionObserver(scrani_callback, scrani_option);� 173� 174 const target_scrani = document.querySelectorAll('.js-scrani');� 175 //å ¨ã¦ã®ç£è¦å¯¾è±¡è¦ç´ ã observe() ã¡ã½ããã«æå®� 176 target_scrani.forEach( (elem) => {� 177 //observe() ã«ç£è¦å¯¾è±¡ã®è¦ç´ ãæå®� 178 scrani_observer.observe(elem);� 179 });� 180}� 181setTimeout(function(){� 182 set_scrani();� 183},200);� 184� 185/*-----------------------------------------------� 186 * ã©ã³ãã � 187-------------------------------------------------*/� 188$(function () {� 189 const randomDeco = [� 190 'deco_face1.svg',� 191 'deco_face2.svg',� 192 'deco_face3.svg',� 193 'deco_face5.svg',� 194 'deco_face6.svg',� 195 'deco_face7.svg',� 196 'deco_face8.svg'� 197 ];� 198� 199 // === â ãã¥ã¼ã¹ãªã³ã¯ ããã¼ã§ã©ã³ãã èæ¯ ===� 200 document.querySelectorAll('.news__link').forEach(link => {� 201 link.addEventListener('mouseenter', () => {� 202 const newsArrow = link.querySelector('.news__arrow');� 203 if (!newsArrow) return;� 204� 205 const selectNum = Math.floor(Math.random() * randomDeco.length);� 206 const imagePath = '../img/common/deco/' + randomDeco[selectNum];� 207 newsArrow.style.setProperty('--random-bg', `url(${imagePath})`);� 208 });� 209 });� 210� 211 // === â¡ ãããã¿ã³ è£ é£¾ã宿çã«åãæ¿ãï¼+ åè»¢ï¼ ===� 212 const $navBtnDeco = document.querySelector('.header__navBtn-deco');� 213 const $header = document.querySelector('.header');� 214� 215 if ($navBtnDeco) {� 216 let prevIndex = -1;� 217� 218 function getNewIndex() {� 219 let index;� 220 do {� 221 index = Math.floor(Math.random() * randomDeco.length);� 222 } while (index === prevIndex);� 223 prevIndex = index;� 224 return index;� 225 }� 226� 227 function updateNavBtnDeco() {� 228 if ($header && $header.classList.contains('is-active')) return;� 229� 230 const selectNum = getNewIndex();� 231 const imagePath = '../img/common/deco/' + randomDeco[selectNum];� 232� 233 $navBtnDeco.style.setProperty('--nav-btn-bg', `url(${imagePath})`);� 234� 235 $navBtnDeco.classList.remove('is-rotate');� 236 void $navBtnDeco.offsetWidth; � 237 $navBtnDeco.classList.add('is-rotate');� 238 }� 239� 240 updateNavBtnDeco(); � 241 setInterval(updateNavBtnDeco, 5000);� 242 }� 243});� 244� 245/*-----------------------------------------------� 246 * sub loading� 247-------------------------------------------------*/� 248$(window).on('load',function(){ � 249 $('body').addClass('--is-subload');� 250});�
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.