diff --git a/js/animations_custom.js b/js/animations_custom.js index b378343..41906ba 100644 --- a/js/animations_custom.js +++ b/js/animations_custom.js @@ -12,6 +12,12 @@ enable_animations = true const rotateYCard = '200deg' const offsetCard = '10' +let innerWidth = window.innerWidth; +document.onresize(event=> { + innerWidth = window.innerWidth; + console.log('innerWidth', innerWidth) +}) + function animateCard (id, side) { console.log('animateCard', '#content-' + id + ' .flip-handle', side, offsetCard) @@ -86,6 +92,7 @@ if (enable_animations) { }) + gsap.to('#main_title', { delay: 1, // xPercent: ()=>nav.offsetHeight, @@ -94,7 +101,7 @@ if (enable_animations) { scrub: 1, markers: development_debug, }, - top: '15vw', + top: innerWidth > 1300 ? '15vw' : '30vw', width: '-40vw', })