forked from electron/electronjs.org-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
64 lines (59 loc) · 1.89 KB
/
search.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
{{#*inline "searchForm"}}
<form action="/search" method="get" class="search-form">
<input
class="col-sm-8 col-xs-12 px-3 py-3 my-2"
placeholder="> search_term"
type="search"
autofocus="on"
autocapitalize="off"
autocorrect="off"
name="q"
value="{{query.q}}"
>
<button class="btn-link my-2 ml-4" type="submit">
<span class="octicon octicon-search"></span>
</button>
</form>
{{/inline}}
{{#if query.q}}
<section class="page-section">
<div class="container-narrow search-results">
{{> searchForm}}
<h4 class="mb-4">Search Results for <i>“{{query.q}}”</i></h4>
{{#each searchResults}}
<div class="my-8">
<h2>
<a href="search/{{searchOp.name}}?q={{../query.q}}"><span class="mega-octicon octicon-{{searchOp.octicon}} mr-1"></span></a>
<a href="search/{{searchOp.name}}?q={{../query.q}}">{{searchOp.displayName}}</a>
<span class="faint">({{resultsNum}})</span>
</h2>
{{> (lookup searchOp 'partial')}}
{{#unless ../searchIn}}
<div class="mt-3"><a href="search/{{searchOp.name}}?q={{../query.q}}">View more results <span class="octicon octicon-arrow-small-right"></span></a></div>
{{/unless}}
</div>
{{/each}}
</div>
</section>
{{else}}
<section class="page-section">
<div class="container-narrow">
<p class="lead m-4 text-center">
{{#if searchIn}}
{{#eq searchIn 'docs'}}
{{localized.search.description_docs}}
{{/eq}}
{{#eq searchIn 'npmPackages'}}
{{localized.search.description_npm}}
{{/eq}}
{{#eq searchIn 'repos'}}
{{localized.search.description_repos}}
{{/eq}}
{{else}}
{{{localized.search.description_all}}}
{{/if}}
</p>
{{> searchForm}}
</div>
</section>
{{/if}}