-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·203 lines (179 loc) · 8.02 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Personality Quiz - Fairmount Water Works</title>
<meta name="viewport" content="target-densitydpi=device-dpi,
width=device-width,
initial-scale=1.0,
minimum-scale=1.0,
maximum-scale=1.0,
minimal-ui,
user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<link href="./dist/css/main.css" rel="stylesheet" />
<!-- GOOGLE ANALYTICS -->
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-86705712-3', 'auto');
ga('send', 'pageview');
function sendGAEvent(screen) {
ga('set', 'page', screen);
ga('send', 'pageview');
}
</script>
<style>
#clickBubbles {
display: block;
position: absolute;
z-index: 19;
width: 100px;
height: 100px;
pointer-events: none;
top: 0;
}
#clickBubbles>.bubble {
width: 30px;
height: 30px;
background: rgba(250, 250, 250, 0.25);
border-radius: 150px;
position: absolute;
-webkit-animation: float 0.5s ease-in;
-webkit-animation-fill-mode: forwards;
}
@keyframes float {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(-200px);
opacity: 0;
}
}
</style>
</head>
<body>
<script id="result-template" type="text/x-jQuery-tmpl">
<img src="" id="profile" alt="river creature image">
<h2>Your Match Made in the River</h2>
<h1>${name}</h1>
<h3>${latin}</h3>
<p>${exclamation} <span>${latin},</span> ${body}</p>
<button class="back-to-start">Back to Start <img src="./assets/images/icon-arrow-white.svg" alt="arrow"></button>
</script>
<script id="result-template-mussel" type="text/x-jQuery-tmpl">
<img src="" id="profile" alt="river creature image">
<h2>Your Match Made in the River</h2>
<h1>${name}</h1>
<h3>${latin}</h3>
<p>${exclamation} ${body}</p>
<button class="back-to-start">Back to Start <img src="./assets/images/icon-arrow-white.svg" alt="arrow"></button>
</script>
<script id="option-template" type="text/x-jQuery-tmpl">
<li
><button class="answer-btn no-flick" {{if id}} data-next="${id}" {{/if}}
{{if resultId}} data-result="${resultId}" {{/if}}>${answer}</button></li>
</script>
<script id="quiz-template" type="text/x-jQuery-tmpl">
<div class="question">${text}</div>
<ul id="options"></ul>
<div class="progress">Question <span class="progress-current">${step}</span></div>
</script>
<script src="./js/lib/jquery-1.11.3.min.js"></script>
<script src="./js/lib/jquery.loadTemplate.min.js"></script>
<script src="./js/lib/createjs-2015.11.26.min.js"></script>
<script src="./js/controllers/utilities.js"></script>
<script src="./js/controllers/navigation.js"></script>
<script src="./js/controllers/questions.js"></script>
<script src="./js/controllers/result.js"></script>
<script src="./js/app.js"></script>
<script>
window.onclick = blowBubbles;
function blowBubbles(evt) {
var audioUrl = 'assets/emerging-bubbles_01.mp3';
new Audio(audioUrl).play()
var bubbleContainer = document.getElementById('clickBubbles');
var x = evt.pageX;
var y = evt.pageY;
var number = Math.floor((Math.random() * 6) + 2);
bubbleContainer.innerHTML = "";
bubbleContainer.style.top = (y - 50) + "px";
bubbleContainer.style.left = (x - 50) + "px";
for (i = 0; i < number; i++) {
var size = Math.floor(Math.random() * (40 - 20 + 1)) + 20;
var speed = Math.random() + 0.5;
var bx = Math.floor((Math.random() * 100) + 1);
var by = Math.floor((Math.random() * 100) + 1);
bubbleContainer.insertAdjacentHTML('beforeend',
'<div class="bubble" style="width:' + size + 'px;height:' + size + 'px;top:' + by + 'px;left:' + bx + 'px;-webkit-animation-duration:' + speed + 's"></div>');
}
}
</script>
<div id="gui">
<button class="home-button fade no-flick">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" x="0px" y="0px" width="49.1px"
height="49.1px" viewBox="0 0 49.1 49.1" enable-background="new 0 0 49.1 49.1" xml:space="preserve">
<defs>
</defs>
<g>
<g>
<g>
<path fill="#FFFFFF"
d="M37.3,24L25.6,12.4c-0.6-0.6-1.6-0.6-2.2,0L11.8,24c-0.6,0.6-0.4,1.1,0.5,1.1h2.4v8.9
c0,0.6,0,1.2,1.2,1.2h5.6v-9h5.9v9h5.9c0.9,0,0.9-0.5,0.9-1.2v-8.9h2.4C37.6,25.1,37.9,24.6,37.3,24z" />
</g>
<circle fill="none" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="24.6" cy="24.6"
r="23.6" />
</g>
</g>
</svg>
</button>
<div class="logo"><img src="./assets/images/logo.svg" alt="logo" id="logo-image"></div>
</div>
<div id="content">
<div id="introduction" class="fade in">
<p>The diversity of life in the river - much like humans - play a major part in maintaining a healthy ecosystem.</p>
<p>Land lover? Graceful as a fish? Born to fly? Prefer the shelter of your own shell? Invisible to the naked
eye? Small but mighty? FIND YOUR MATCH!</p>
<p>We have prepared a series of statements to help you find out which river organism is most like you. In
each pair, choose the statement that best describes you and follow the path until you are matched with
the profile of your organism.</p>
<button class="start-quiz">Take the Quiz <img src="./assets/images/icon-arrow-blue.svg"
alt="arrow"></button>
</div>
<div id="questions"></div>
<div id="calculating" class="fade hidden">
<img src="./assets/images/PQ-bubbles_v03.gif" alt="loading" title="loading">
<h2>Calculating Your River Character</h2>
</div>
<div id="results" class="fade"></div>
</div>
<div id="animation"></div>
<div id="clickBubbles"></div>
<div id="water" data-water-level="0">
<div id="bubbles" data-bubble-height="0">
<div class="bubble x1"></div>
<div class="bubble x2"></div>
<div class="bubble x3"></div>
<div class="bubble x4"></div>
<div class="bubble x5"></div>
<div class="bubble x6"></div>
<div class="bubble x7"></div>
<div class="bubble x8"></div>
<div class="bubble x9"></div>
<div class="bubble x10"></div>
<div class="bubble x11"></div>
<div class="bubble x12"></div>
<div class="bubble x13"></div>
<div class="bubble x14"></div>
</div>
</div>
</body>
</html>