index.html
8.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>HTML5 Ad</title>
<!--
<script type="text/javascript">
// IAB source: modified to allow link testing
var clickTag = "https://boscoandroxys.com";
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>
<style>
body{
margin: 0;
padding: 0;
}
a{
text-decoration: none;
}
#click-tag{
display: block;
position: absolute;
width: 100%;
height: 100%;
}
#border{
position: relative;
width: 100%;
height: 100%;
border: 1px solid #323e48;
background-color: #FFFFFF;
overflow: hidden;
cursor: pointer;
box-sizing: border-box;
}
img {
position: absolute;
}
/* Custom per ad */
body{
width: 300px;
height: 250px;
}
#border{
border-top: 10px solid #323e48;
background-position: 0 -10px;
}
.box{
left:11px;
top:13px;
opacity: 0;
}
#box-xmas{
opacity: 1;
}
#txt{
left: 167px;
top: 21px;
-ms-transform: scale(.5); /* IE 9 */
-ms-transform-origin: 0% 0%; /* IE 9 */
-webkit-transform: scale(.5); /* Chrome, Safari, Opera */
-webkit-transform-origin: 0% 0%; /* Chrome, Safari, Opera */
transform: scale(.5);
transform-origin: 0% 0%;
}
#logo{
position: absolute;
left: 17px;
top: 168px;
width:131px;
height:157px;
}
#subscribe{
right: 15px;
bottom: 25px;
}
</style>
</head>
<body>
<div id="border">
<!--
Christmas
1. Christmas
2. Advent Calendar
3. Winter
4. Spoiled Dog
5. Valentines Day
-->
<img class="box" id="box-xmas" src="assets/box-xmas.jpg" alt="box-xmas">
<img class="box" id="box-advent" src="assets/box-advent.jpg" alt="box-advent">
<img class="box" id="box-winter" src="assets/box-winter.jpg" alt="box-winter">
<img class="box" id="box-spoileddog" src="assets/box-spoileddog.jpg" alt="box-spoileddog">
<img class="box" id="box-valentines" src="assets/box-valentines.jpg" alt="box-valentines">
<!--
<img class="box" id="box-birthday" src="assets/box-birthday.jpg" alt="box-birthday">
<img class="box" id="box-thanksgiving" src="assets/box-thanksgiving.jpg" alt="box-thanksgiving">
-->
<img id="txt" src="assets/txt.png" alt="txt">
<div id="logo"></div>
<img id="subscribe" src="assets/subscribe.svg" alt="txt" width="114" height="33">
<!-- <a id="click-tag" href="javascript:window.open(window.clickTag)"></a> -->
<a id="click-tag" href="javascript:eyeBuild.doClick(0)"></a>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
<script>
$( document ).ready(function() {
/*
* embed external svg using ajax
*/
eyeBuild.initialize();
var container = $("#logo");
var svgUrl = "assets/logo.svg";
$.get(svgUrl)
.then(injectSvg);
function injectSvg(xmlDoc) {
var svg = $(xmlDoc).find("svg");
container.append(svg);
animate();
}
/*
* animate
*/
function animate(){
// animate the boxes
var tl = new TimelineMax({repeat:2});
var d = 1.25;
var box_arr = ["#box-advent", "#box-winter", "#box-spoileddog", "#box-valentines"];
for (var i = 0 in box_arr) {
tl.to(box_arr[i], 0.6, {opacity:1, ease:Power1.easeInOut, delay:d });
}
for (var i = 0 in box_arr) {
tl.to(box_arr[i], 0.6, {opacity:0, delay:0 });
}
/* console.log("boxes: " + tl.totalDuration()); */
// animate the logo
var eye_tl = new TimelineMax({repeat:3});
var winkTime = .3;
// close eye
eye_tl.to("#cheek", winkTime, {x:3, y:-1, delay:0 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:.001, transformOrigin:"50% 50%", delay:-winkTime });
eye_tl.to("#eye-right-lash", .1, {opacity:1, delay:0 });
eye_tl.to(["#e-small", "#e-large"], .1, {opacity:1, delay:0 });
var crumbTime = 1;
eye_tl.to("#e-large", crumbTime, {scale:3, x:11, y:-4, transformOrigin:"50% 50%", delay:0 });
eye_tl.to("#e-small", crumbTime, {scale:6, x:11, y:1, transformOrigin:"50% 50%", delay:-crumbTime });
eye_tl.to("#e-large", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
eye_tl.to("#e-small", crumbTime/4, {scale:.001, opacity:0, transformOrigin:"50% 50%", delay:-crumbTime/2 });
// open eye
eye_tl.to("#eye-right-lash", .1, {opacity:0, delay:-winkTime*1.9 });
eye_tl.to("#cheek", winkTime, {x:0, y:0, delay:-winkTime*1.9 });
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:-winkTime*2});
eye_tl.to("#eye-right-mask", winkTime, {scaleY:1, transformOrigin:"50% 50%", delay:5});
/* console.log("eye_right: " + eye_tl.totalDuration()); */
var tongue_tl = new TimelineMax();
var pantDuration = .3;
var pantTongueLength = .9;
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:9, delay:0 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:3, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:33, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:3, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
tongue_tl.fromTo("#pant", pantDuration, {scaleY:.5}, {scaleY:pantTongueLength, transformOrigin:"0% 0%", yoyo: true, repeat:13, delay:1 });
/* console.log("tongue: " + tongue_tl.totalDuration()); */
};
});
</script>
</body>
</html>