.
This commit is contained in:
parent
2a9167cb7e
commit
96573664a6
95 changed files with 4130 additions and 2328 deletions
36
layouts/_default/search.html
Normal file
36
layouts/_default/search.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<p>This is not a very clever search. It simply looks if the content of a post contains your query. </p>
|
||||
|
||||
<input type="text" id="search" placeholder="🔎 leaf through the archive"/>
|
||||
|
||||
<ul id="results"></ul>
|
||||
|
||||
<p>Alternatively, this is everything.</p>
|
||||
|
||||
{{ $pages := where site.RegularPages "Type" "posts" }}
|
||||
{{ $years := $pages.GroupByDate "2006" }}
|
||||
|
||||
<ul class="tree">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="folder">{{ .Key }}</span>
|
||||
<ul>
|
||||
{{ $months := .Pages.GroupByDate "January" }}
|
||||
{{ range $months }}
|
||||
<li>
|
||||
<span class="folder">{{ .Key }}</span>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue