-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
94 lines (93 loc) · 2.49 KB
/
search.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
<html>
<head>
<title>VimJolts :: get the Jolts on your Vim</title>
<link media="all" rel="stylesheet" href="/static/css/style.css" type="text/css" />
<script type="text/javascript" src="/static/javascript/jquery-latest.js"></script>
<script type="text/javascript">
$(function() {
$('#search-form').submit(function() {
$('#search').attr('disabled', 'disabled');
$('#word').attr('disabled', 'disabled');
$('#search-box').append($('<img/>').attr('src', '/static/image/ajax-loader.gif'))
$('#packages tbody tr').remove()
$.getJSON('/api/search', {"word": $('#word').val() }, function(data) {
$.each(data, function(n, i) {
$('<tr/>').appendTo('#packages tbody')
.append($('<td/>').append($('<a/>').attr('href', '/edit/' + i.id).text(i.name)))
.append($('<td/>').text(i.version).css('text-align', 'center'))
.append($('<td/>').text(i.description))
})
$('#search').removeAttr('disabled');
$('#word').removeAttr('disabled');
$('#search-box img').remove();
});
return false;
});
});
</script>
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
</head>
<body>
<div id="content">
<p align="right">{{ greeting }}</p><br />
<a href="/"><img src="/static/image/vimjolts-logo.png" id="logo" border="0" /></a>
<h2>Get the Jolts on Your Vim</h2>
<div class="quote">
<form id="search-form">
<span id="search-box"><input type="text" id="word" value=""/><input type="submit" id="search" value="Search" /></span>
</form>
<table id="packages" border="1">
<caption>Recent Packages</caption>
<colgroup width="200px" />
<colgroup width="100px" />
<colgroup width="400px" />
<thead>
<tr>
<th>Name</th>
<th>Version</th>
<th>Description</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<br />
<div class="quote">
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: '#vimjolts',
interval: 6000,
title: 'VimJolts',
subject: 'Get The Jolts',
width: 'auto',
height: 300,
theme: {
shell: {
background: '#8ec1da',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
toptweets: true,
behavior: 'default'
}
}).render().start();
</script>
</div>
<p align="center">Provided by <a href="http://github.com/vimjolts">VimJolts Developer Team</a>.</p>
</div>
</body>
</html>