GoBlog/templates/search.gohtml

21 lines
686 B
Plaintext
Raw Normal View History

2020-11-15 10:34:48 +00:00
{{ define "title" }}
2021-08-04 21:26:38 +00:00
<title>{{ with .Blog.Search.Title }}{{ mdtitle . }} - {{ end }}{{ mdtitle .Blog.Title }}</title>
2020-11-15 10:34:48 +00:00
{{ end }}
{{ define "main" }}
<main>
2021-08-04 21:26:38 +00:00
{{ with .Blog.Search.Title }}<h1>{{ mdtitle . }}</h1>{{ end }}
2020-11-15 10:34:48 +00:00
{{ with .Blog.Search.Description }}{{ md . }}{{ end }}
{{ if (or .Blog.Search.Title .Blog.Search.Description) }}
<hr>
{{ end }}
2021-07-22 11:41:52 +00:00
<form class="fw p" method="post">
2021-08-04 21:26:38 +00:00
<input type="text" name="q" {{ with .Blog.Search.Placeholder }}placeholder="{{ mdtitle . }}"{{ end }}>
2021-07-22 11:41:52 +00:00
<input type="submit" value="🔍 {{ string .Blog.Lang "search" }}">
2020-12-12 21:23:07 +00:00
</form>
2020-11-15 10:34:48 +00:00
</main>
{{ end }}
{{ define "search" }}
{{ template "base" . }}
{{ end }}