mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 18:31:45 +01:00
4d552a9df5
* feat: article page widget support * refactor: get rid of article toolbar Same 3 column layout for article page and homepage * add missing space
16 lines
No EOL
706 B
HTML
16 lines
No EOL
706 B
HTML
{{- $query := first 1 (where .Context.Site.Pages "Layout" "==" "search") -}}
|
|
{{- 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 -}} |