index.html 7.29 KB
<!DOCTYPE html>
    <head>
       
        <meta charset="utf-8">
        <title>HTML5 Ad</title>
        <meta name="ad.size" content="width=300,height=600">
        <script type="text/javascript">
            
            // IAB source: modified to allow link testing
            var clickTag = "https://ontarioplanners.ca/planonit";
            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;
                background:#F2F2F2;
            }

            #border{
                position: absolute;
                width: 300px;
                height: 600px;
                background:#F2F2F2;
                overflow: hidden;
                cursor: pointer;
                box-sizing: border-box;
                /* border:1px solid; */
            }
            
            a{
                text-decoration: none;
                color: inherit;
            }
            
            #gray-panel{
                width:100%;
                height:100%;
                max-height: 100%;
                text-align: center;
            }

            #blue-panel {
                width:100%;
                height:365px;
                max-height: 100%;
                text-align: center;
                position: absolute;
                background:#0B4D85;    
                top:-350px; 
            }

            #gold-panel {
                width:100%;
                height:235px;
                max-height: 100%;
                text-align: center;
                position: absolute;
                right:-205px;
                background:#EDC130;    
                bottom:-220px;
                left:0; 
            }

            .txt1 {
                position: absolute;
                top:135px;
                left:40px;
                opacity: 0;
            }

            .txt2 {
                position: absolute;
                top: 95px;
                left: 45px;
            }

            .txt3 {
                opacity: 0;
                position: absolute;
                left: 45px;
                top: 80px;
            }

            .img1 {
                position: absolute;
                left: 65px;
                top: 35px;
            }
            
            .img2 {
                opacity: 0;
                position: absolute;
                left: 90px;
                top: 60px;
            }
            

            .img3 {
                opacity: 0;
                position: absolute;
                top: 255px;
                left: 65px;
                transition: x 0.5s;
            }

            .img3 path {
                pointer-events: none;
            }
            
        </style>
        
    </head>
    
    <body>
            <a id="click-tag" href="javascript:window.open(window.clickTag)">
        <div id="border">

            <div id="gray-panel">
                <img class='txt1' src="./assets/txt1.png" alt="" >
              </div>
  
              <div id='blue-panel'>
                  <img class='txt2' src="./assets/txt2.png" alt="" >
                  <img class='txt3' src="./assets/txt3.png" alt="" >
                  <svg class='img3' xmlns="http://www.w3.org/2000/svg" onmouseout="stopAnimateBtn()" onmouseover="animateBtn()" width="159.52" height="34.03" viewBox="0 0 159.52 34.03"><title>btn_large</title><g id="e50de3e8-6120-4330-b91f-55315f6c998e" data-name="Layer 2"><g id="bf431405-8121-44af-940c-6c9b31dd0472" data-name="Layer 1"><path d="M81,26.83a1.17,1.17,0,0,1-.81-.33,1.13,1.13,0,0,1,0-1.61l7.72-7.74L80.17,9.43a1.13,1.13,0,0,1,0-1.61,1.17,1.17,0,0,1,1.61,0l8.53,8.54a1.09,1.09,0,0,1,.33.81,1.2,1.2,0,0,1-.33.82L81.78,26.5a1.15,1.15,0,0,1-.8.33" style="fill:#edc130"/><path d="M70,26.83a1.17,1.17,0,0,1-.81-.33,1.13,1.13,0,0,1,0-1.61l7.72-7.74L69.22,9.43a1.13,1.13,0,0,1,0-1.61,1.15,1.15,0,0,1,1.6,0l8.54,8.54a1.12,1.12,0,0,1,.32.81,1.24,1.24,0,0,1-.32.82L70.82,26.5a1.11,1.11,0,0,1-.79.33" style="fill:#edc130"/><path d="M142.5,33.43H17A16.41,16.41,0,0,1,17,.61H142.5a16.41,16.41,0,0,1,0,32.82Z" style="fill:none;stroke:#edc130;stroke-miterlimit:10;stroke-width:1.2109999656677246px"/></g></g></svg>
              </div>
      
              <div id='gold-panel'>
                  <img class='img1' src="./assets/logo_rpp.png" alt="" >
                  <img class='img2' src="./assets/sponserd.png" alt="" >
              </div>

            <!-- <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(".txt1",1.0,{opacity:1}, "-=1.5");

                tl.to("#blue-panel",2,{top:0}, "+=4");
                tl.to("#gold-panel",2,{bottom:0}, "-=2");

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

                tl.to(".txt3",1,{opacity:1});
                tl.to(".img2",1,{opacity:1}, "-=1");
                tl.to(".img3",1,{opacity:1}, "-=1");

            }


            function stopAnimateBtn() {
                Tlpath.restart();
                Tlpath.kill();
            }

            function animateBtn() {
                Tlpath = new TimelineMax({repeat:-1, repeatDelay:0});
                Tlpath.to(".img3 path:first-of-type",1,{x:10});
                Tlpath.to(".img3 path:first-of-type + path",1,{x:10}, "-=0.6");
                Tlpath.to(".img3 path:first-of-type",0.5,{opacity:0}, "-=0.7");
                Tlpath.to(".img3 path:first-of-type + path",0.5,{opacity:0}, "-=0.5");
                Tlpath.to(".img3 path:first-of-type",0,{x:-10}); 
                Tlpath.to(".img3 path:first-of-type + path",0,{x:-10});
                Tlpath.to(".img3 path:first-of-type",0.5,{opacity:1});
                Tlpath.to(".img3 path:first-of-type + path",0.5,{opacity:1}, "-=0.3");
                Tlpath.to(".img3 path:first-of-type",1,{x:0}, "-=0.6"); 
                Tlpath.to(".img3 path:first-of-type + path",1,{x:0}, "-=0.6");
            }

            ready(stage1());
            
        </script>

    </body>

</html>