index.html 9.88 KB
<!DOCTYPE html>
    <head>
    
  </script>
        <meta charset="utf-8">
        <title>HTML5 GSAP Ad</title>
        <meta name="ad.size" content="width=300,height=600">
<!--
        <script type="text/javascript">
            
            // IAB source: modified to allow link testing
            var clickTag = "http://thecommonwell.ca/wave";
            function getParameterByName(name)
            {
                var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
                if (match == null || match == ""){
                    return clickTag;
                } else{
                    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
                }
            }
            clickTag = getParameterByName('clickTag');
            
        </script>
-->
        <script type="text/javascript" src="https://quickresource.eyereturn.com/eyebuild/eyebuild_1_19.js"></script>
        <script type="text/javascript">
            window.onload = function() {
            	eyeBuild.initialize();
            }        
        </script>
        
        
        <style>
            
            body{
                margin: 0;
                padding: 0;
                width: 300px;
                height: 600px;
                line-height: 1.2;
                font-size: 27px;
                letter-spacing: .4;
                color: #CD040B;
                font-family: "Neue Haas Grotesk", Arial, sans-serif;
                /*font-weight: 800;*/ /*BOLD-800, MEDIUM-600, ROMAN - 400*/
                font-style: normal;
            }
            
            a{
                text-decoration: none;
                color: inherit;
            }
            #border{
                position: relative;
                width: 300px;
                height: 600px;
                border: 1px solid #55565A;
                background-color: #282828;
                overflow: hidden;
                cursor: pointer;
				box-sizing: border-box;
				background: url(assets/background.jpg);
/* 				background: url(guide1.png); */
            }
            
            #logo{
                position: absolute;
                width: 69px;
                height: auto;
                right: 21px;
                bottom:28px;
                opacity: 0;
            }
            #legal{
                position: absolute;
                width: 180px;
                height: auto;
                left: 9px;
                bottom:6px;
            }
            #ey-frame{
                position: absolute;
                left: 21px;
                top:23px;
                z-index: 9;
            }
            #txt1a, #txt1b, #txt2 {
                position: absolute;
                width: 138px;
                height: auto;
                left: 51px;
                top:94px;
                z-index: 10;
                opacity: 0;
            }
            #txt1b{
                top:161px;
                width: 113px;
            }
            #txt2{
                left: 45px;
                width: 214px;
            }
            #cannon{
                position: absolute;
                left: 150px;
                top:270px;
            }
            #boy{
                position: absolute;
                left: 175px;
                top:310px;
            }
            #box-1, #box-2{
                position: absolute;
                left: 209px;
                top: 97px;
                width:33px;
                height: 33px;
                border: white 4px solid;
                opacity: 0;
                z-index: 10;
            }
            #box-2{
                top: 163px;
            }
            #gradient{
                position: absolute;
                opacity: .15;
            }
            #dot-1, #dot-2, #dot-3, #dot-txt{
                position: absolute;
                left: -12px;
                top: 104px;
                width:12px;
                height: 12px;
                background-color: #FFD400;
            }
            #dot-txt{
                left:-12px;
                top:131px;
                opacity: 1;
            }
            #cta{
                position: absolute;
                left: 26px;
                top:175px;
                width:207px;
                height: auto;
                opacity: 0;                
            }
            #tag1, #tag2, #tag3{
                position: absolute;
                left: 25px;
                top:129px;
                width:212px;
                height: auto;
                opacity: 0;
            }
            #tag2{
                width:198px;
            }
            #tag3{
                width:242px;
            }
            #tag-mask{
                position: absolute;
                width:0;
                height:100%;
                overflow: hidden;
            }
            #hash{
                position: absolute;
                left: 26px;
                top:223px;
                width:157px;
                height: auto;
                opacity: 0;
            }
            
            
            
        </style>
    </head>
    
    <body>
        <a href="javascript:eyeBuild.doClick(0)" class="cta">
        <div id="border">
            <img id="boy" src="assets/boy.png" alt="boy">
            <img id="cannon" src="assets/cannon.png" alt="cannon">
            <img id="logo" src="assets/logo.png" alt="logo">
            <img id="legal" src="assets/legal.png" alt="legal">
            <img id="txt1a" src="assets/txt1a.png" alt="txt1">
            <img id="txt1b" src="assets/txt1b.png" alt="txt1">
            <div id="box-1"></div>
            <div id="box-2"></div>
            <img id="txt2" src="assets/txt2.png" alt="txt2">

            <img id="gradient" src="assets/gradient.svg" alt="cta">
            <div id="dot-1"></div>
            <div id="dot-2"></div>
            <div id="dot-3"></div>

            <img id="cta" src="assets/cta.png" alt="cta">
            <div id="tag-mask">
                <img id="tag1" src="assets/tag1.png" alt="tag1">
                <img id="tag2" src="assets/tag2.png" alt="tag2">
                <img id="tag3" src="assets/tag3.png" alt="tag3">
            </div>
            <div id="dot-txt"></div>
            <img id="hash" src="assets/hash.png" alt="hash">
            
