1//Change width and time on your desire 2 3 4 5initMarquee(290, 15) 6 7 8 9function initMarquee(boxWidth, time) { 10 const boxElement = $('.box'); 11 const boxLength = boxElement.length; 12 const wrapperWidth = boxWidth * boxLength; 13 const windowWidth = $(window).width(); 14 15 boxElement.parent().css('left', '-' + boxWidth + 'px'); 16 boxElement.css('width', boxWidth + 'px'); 17 18 gsap.set(".box", { 19 x: (i) => i * boxWidth 20 }); 21 22 gsap.to(".box", { 23 duration: time, 24 ease: "none", 25 x: "-=" + wrapperWidth, 26 modifiers: { 27 x: gsap.utils.unitize( 28 function (x) { 29 return parseFloat(x + windowWidth + boxWidth) % wrapperWidth 30 } 31 ) 32 }, 33 repeat: -1 34 }); 35 36} 37 38 39//SCROLL PORTFOLIO 40 41gsap.registerPlugin(ScrollTrigger); 42 43 44 45setTimeout(()=>{ 46 const projs = document.querySelector(".projs"); 47console.log(projs.offsetWidth) 48 49function getScrollAmount() { 50 let projsWidth = projs.scrollWidth; 51 return -(projsWidth - window.innerWidth); 52} 53 54const tween = gsap.to(projs, { 55 x: getScrollAmount, 56 duration: 3, 57 ease: "none", 58}); 59 60 61ScrollTrigger.create({ 62 trigger:".projs", 63 start:"center center", 64 end: () =>
64 `+=${getScrollAmount() * -1}`, 65 pin:true, 66 animation:tween, 67 scrub:1, 68 invalidateOnRefresh:true, 69 70}) 71 72 73 74 75 76//NUMEROS ROLANDO 77$(".counts").each(function(index, element) { 78 var count = $(this), 79 zero = {val:0}, 80 num = count.data("number"), 81 split = (num + "").split("."), 82 decimals = split.length > 1 ? split[1].length : 0; 83 84 gsap.to(zero, { 85 val: num, 86 duration: 3, 87 ease:"power4.out", 88 scrollTrigger: element, 89 onUpdate: function() { 90 count.text(zero.val.toFixed(decimals)); 91 } 92 }); 93 }); 94},700) 95 96 97const idsOnLoad = ["#banner h1"]; 98const ids = [".home .btn1", "#o-que-voce-recebe","#o-que-voce-recebe .wp-block-button", ".container-spinner", ".col-sobre-mim:nth-of-type(1)", "#vamos-trabalhar-juntos", "#vamos-trabalhar-juntos h2", "#vamos-trabalhar-juntos .wp-block-button"]; 99const imagesScrollPost = document.querySelectorAll(".post-stagger-scroll-image figure"); 100const idsToLeft = [".col-sobre-mim:nth-of-type(2)"]; 101const timeoutDuration = window.location.pathname === "/" ? 500 : 50; 102 103 104const tl = gsap.timeline(); 105 106 107ids.forEach((id)=>{ 108 gsap.set(`${id}`, { 109 opacity:0, 110}) 111}) 112 113idsToLeft.forEach((idToLeft)=>{ 114 gsap.set(`${idToLeft}`, { 115 opacity:0, 116 x: 300 117}) 118}) 119 120 121//CORREÃÃES 122 123gsap.set(".upper-wrapper", { 124 y:-100, 125}) 126gsap.set("#header", { 127 opacity: 0, 128 y: -300 129}) 130gsap.set("#banner h1, .banner-text p, .portfolio-projs li, #footer, #post div, .projs li, .post-stagger, .post-stagger-scroll-image figure, .intro-col, .wpforms-field", { 131 opacity: 0 132}) 133gsap.set(".banner-text .wp-block-column:nth-of-type(1)",{ 134 x: -1000, 135 opacity: 0 136}) 137 138gsap.set(".single-item-wrapper", { 139 opacity: 0, 140 y:300 141}) 142 143gsap.set("#links-page img, #links-page .wp-block-button, #links-page h2, #links-page figure", { 144 opacity: 0 145}) 146 147 148 149 150 151 152setTimeout(()=>{ 153gsap.to(".projs li", { 154 opacity: 1, 155 stagger: .2, 156 scrollTrigger: { 157 trigger: ".projs", 158 start: "top top", 159 end: "+=100" 160 161 } 162 }) 163 164setTimeout(()=>{ 165gsap.to(".upper-wrapper", { 166 y:0, 167 duration: 1, 168 ease:"power1,inOut" 169}) 170 gsap.to("#header", { 171 y:0, 172 opacity: 1, 173 delay:.5, 174 duration:1, 175 ease: "power1,inOut" 176 }) 177 178 gsap.to("#banner h1", { 179 opacity: 1, 180 delay:1, 181 duration: 1, 182 ease: "power1,inOut" 183 }) 184 tl.to(".banner-text .wp-block-column:nth-of-type(1)",{ 185 x: 0, 186 opacity: 1, 187 duration: 1, 188 delay:1, 189 ease:"power1,inOut" 190 }) 191 tl.to(".banner-text p",{ 192 opacity: 1, 193 duration: .5, 194 ease:"power1,inOut" 195}) 196 197 198 199gsap.to(".single-item-wrapper, .portfolio-projs li, #post div",{ 200 y:0, 201 opacity: 1, 202 stagger:0.2, 203 scrollTrigger: { 204 trigger: ".carousel-wrapper", 205 start: "top bottom", 206 } 207}) 208 209 gsap.to("#footer", { 210 opacity: 1, 211 duration: 1, 212 scrollTrigger: { 213 trigger: "#footer", 214 start:"top bottom", 215 } 216 }) 217 218 219gsap.to(".post-stagger", { 220 opacity: 1, 221 duration: 1, 222 stagger: 0.2 223}) 224 225gsap.to(".intro-col", { 226 opacity: 1, 227 duration: 1, 228 delay:1.5, 229 stagger: 0.2 230}) 231gsap.to(".wpforms-field", { 232 opacity: 1, 233 duration: 1, 234 delay: 2, 235 stagger: 0.2 236}) 237 238 gsap.to("#links-page img, #links-page .wp-block-button, #links-page h2, #links-page figure", { 239 opacity: 1, 240 duration: 1, 241 stagger: .2, 242}) 243 244//FUNCOES AUTOMATIZADAS 245 246ids.forEach((id)=>{ 247 gsap.to(`${id}`, { 248 opacity:1, 249 scrollTrigger: { 250 trigger: `${id}`, 251 start: 'top 85%', 252 end: '+=50', 253 scrub: 2, 254 } 255}) 256}) 257 258idsToLeft.forEach((idToLeft)=>{ 259 gsap.to(`${idToLeft}`, { 260 opacity:1, 261 x:0, 262 scrollTrigger: { 263 trigger: `${idToLeft}`, 264 start: 'bottom bottom', 265 end: 'center center', 266 scrub: 1, 267 } 268}) 269}) 270 271imagesScrollPost.forEach((postScroll) => { 272 gsap.to(postScroll, { 273 opacity: 1, 274 scrollTrigger: { 275 trigger: postScroll, 276 start: "top bottom", 277 end: "top center", 278 scrub: 1, 279 }, 280 }); 281}); 282 [ 283 ["wpforms-2215-field_11_21", "wpforms-2215-field_21"], 284 ["wpforms-2215-field_11_20", "wpforms-2215-field_19"] 285 ].forEach(([checkboxId, boxId]) => { 286 let checkbox = document.getElementById(checkboxId); 287 let box = document.getElementById(boxId); 288 checkbox.addEventListener("click", () => { 289 box.style.display = checkbox.checked ? "flex" : "none"; 290 }); 291 }); 292 293},1000) 294 295 296 297 298 299 300},timeoutDuration) 301
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.