forked from plone/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.html
More file actions
136 lines (128 loc) · 4.26 KB
/
search.html
File metadata and controls
136 lines (128 loc) · 4.26 KB
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
{#
basic/search.html
~~~~~~~~~~~~~~~~~
Template for the search page.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% block header %}
<link rel="stylesheet/less" type="text/css" href="/_static/custom.css" />
<script src="https://cdn.jsdelivr.net/npm/less@4.1.1" ></script>
{% endblock %}
{%- block scripts %}
{{ super() }}
<script src="{{ pathto('_static/searchtools.js', 1) }}"></script>
<script src="{{ pathto('_static/language_data.js', 1) }}"></script>
{%- endblock %}
{% block extrahead %}
<script src="{{ pathto('searchindex.js', 1) }}" defer></script>
{{ super() }}
{% endblock %}
{% block body %}
<h1 id="search-documentation">{{ _('Search') }}</h1>
{% block scriptwarning %}
<div id="fallback" class="admonition warning">
<script>$('#fallback').hide();</script>
<p>
{% trans %}Please activate JavaScript to enable the search
functionality.{% endtrans %}
</p>
</div>
{% endblock %}
{% block searchtext %}
<p>
{% trans %}Searching for multiple words only shows matches that contain
all words.{% endtrans %}
</p>
{% endblock %}
{% block searchbox %}
<form
action=""
method="get"
id="search-form"
class=""
>
<div class="row">
<div class="input-group col-xl-8 mb-2">
<label for="q" class="sr-only">Search string
</label>
<input
type="search" name="q" id="q"
class="form-control"
placeholder="{{ _(theme_search_bar_text) }}"
aria-labelledby="{{ _(theme_search_bar_text) }}"
value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
/>
<div class="input-group-append">
<span class="input-group-text" id="shortcut-page">
<kbd id="search-page-shortcut">⌘</kbd> <kbd>K</kbd>
</span>
</div>
<div class="input-group-append">
<button
type="button"
onclick="onReset()"
class="btn btn-danger"
><i class="fas fa-times"></i></button>
</div>
<div class="input-group-append">
<button type="submit" class="btn btn-primary"><i class="fas fa-search fa-lg" aria-hidden="true"></i></button>
</div>
</div>
</div>
<div class="form row mb-2">
<label for="doc_section" class="col sr-only">Filter by section</label>
<div class="col">
<div class="form-check">
<input class="form-check-input" type="radio" name="doc_section" id="doc_section_all" value="all" checked>
<label class="form-check-label" for="doc_section_all">
All Documentation
</label>
</div>
{% for id, title in
[
["backend","Backend"],
["plone.api","plone.api"],
["plone.restapi","plone.restapi"],
["classic-ui","Classic UI"],
["volto","Frontend"],
["contributing","Contributing"],
] %}
<div class="form-check">
<input class="form-check-input" type="radio" name="doc_section" id="doc_section_{{id}}" value="{{id}}">
<label class="form-check-label" for="doc_section_{{id}}">
{{title}}
</label>
</div>
{% endfor %}
</div>
</div>
<span id="search-progress" style="padding-left: 10px"></span>
</form>
{% endblock %}
{% block searchresults %}
<div id="search-results">
{% if search_results %}
<ul>
{% for href, caption, context in search_results %}
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
<div class="context">{{ context|e }}</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}
{% endblock %}
{% block footer %}
<script type="text/javascript">
$(document).ready(function() {
// Hide empty sub menu.
if ($.trim($(".topbar-contents .bd-toc").html()) === "") {
$(".topbar-contents .bd-toc").css("visibility", "hidden");
}
});
</script>
{% endblock %}