-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathheader.html
197 lines (168 loc) · 6.45 KB
/
header.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
<!doctype html>
{% load static %}
<html lang="en">
<head>
{% block head %}
<title>cosmos-search</title>{% endblock %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"
integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" type="text/css"
media="all"/>
<style>
html {
position: relative;
min-height: 100%;
}
body {
font-family: 'Roboto Mono', monospace;
margin-bottom: 5em;
font-size: 16px;
}
article {
display: block;
text-align: left;
width: 80%;
padding-top: 20px;
padding-bottom: 20px;
margin: 0 auto;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
padding: 1em;
background-color: #f5f5f5;
}
.ui-menu .ui-menu-item a {
font-size: 16px !important;
line-height: 1.2 !important;
}
#myDIV {
width: 100%;
padding: 50px 0;
text-align: center;
background-color: floralwhite;
margin-top: 20px;
display: none !important;
}
.ff {
display: block !important;
}
.hd{
display: none !important;
}
.stylish-input-group .input-group-addon{
background: white !important;
}
.stylish-input-group button {
border: 0;
background: transparent;
}
.border {
margin: 0;
padding: 0;
padding-bottom: 0;
}
.bootstrap-iso .form-control {
border-width: 2px;
border-color: grey;
}
.bootstrap-iso .form-control{border-width: 2px; border-color: grey;}
</style>
<script>
jQuery(function(){
jQuery('class of view button').click(function(){
jQuery('#myDIV').removeClass(' hd ');
jQuery('#myDIV').addClass(' ff ');
})
</script>
{% block style %}
{% endblock %}
</head>
<body style="overflow-x: hidden;">
<div class="container">
<br>
<div class="row">
<div class="col-4">
<a class="navbar-brand" href="/">cosmos-search</a>
</div>
<div class="col-8">
<a class="btn float-right" href="https://github.com/OpenGenus/cosmos-search">GitHub</a>
<a class="btn float-right" href="https://github.com/OpenGenus/cosmos">cosmos</a>
<a class="btn float-right" href="{% url 'calculator' %}">calculator</a>
</div>
</div>
</br>
<div class="row">
{# align search bar and middle of vw #}
<div class="col"></div>
<div class="col-8 nopadding border">
<form class="form-inline justify-content-center" id="formq" action="{% url 'query' %}" method="GET">
<div class="input-group stylish-input-group">
<input class="form-control text-center" id="search" type="search" size="128"
placeholder="{{ algo_name }}" value="{{ algo_name }}" aria-label="Search" name="q">
<span class="input-group-addon">
<button type="submit" style="outline: none;">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
</div>
<div class="col-0.5 border">
<button onclick="document.getElementById('search').value=''" class="btn btn-default btn-md">
<i class="fa fa-remove" style="color:#A4A2A2;"></i>
</button>
</div>
{# align search bar and middle of vw #}
<div class="col float-right"></div>
</div>
<br>
{% block body %} {% endblock %}
</div>
<footer class="footer">
<div class="text-muted" style="text-align: center">
<div>Built with <3 @<a href="https://github.com/OpenGenus/">OpenGenus</a></div>
<div>Maintained by and part of the <a href="http://www.opengenus.org/">OpenGenus Foundation</a></div>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"
integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"
integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
crossorigin="anonymous"></script>
<script type="text/javascript"
src="//platform-api.sharethis.com/js/sharethis.js#property=5a8129cbe45fbb001342fed3&product=custom-share-buttons"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
{% block javascript %}
{% endblock %}
$(function () {
$("#search").autocomplete({
source: "/",
minLength: 1,
select: function (e, ui) {
$("#formq").submit()
}
});
});
$("#formq").submit(function () {
if ($('input').val().replace(/[\s,\/#!$%\^&\*;:{}=\-_`~().]/g, '').length === 0) {
return false;
}
});
</script>
</body>
</html>