{{- $actionURL := .Site.Params.widgets.search.url | default "https://google.com/search" -}}
{{- $inputName := .Site.Params.widgets.search.input.name | default "sitesearch" -}}
{{- $inputPre := .Site.Params.widgets.search.input.pre -}}

<div class="widget-search widget">
	<form class="widget-search__form" role="search" method="get" action="{{ $actionURL }}">
		<label>
			<input class="widget-search__field" type="search" placeholder="{{ T "search_placeholder" }}" value="" name="q" aria-label="{{ T "search_placeholder" }}">
		</label>
		<input class="widget-search__submit" type="submit" value="Search">
		{{ if $inputName -}}<input type="hidden" name="{{ $inputName }}" value="{{ $inputPre }}{{ .Site.BaseURL }}">{{- end }}
	</form>
</div>