mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-04-04 17:57:05 +00:00
25 lines
1013 B
HTML
25 lines
1013 B
HTML
{{define "search:"}}Search: {{.}}{{end}}
|
||
{{define "title"}}{{template "search:" .Query}}{{end}}
|
||
{{define "body"}}
|
||
<main class="main-width">
|
||
<h1>{{block "search results for" .Query}}Search results for ‘{{.}}’{{end}}</h1>
|
||
{{if .MatchedHyphaName}}
|
||
<p>{{block "go to hypha" .}}Go to hypha <a class="wikilink{{if .HasExactMatch | not}} wikilink_new{{end}}" href="/hypha/{{.MatchedHyphaName}}">{{beautifulName .MatchedHyphaName}}</a>.{{end}}</p>
|
||
{{end}}
|
||
{{if len .Results}}
|
||
<ol>
|
||
{{range .Results}}
|
||
<li>
|
||
<a href="/hypha/{{.Name}}">{{beautifulName .Name}}</a>
|
||
{{if .Ext}}<span class="media-type-badge">{{.Ext}}</span>{{end}}
|
||
{{if .Metadata.Words}}<span class="media-type-badge">{{.Metadata.Words}} words</span>{{end}}
|
||
{{if .Metadata.Updated}}<span class="media-type-badge">{{.Metadata.Updated.Format "2006-01-02 15:04"}}</span>{{end}}
|
||
</li>
|
||
{{end}}
|
||
</ol>
|
||
{{else}}
|
||
<p>{{block "search no results" .}}No results{{end}}</p>
|
||
{{end}}
|
||
</main>
|
||
{{end}}
|