index.html 5.99 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://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>

    <link href="https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@200;300;400;700&display=swap"
        rel="stylesheet">
    <style>
        body {
            margin: 0;
            padding: 0;
            width: 300px;
            height: 600px;
            line-height: 1.7;
            font-size: 24px;
            letter-spacing: 0;
            font-family: 'Libre Caslon Text', serif;
            font-style: normal;
            background: #F2F2F2;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        #border {
            position: absolute;
            width: 300px;
            height: 600px;
            background: #F2F2F2;
            overflow: hidden;
            cursor: pointer;
            box-sizing: border-box;
        }

        #txt-panel {
            position: absolute;
            top: 0px;
            left: 10px;
            width: 280px;
        }

        #txt-panel p {
            opacity: 0;
            color: #fff;
            font-weight: 200;
            text-align: center;
        }


        #txt-panel p strong {
            opacity: 0;
            font-weight: 700;
            margin-top: 20px;
            font-size: 32px;
            display: block;
        }

        #circles-panel {
            position: absolute;
            top: 220px;
            left: 134px;
        }

        #circles-panel svg {
            height: 153px;
            width: 37px;
        }

        #selfie-panel {
            position: absolute;
            top: 288px;
            left: 84px;
            opacity: 0;

        }

        #button-panel {
            position: absolute;
            top: 440px;
            left: 40px;
            opacity: 0;

        }
    </style>
</head>

<body>
    <a id="click-tag" href="javascript:window.open(window.clickTag)">
    <div id="border">
        <div id="txt-panel">
            <p>When you learn every axe on Fairy Lake
                cuts both ways.<br><strong> Count On Us.</strong></p>
        </div>

        <div id="circles-panel">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28.65 134.11">
                <path id="outer" d="M21.27,14.33a7,7,0,1,1-6.95-6.95h0a6.94,6.94,0,0,1,6.94,6.94Z"
                    transform="translate(0 0)"
                    style="fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:1.0943639278411865px" />
                <path id="mid" d="M28.11,14.33A13.78,13.78,0,1,1,14.33.55,13.78,13.78,0,0,1,28.11,14.33Z"
                    transform="translate(0 0)"
                    style="fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:1.0943639278411865px" />
                <circle id="inner" cx="14.33" cy="14.33" r="3.49"
                    style="fill:#fff;stroke:#fff;stroke-miterlimit:10;stroke-width:0.5103546380996704px" />
                <line id="line" x1="14.33" y1="16.56" x2="14.33" y2="16.56"
                    style="fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:1.5px" /></svg>
        </div>

        <div id="selfie-panel">
            <img class='selfie' src="./assets/selfie.png" alt="" width="146" height="147">
        </div>

        <div id="button-panel">
            <img class='button' src="./assets/button2x.png" alt="" width="215" height="36">
        </div>

        <img class='background' src="./assets/background@2x.png" alt="" width="300" height="600">
        <!-- <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);
            }
        }


        var
            pulse2 = document.getElementById("outer"),
            pulse1 = document.getElementById("mid"),
            tl = new TimelineMax({ repeat: 6, repeatDelay: 0.5 });

        tl.fromTo(pulse1, 1,
            { transformOrigin: "center center", autoAlpha: 1, scale: 0.8 },
            { transformOrigin: "center center", autoAlpha: 0, scale: 1.1, ease: Quad.easeInOut }
        )
            .fromTo(pulse2, 1,
                { transformOrigin: "center center", autoAlpha: 1, scale: 0.8 },
                { transformOrigin: "center center", autoAlpha: 0, scale: 1.1, ease: Quad.easeInOut }, 0.5
            )
            ;



        function stage1() {
            var line = document.getElementById("line");
            var tl2 = new TimelineMax({ repeat: 0, repeatDelay: 20 });

            tl2.to("#txt-panel p", 1.0, { opacity: 1 }, 1);
            tl2.to("#txt-panel p strong", 1.0, { opacity: 1 }, 2);
            tl2.fromTo(line, 3,
                { transformOrigin: "left", autoAlpha: 0, attr: { y2: 16.56 } },
                { transformOrigin: "left", autoAlpha: 1, attr: { y2: 75.11 } }
            )
            tl2.to("#selfie-panel", 1.0, { opacity: 1 }, "-=0.5");
            tl2.fromTo("#button-panel", 1,
                { transformOrigin: "center center", autoAlpha: 1, scale: 0 },
                { transformOrigin: "center center", autoAlpha: 1, scale: 1, ease: Quad.easeInOut }, 6
            )


        }

        ready(stage1());

    </script>

</body>

</html>