123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {{/* Partial for built-in search and Algolia search. */}}
- {{ if eq site.Params.search.engine 1 | or (eq site.Params.search.engine 2) }}
- <aside class="search-results" id="search">
- <div class="container">
- <section class="search-header">
- <div class="row no-gutters justify-content-between mb-3">
- <div class="col-6">
- <h1>{{ i18n "search" }}</h1>
- </div>
- <div class="col-6 col-search-close">
- <a class="js-search" href="#"><i class="fas fa-times-circle text-muted" aria-hidden="true"></i></a>
- </div>
- </div>
- <div id="search-box">
- {{ if eq site.Params.search.engine 1 }}
- <input name="q" id="search-query" placeholder="{{i18n "search_placeholder"}}" autocapitalize="off"
- autocomplete="off" autocorrect="off" spellcheck="false" type="search" class="form-control">
- {{ else }}
- <!-- Search box will appear here -->
- {{ end }}
- </div>
- {{ if eq site.Params.search.engine 1 | and site.Data.search_queries }}
- <div id="search-common-queries" class="pt-3">
- <div class="font-weight-bold pb-3">{{ i18n "search_common_queries" | default "Common searches" }}</div>
- <ul class="fa-ul">
- {{ range site.Data.search_queries }}
- <li class="pb-3">
- <a href="{{.link | relURL}}"><i class="fa-li fas fa-search" aria-hidden="true"></i><span class="pl-1">{{.query | markdownify | emojify}}</span></a>
- </li>
- {{ end }}
- </ul>
- </div>
- {{ end }}
- </section>
- <section class="section-search-results">
- <div id="search-hits">
- <!-- Search results will appear here -->
- </div>
- </section>
- </div>
- </aside>
- {{end}}
|