<!--
            
-->
            
        </div>
        </a>

    <!-- GREENSOCK-->
        <script src="assets/TweenMax.min.js"></script>
        <script src="assets/DrawSVGPlugin.min.js"></script>
        <script src="assets/ey-frame-svg-1.0.3.min.js"></script>
        
        <script>
            
            function stage1(){
            	var tl = new TimelineMax(); /* {repeat:2, repeatDelay:2} */
            	
                var d=.4;

                    
            	tl.to("#boy", .8, {left:150, top:270, ease:Power1.easeOut, delay:0 });
            	tl.to("#logo", .7, {opacity:1, ease:Power1.easeInOut, delay:-.5 });
            	
                var myeySvg = initEySvgFrame(12, 259, 218);
                document.getElementById("border").appendChild(myeySvg);
                animateEyFrame(1);
                animateGradient(.2);
                
            	tl.to("#txt1a", d, {opacity:1, ease:Power1.easeInOut, delay:1.8 });
            	tl.to("#box-1", d, {opacity:1, ease:Power1.easeInOut, delay:-.2 });
            	tl.to("#txt1b", d, {opacity:1, ease:Power1.easeInOut, delay:.1 });
            	tl.to("#box-2", d, {opacity:1, ease:Power1.easeInOut, delay:-.2 });
            	
            	tl.to("#txt1a", d, {opacity:0, ease:Power1.easeInOut, delay:1.5 });
            	tl.to("#box-1", d, {opacity:0, ease:Power1.easeInOut, delay:-d });
            	tl.to("#txt1b", d, {opacity:0, ease:Power1.easeInOut, delay:-d });
            	tl.to("#box-2", d, {opacity:0, ease:Power1.easeInOut, delay:-d });
                
                //animateFill(3.3);
            	tl.to("#txt2", d, {opacity:1, ease:Power1.easeInOut, delay:0 });
            	tl.to("#txt2", d, {opacity:0, ease:Power1.easeInOut, delay:4 });

                animateEyReverse(10);
                
                // phase 2
                
            	tl.to("#gradient",      d, {opacity:1, ease:Power1.easeInOut, delay:1 });
            	
            	tl.fromTo("#tag-mask",  d, {width:0}, {width:320, ease:Linear.easeNone, delay:-.2 });
            	tl.fromTo("#dot-txt",   d, {left:-12}, {left:312, ease:Linear.easeNone, delay:-d});
            	tl.to("#tag1",          d, {opacity:1, ease:Linear.easeNone, delay:-d });
            	tl.fromTo("#dot-1",     d, {left:-12, opacity:1}, {left:66, opacity:1, ease:Power3.easeOut, delay:0});
            	tl.to("#tag1",          d, {opacity:0, ease:Linear.easeNone, delay:2 });
            	
            	tl.fromTo("#tag-mask",  d, {width:0}, {width:320, ease:Linear.easeNone, delay:0 });
            	tl.fromTo("#dot-txt",   d, {left:-12}, {left:312, ease:Linear.easeNone, delay:-d});
            	tl.to("#tag2",          d, {opacity:1, ease:Linear.easeNone, delay:-d });
            	tl.fromTo("#dot-2",     d, {left:-12}, {left:46, ease:Power3.easeOut, delay:0});
            	tl.to("#tag2",          d, {opacity:0, ease:Linear.easeNone, delay:2 });

            	tl.fromTo("#tag-mask",  d, {width:0}, {width:320, ease:Linear.easeNone, delay:0 });
            	tl.fromTo("#dot-txt",   d, {left:-12}, {left:312, ease:Linear.easeNone, delay:-d});
            	tl.to("#tag3",          d, {opacity:1, ease:Linear.easeNone, delay:-d });
            	tl.fromTo("#dot-3",     d, {left:-12}, {left:26, ease:Power3.easeOut, delay:0});
            	
             	tl.to("#cta",           d, {opacity:1, ease:Linear.easeNone, delay:0 });
             	tl.to("#hash",          d, {opacity:1, ease:Linear.easeNone, delay:0 });
               

            		
            	console.log( "time: " + tl.totalDuration() );
            }

            //---------------------
            stage1();

            
        
        </script>
       
    </body>

</html>