-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
81 lines (69 loc) · 3.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css" />
<link href="https://fonts.googleapis.com/css?family=Lato:300,400" rel="stylesheet">
</head>
<body data-bind="event : { mouseup : handleMouseUp }">
<h1>conversation</h1>
<!-- message list" -->
<ul id="messages" data-bind="foreach: tenor.tenorViewModel.messages">
<li>
<a href="#" target="blank" data-bind="attr : {href : url}, text: url"></a>
<img data-bind="attr : {src : media[0].nanogif.url}" />
</li>
</ul>
<!-- gif container -->
<ul id="gif-list" style="display:none;" data-bind="foreach: gifs, event : { scroll : checkIfBottom}, visible : gifs().length">
<li>
<img data-bind="attr : { src : media[0].nanogif.url }, , click : $root.addToMessageList" />
</li>
</ul>
<!-- error message -->
<div id="error-panel" data-bind="visible: errorMessage">
<p style="color: red">Error message:</p>
<p data-bind="text : errorMessage"></p>
</div>
<!-- searchbox -->
<div id="search-panel">
<input id="text-input" type="text" autofocus="autofocus" data-bind="textInput: currentSearchTerm" placeholder="write your search term here">
</div>
<!-- Spinner -->
<div style="margin-left:15px; display:inline-block; width:28px;">
<span data-bind="visible : isLoading">
<!-- Svg Spinner By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
<svg width="20" height="20" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
<stop stop-color="#7a808d" stop-opacity="0" offset="0%" />
<stop stop-color="#7a808d" stop-opacity=".631" offset="63.146%" />
<stop stop-color="#7a808d" offset="100%" />
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)">
<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
<animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite"
/>
</path>
<circle fill="#7a808d" cx="36" cy="18" r="1">
<animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite"
/>
</circle>
</g>
</g>
</svg>
</span>
</div>
<script type="text/javascript" src="third-party/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="third-party/knockout-3.4.1.min.js"> </script>
<script type="text/javascript" src="tenor.js"></script>
<script type="text/javascript">
$().ready(function () {
var vm = tenor.tenorViewModel;
ko.applyBindings(vm);
vm.search();
});
</script>
</body>
</htm>