2022-02-26 17:45:25 -05:00
|
|
|
{{- $query := first 1 (where .Context.Site.Pages "Layout" "==" "search") -}}
|
2021-01-01 07:12:23 -05:00
|
|
|
{{- if $query -}}
|
|
|
|
{{- $searchPage := index $query 0 -}}
|
|
|
|
<form action="{{ $searchPage.RelPermalink }}" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
|
|
|
<p>
|
|
|
|
<label>{{ T "search.title" }}</label>
|
|
|
|
<input name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
|
|
|
|
|
|
|
<button title="{{ T `search.title` }}">
|
|
|
|
{{ partial "helper/icon" "search" }}
|
|
|
|
</button>
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
{{- else -}}
|
|
|
|
{{- warnf "Search page not found. Create a page with layout: search." -}}
|
|
|
|
{{- end -}}
|