index.html 6.11 KB
<!DOCTYPE html>
    <head>
       
        <meta charset="utf-8">
        <title>HTML5 Ad</title>
        
        <script type="text/javascript">
            
            // IAB source: modified to allow link testing
            var clickTag = "http://westperthvillage.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>
       
        <style>
            
            body{
                margin: 0;
                padding: 0;
                width: 300px;
                height: 600px;
                line-height: 1.2;
                font-size: 27px;
                letter-spacing: .4;
                background:white;
                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: #FFFFFF;
                overflow: hidden;
                cursor: pointer;
				box-sizing: border-box;
            }
            
            .img1 {
                opacity:0;
            }

            .img2 {
              opacity: 0;
            }

            .img3 {
                opacity: 0;
            }

            #copy {
                position: absolute;
                width:100%;
                top:0;
                text-align: center;
                max-width: 300px;

            }

            #copy .txt2 {
                position: absolute;
                top:45px;
                left:40px;
                opacity: 0;
            }

            #copy .txt3 {
                opacity: 0;
                position: absolute;
                top:125px;
                left:40px;
            }

            #copy .txt1 {
                position: absolute;
                top:45px;
                left:40px;
                opacity: 0;
            }

            #logo{
              position: absolute;
              z-index: 11;
              top:45px;
              left:40px;
            }

            #logo img {
                opacity: 0;
            }

            #img img {
                position: absolute;
                top:0;
            }

            .circles {
                position: absolute;
                bottom:0;
                right:20px;
            }

            #last-frame {
                opacity:0;
                position: absolute;
                top:145px;
                left:15px;
            }

            hr {
                border:1px solid #2C5435;
                position: relative;
                width:230px;
                border-radius: 10px;
            }

            .img4 {
                position: relative;
                left:20px;
                top:50px;
            }

            .txt4 {
                padding:30px 0; 
            }

            
        </style>
        
    </head>
    
    <body>
            <a id="click-tag" href="javascript:window.open(window.clickTag)">
        <div id="border">

            <div id="logo">
                <img src="./assets/logo.png" alt="WestPerthVillage Logo">
            </div>

            <div id='last-frame'>
                <hr />
                <img class='txt4' src="./assets/txt4.png" alt="" >
                <hr />
                <img class='img4' src="./assets/donate_btn.png" alt="img" >
            </div>
            
                <div id="img">
                    <img class='img1' src="./assets/img_1@2x.png" alt="img" width="300" >
                    <img class='img2' src="./assets/img_2@2x.png" alt="img" width="300" >
                    <img class='img3' src="./assets/img_3@2x.png" alt="img" width="300" >
                </div>
                
                <div id="copy">
                  <img class='txt1' src="./assets/txt1.png" alt="" >
                  <img class='txt2' src="./assets/txt2.png" alt="" >
                  <img class='txt3' src="./assets/txt3.png" alt="" >
                </div>

                <img class='circles' src="./assets/circles.png" alt="" >

            <!-- <a id="click-tag" href="javascript:eyeBuild.doClick(0)"></a> -->
        </div>
    </a>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
        
        <script>


            function ready(fn) {
                if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
                fn();
                } else {
                document.addEventListener('DOMContentLoaded', fn);
                }
            }


            function stage1(){

                var tl = new TimelineMax({repeat:0, repeatDelay:10});

                tl.to(".img1",2.5,{opacity:1});
                tl.to(".txt1",1.0,{opacity:1}, "-=1.5");

                tl.to(".img1",2.5,{opacity:0}, "+=1");
                tl.to(".txt1",0.5,{opacity:0});
                tl.to(".img2",2.5,{opacity:1});
                tl.to(".txt2",1,{opacity:1}, "-=2.5");

                tl.to(".img2",2,{opacity:0}, "+=1");
                tl.to(".txt2",2,{opacity:0}, "-=2");
                tl.to(".img3",2,{opacity:1}, "-=0.5");
                tl.to(".txt3",1,{opacity:1}, "-=2");

                tl.to(".img3",2,{opacity:0}, "+=2.5");
                tl.to(".txt3",0.5,{opacity:0}, "-=2");

                tl.to("#logo img",2,{opacity:1}, "-=1.5");
                tl.to("#last-frame",1,{opacity:1}, "-=1.5");

            }

            ready(stage1());
            
        </script>

    </body>

</html>