blob: 4b52fde57109a381c5cf405d84824aed2e7d01e1 (
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
|
{%extends "base/page.html"%}
{%block title%}Search results{%endblock%}
{%block contents%}
<h1>Site Search <i class="fas fa-link"></i></h1>
<form method="get" action="/search/">
{%if suburl%}
<input type="hidden" name="u" value="{{suburl}}">
{%endif%}
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" name="q" value="{{query}}" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<i class="fas fa-search"></i>
</button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
</div><!-- /.row -->
</form>
{%if search_error %}
<div>{{search_error}}</div>
{%else%}
<!-- docbot goes here -->
{%if hitcount == 0 %}
<p>Your search for <strong>{{query}}</strong> returned no hits.</p>
{%else%}
<h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount == 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
{%for hit in hits %}
{{forloop.counter0|add:firsthit}}. <a href="{{hit.url}}">{{hit.title}}</a> [{{hit.rank|floatformat:2}}]<br/>
<div>...{{hit.abstract|safe}}...</div>
<a href="{{hit.url}}">{{hit.url}}</a><br/>
<br/>
{%endfor%}
{%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
{%endif%}
{%endif%}
{%endblock%}
|