feat: put archives search form under categories list

This commit is contained in:
Jimmy Cai 2024-03-24 23:58:28 +01:00
parent b7daa97c28
commit 820a5d55f8

View File

@ -5,19 +5,6 @@
{{- end -}}
{{ end }}
{{ define "main" }}
<form id="search-form" action="{{ .RelPermalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .RelPermalink }}"{{- end }}>
<p>
<label>{{ T "search.title" }}</label>
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
</p>
<button title="{{ T `search.title` }}">
{{ partial "helper/icon" "search" }}
</button>
</form>
<h3 class="search-result--title section-title"></h3>
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
{{- $terms := $taxonomy.Pages -}}
{{ if $terms }}
@ -33,6 +20,19 @@
</header>
{{ end }}
<form id="search-form" action="{{ .RelPermalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .RelPermalink }}"{{- end }}>
<p>
<label>{{ T "search.title" }}</label>
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
</p>
<button title="{{ T `search.title` }}">
{{ partial "helper/icon" "search" }}
</button>
</form>
<h3 class="search-result--title section-title"></h3>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ range $pages.GroupByDate "2006" }}