mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
feat: put archives search form under categories list
This commit is contained in:
parent
b7daa97c28
commit
820a5d55f8
@ -5,19 +5,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ define "main" }}
|
{{ 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" -}}
|
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
|
||||||
{{- $terms := $taxonomy.Pages -}}
|
{{- $terms := $taxonomy.Pages -}}
|
||||||
{{ if $terms }}
|
{{ if $terms }}
|
||||||
@ -33,6 +20,19 @@
|
|||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{ 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 }}
|
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||||
|
|
||||||
{{ range $pages.GroupByDate "2006" }}
|
{{ range $pages.GroupByDate "2006" }}
|
||||||
|
Loading…
Reference in New Issue
Block a user