forked from izconcept/Trippy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·220 lines (188 loc) · 12.2 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Trippy Front-end</title>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="animate.css" type="text/css">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<script type="text/javascript">
function sequence1() {
$(".gif").remove();
$(".sequence1").remove();
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Sure, Trippy is a state of the art deep learning analytical tool used to determine your travel tendencies and recommend relevent travel locations. Please login to your Facebook.</span></div></div>");
setTimeout(
function() {
$("#chat").append("<div class='row sequence2'><div class='clickable bubble left animated fadeInUp'><span>Login to Facebook</span></div></div>");
}, 750);
}
function sequence2() {
$('.sequence2').addClass("animated fadeOutDown");
$("#chat").append("<img src='loading.gif' class='gif'/>");
login();
}
function sequence3() {
$('.sequence3').addClass('animated fadeOutDown');
$("#chat").append("<img src='loading.gif' class='gif'/>");
setTimeout(
function() {
$('.sequence3').remove();
$(".gif").remove();
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Great! What kind of location do you prefer?</span></div></div>");
}, 1000);
setTimeout(
function() {
$("#footer").append("<div class='col-xs-3 bubble bottom animated fadeInUp sequence4'><span>City</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence4'><span>Urban</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence4'><span>Beach</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence4'><span>Island</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence4'><span>Nature</span></div>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
}, 1700);
}
function sequence4() {
$('.sequence4').addClass('animated fadeOutDown');
$("#chat").append("<img src='loading.gif' class='gif'/>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setTimeout(
function() {
$('.sequence4').remove();
$(".gif").remove();
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Do you plan on drinking?</span></div></div>");
}, 1300);
setTimeout(
function() {
$("#footer").append("<div class='col-xs-4 bubble bottom animated fadeInUp sequence5'><span>Yes</span></div><div class='col-xs-4 bubble bottom animated fadeInUp sequence5'><span>No</span></div>");
$("html, body").animate({ scrollTop: $(document).height() }, 2000);
}, 2000);
}
function sequence5() {
$('.sequence5').addClass('animated fadeOutDown');
$("#chat").append("<img src='loading.gif' class='gif'/>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setTimeout(
function() {
$('.sequence5').remove();
$(".gif").remove();
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Do you want to use a service such as Uber or Busbud</span></div></div>");
}, 1300);
setTimeout(
function() {
$("#footer").append("<div class='col-xs-4 bubble bottom animated fadeInUp sequence6'><span>Yes</span></div><div class='col-xs-4 bubble bottom animated fadeInUp sequence6'><span>No</span></div>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
}, 2000);
}
/*function sequence6() {
$('.sequence6').addClass('animated fadeOutDown');
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Alright! This is all we need for now. We're building your travel recommendations now</span></div></div>");
$("#chat").append("<img src='loading.gif' class='gif'/>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setTimeout(
function() {
$('.sequence6').remove();
$(".gif").remove();
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Here are flight and hotel packages based on your preferences: </span></div></div>");
}, 3500);
setTimeout(
function() {
/*$("#chat").append("<div style='font-size: .7em'><div class='col-sm-4 botpad'><div class='card' style='max-width: 240px;'><div class='card-block'><h4 class='card-title'>Miami</h4><h6 class='card-subtitle text-muted'>USA</h6></div><img class='pic' src='beach.jpg' alt='Photo of sunset'><div class='card-block'><p class='card-text'>The sun disappeared behind the horizon today. Experts claim it could be gone for good!</p></div></div></div><div class='col-sm-4 botpad'><div class='card' style='max-width: 240px;'><div class='card-block'><h4 class='card-title'>Miami</h4><h6 class='card-subtitle text-muted'>USA</h6></div><img class='pic' src='alps.jpg' alt='Photo of sunset'><div class='card-block'><p class='card-text'>The sun disappeared behind the horizon today. Experts claim it could be gone for good!</p></div></div></div><div class='col-sm-4 botpad'><div class='card' style='max-width: 240px;'><div class='card-block'><h4 class='card-title'>Miami</h4><h6 class='card-subtitle text-muted'>USA</h6></div><img class='pic' src='paris.jpg' alt='Photo of sunset'><div class='card-block'><p class='card-text'>The sun disappeared behind the horizon today. Experts claim it could be gone for good!</p></div></div></div></div>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
}, 4000);
}*/
</script>
</head>
<body>
<a href="about.html"><h1 id="about" class="animated fadeInDown">About</h1></a>
<h1 id="mainTitle" class="animated fadeInDown">Trippy</h1>
<div class="content container ">
<div id="chat">
<div class="row">
<div class="bubble left animated fadeInUp"><span>Welcome to Trippy, how can I help you today?</span></div>
</div>
</div>
</div>
<div class="container">
<nav class="navbar navbar-fixed-bottom navbar-light bg-faded footer">
<div class="container" id="footer">
<div class="bubble bottom animated fadeInUp sequence1"><span>I'd like to go on vacation. Got any ideas?</span></div>
</div>
</nav>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<script src="parallax.js"></script>
<script src="algo.js"></script>
<script src="facebook.init.js"></script>
<script src="app.js"></script>
<script>
$(document).ready(function() {
response=load2();
console.log(response);
$(".sequence1").click(function() {
$("#chat").append("<div class='row'><div class='bubble right animated fadeInUp'><span>I'd like to go on vacation. Got any ideas?</span></div></div>");
$(this).addClass("animated fadeOutDown");
$("#chat").append("<img src='loading.gif' class='gif'/>")
setTimeout(
function() {
sequence1();
}, 2000);
});
$(document).on('click', '.sequence2', function() {
sequence2();
});
$(document).on('click', '.sequence3', function() {
vibe = $(this).text();
console.log(vibe);
var choice = $(this).text();
$("#chat").append("<div class='row'><div class='bubble right animated fadeInUp'><span>"+choice+"</span></div></div>");
sequence3();
});
$(document).on('click', '.sequence4', function() {
description = $(this).text();
console.log(description);
var choice = $(this).text();
$("#chat").append("<div class='row'><div class='bubble right animated fadeInUp'><span>"+choice+"</span></div></div>");
sequence4();
});
$(document).on('click', '.sequence5', function() {
drink = $(this).text();
console.log(drink);
var choice = $(this).text();
$("#chat").append("<div class='row'><div class='bubble right animated fadeInUp'><span>"+choice+"</span></div></div>");
sequence5();
});
$(document).on('click', '.sequence6', function() {
uber = $(this).text();
console.log(uber);
var choice = $(this).text();
$("#chat").append("<div class='row'><div class='bubble right animated fadeInUp'><span>"+choice+"</span></div></div>");
$('.sequence6').addClass('animated fadeOutDown');
$("#chat").append("<div class='row'><div class='bubble left animated fadeInUp'><span>Alright! This is all we need. We're building your travel recommendations now. This might take a while...</span></div></div>");
$("#chat").append("<img src='loading.gif' class='gif'/>");
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setTimeout(
function() {
$('.sequence6').remove();
}, 1000);
setTimeout(
function() {
getData(vibe,description,uber,drink);
}
, 5000);
});
$(document).on('click', '.sequence7', function() {
$('.sequence8').addClass('animate fadeOutDown')
var temp = $(this).find('.card-title').text();
setTimeout(
function() {
$('.sequence8').remove();
}
, 500);
setTimeout(
function() {
$("#footer").append("<div class='col-xs-3 bubble unique animated fadeInUp sequence8'><span>"+temp+"</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence8'><span>Find me flights</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence8'><span>Find me hotels</span></div><div class='col-xs-3 bubble bottom animated fadeInUp sequence8'><span>Anything cheaper?</span></div>");
}
, 600);
})
});
</script>
</body>
</html>