blob: 243a52f0255a3a383b0358f71a0d90211b67d1d8 (
plain)
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
|
{% extends 'website/templates/base.html' %}
{% load static %}
{% block content %}
<style>
.gsc-search-button
{
background-color: #C0C0C0 ;
border-radius: 5px;
}
</style>
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="active" ><a href="#search-by-keyword" data-toggle="tab">Search by Keyword</a></li>
<!--<li><a href="#search-by-time" data-toggle="tab">Search by Time</a></li> -->
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div style="float:right; margin-right: 50px; width: 400px;">
<script>
(function() {
var cx = '011342992297670206849:dfzecvqmvgc';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<br>
<div class="tab-pane active" id="search-by-keyword">
<div class="row">
<div class="col-lg-10">
<input id="search-key" class="form-control" placeholder="eg: python, scilab">
</div>
<div class="col-lg-2">
<a id="search-key-submit" class="btn btn-primary btn-sm btn-block" href="#">Search</a>
</div>
</div>
<div id="keyword-search-results">
</div>
</div>
<div class="tab-pane" id="search-by-time">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3">
<select id="search-category" class="form-control">
<option value="None">Select Category</option>
{% for category in categories %}
<option value="{{ category }}">{{ category }}</option>
{% endfor %}
</select>
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<select id="search-tutorial" class="form-control" disabled="disabled">
<option value="None">Select Tutorial</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<select id="search-minute-range" class="form-control" disabled="disabled">
<option value="None">min</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<select id="search-second-range" class="form-control" disabled="disabled">
<option value="None">sec</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<input id="search-time-submit" class="btn btn-sm btn-warning btn-block" type="button" value="Search">
</div>
<div class="clearfix"></div>
</div> <!-- /.row -->
<div id="time-search-results">
</div>
</div>
</div> <!-- tab panes -->
{% endblock %}
{% block javascript %}
<script src="{% static 'website/js/search.js' %}"></script>
{% endblock %}
|