-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (92 loc) · 3.63 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
<!DOCTYPE html>
<html>
<head>
<link href="./static/css/bootstrap.min.css" rel="stylesheet" media="screen">
<title>Vocab - Just what you need</title>
<style type="text/css">
.clean{
font-family: 'Open Sans', sans-serif;
vertical-align: middle !important;
}
.jumbotron{
background: white;
}
.borderless td {
border: none;
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans'), local('OpenSans'), url("./static/fonts/OpenSans.woff") format('woff');
}
.p{
padding: 1%;
}
.m{
margin: 1%;
}
</style>
</head>
<body class="clean">
<div class="container">
<div class="header text-center">
<header class="meta-header">
<div class="navbar navbar navbar-top">
<div class="container">
<div class="navbar-collapse collapse" id="footer-body">
<ul class="nav navbar-nav">
<li><a href="./About.html">About</a></li>
<li><a href="https://twitter.com/nrshrivatsan"> @Twitter </a></li>
</ul>
</div>
</div>
</div>
</header>
<h2>
<span> Vocab </span>
<input type="text" class="input-large m p" id="search-string" placeholder="Enter search string">
<span class=" btn-success p m" id ="search-button" onclick="search();"> Search </span>
<span class=" btn-info p m" id ="reset-button" onclick="reset();"> Clear </span>
<h5 class=""> Learn just enough! </h5>
</h2>
</div>
<div class="container row-fluid" id = "results-container">
<div class="text-center span12" id="infocard">
</div>
</div>
</div>
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript">
function search(){
var q = $("#search-string").val();
$("#infocard").html("");
$("#results").html("");
// $("#results").html(q);
$.get( "/search?q="+q, function( data ) {
// $( "#results" ).html( data );
var results = "";
if (data.infocard){
$("#infocard").html("<table class='table table-condensed table-responsive table-hover borderless'> "+data.infocard+"</table>");
}
// for (key in data.links){
// var div =" <div> <a href='"+data[key]+"' >"+key+" </a></div>"
// results+=div;
// }
// $( "#results" ).html( results);
// alert( "Load was performed." );
});
}
function reset(){
$("#results").html("");
$("#search-string").val("");
$("#infocard").html("");
$("#search-string").focus();
}
</script>
<script type="text/javascript" src="./static/js/jquery.js">
</script>
<script type="text/javascript" src="./static/js/bootstrap.min.js">
</script>
</body>
</html>