.
This commit is contained in:
parent
6623ee03f6
commit
44c8324063
120 changed files with 22842 additions and 4673 deletions
|
|
@ -1,36 +1,24 @@
|
|||
{{ define "main" }}
|
||||
<h1>Search</h1>
|
||||
<p>Search posts by keyword.</p>
|
||||
|
||||
<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"/>
|
||||
|
||||
<input type="text" id="search" placeholder="Search..." />
|
||||
<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>
|
||||
{{ with site.Taxonomies.tags }}
|
||||
<section class="tags">
|
||||
<h2>Tags</h2>
|
||||
{{ $tags := slice }}
|
||||
{{ range $name, $taxonomy := . }}
|
||||
{{ $tags = $tags | append (dict "name" $name "count" $taxonomy.Count) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ $sorted := sort $tags "count" "desc" }}
|
||||
<div class="tag-list">
|
||||
{{ range $i, $tag := $sorted }}
|
||||
{{ if $i }}<span class="sep">·</span>{{ end }}
|
||||
<a href="{{ "tags/" | relURL }}{{ $tag.name | urlize }}">{{ $tag.name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue