index.html 5.53 KB
<!DOCTYPE html>
    <head>
    
        <meta charset="utf-8">
        <title>HTML5 GSAP Ad</title>
        <script type="text/javascript">
            
/*
            // IAB source: modified to allow link testing
            var clickTag = "https://huntsvillehospitalfoundation.ca";
            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: 250px;
                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: absolute;
                width: 300px;
                height: 250px;
                border: none;
                background:white;
                overflow: hidden;
                cursor: pointer;
				box-sizing: border-box;
            }
            img{
                position: absolute;
            }
            #txt1 {
                position: absolute;
                opacity: 0;
                top:65px;
                left:55px;
                text-transform: uppercase;
                width:185px;
            }
            #txt2 {
                position: absolute;
                opacity: 1;
                top:-40px;
                left:45px;
                display: inline-block;
                width:215px;
            }
            #txt3 {
                position: absolute;
                opacity: 1;
                bottom:-40px;
                left:72px;
                display: inline-block;
                width:155px;
            }
            #img1 {
                transform: scale(0);
                -webkit-box-shadow: -8px 13px 23px -2px rgba(0,0,0,0.2);
                -moz-box-shadow: -8px 13px 23px -2px rgba(0,0,0,0.2);
                box-shadow: -8px 13px 23px -2px rgba(0,0,0,0.2);
                top:-85px;
            }
            #img2 {
                position: absolute;
                top:-80px;
                left:45px;
                width:215px;
            }
            
        </style>
    </head>
    
    <body>
        <a href="javascript:eyeBuild.doClick(0)" class="cta">
<!--         <a href="javascript:window.open(clickTag, '_blank');" class="cta"> -->
            <div id="border">

                    <img id='img1' src='assets/Y_Cover_300p.jpg' />

                    <img id='txt1' src='assets/txt1.svg' />

                    <img id='txt2' src='assets/txt2.svg' />

                    <img id='img2' src='assets/Y.svg' />

                    <img id='txt3' src='assets/txt3.svg' />

            </div>
        </a>


    <!-- GREENSOCK-->
        <script src="assets/TweenMax.min.js"></script>
        
        <script>
            
            var tl = new TimelineMax({repeat:1, repeatDelay:5});

            function stage1(){
                
                // tl.to("#txt1", 2, {opacity:1, delay:0.5 });
                // tl.to("#txt1", 0.7, {opacity:0, delay:1 }, 'text_animation');
                // tl.to("#txt2", 1, {opacity:1, css:{top:"65px"}, delay:1 }, 'text_animation');
                // tl.to("#txt2", 0.7, {opacity:0, delay:4 }, "text_animation");
                // tl.to("#img2", 1, {top:'20px', delay:4}, "text_animation");
                // tl.to("#img2", 1.5, {css:{scale:0.43,top:"10px"}, delay:2}, "scale_animation");
                // tl.to("#img1", 1.5, {css:{scale:0.43,top:"-85px"}, delay:2}, "scale_animation");
                // tl.to("#txt3", 0.5, {css:{bottom:"12px"}, delay:3}, "scale_animation");
                
                
                tl.to("#img1", 0.7, {css:{scale:1,top:0}, delay:0.5 });
                tl.to("#txt1", 1.5, {opacity:1, delay:0 });
                tl.to("#txt1", 0.7, {opacity:0, delay:1 }, 'text_animation');
                tl.to("#txt2", 0.7, {opacity:1, css:{top:"65px"}, delay:1 }, 'text_animation');
                tl.to("#txt2", 0.7, {opacity:0, delay:4 }, "text_animation");
                tl.to("#img2", 0.7, {top:'20px', delay:4}, "text_animation");
                tl.to('#border', 0, {css:{background:'#b3b3b3'}}, 'scale_animation');
                tl.to("#img2", 0.7, {css:{scale:0.43,top:"10px"}, delay:1.5}, "scale_animation");
                tl.to("#img1", 0.7, {css:{scale:0.43,top:"-85px"}, delay:1.5}, "scale_animation");
                tl.to("#txt3", 0.5, {css:{bottom:"12px"}, delay:2.2}, "scale_animation");


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

            
        
        </script>
       
    </body>

</html>