hugo-PaperMod/layouts/_default/search.html
Haris Trgo a0016f50f6 feat: new language switch behaviour, always listing all languages by weight but linking to translations if available
feat: if language switch shows language codes (instead of full language name), those codes are now uppercase
feat: translation list in post headers are replaced by links to translations in page headers - the old translation list in the post header can still be enabled using the boolean parameter "showTranslationListInPosts" (i.e. to turn it back on, add the parameter to your hugo.toml and set it to true)
2023-02-13 21:32:40 +01:00

30 lines
1.0 KiB
HTML

{{- define "main" }}
<header class="page-header">
<h1>{{- (printf "%s&nbsp;" .Title ) | htmlUnescape -}}
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
{{- if and (.Param "showTranslationListInPosts") (not (.Param "hideMeta")) }}
<div class="post-meta">
{{- partial "translation_list.html" . -}}
</div>
{{- end }}
</header>
<div id="searchbox">
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}"
aria-label="search" type="search" autocomplete="off">
<ul id="searchResults" aria-label="search results"></ul>
</div>
{{- end }}{{/* end main */}}