.
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 }}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<header id="post-header">
|
||||
<h3>{{ .Title }}</h3>
|
||||
<h2>{{ .Title }}</h2>
|
||||
<div>
|
||||
{{- if isset .Params "date" -}} {{ if eq .Lastmod .Date }}
|
||||
<time>{{ .Date | time.Format (i18n "post.created") }}</time>
|
||||
<p>{{ .Date | time.Format (i18n "post.created") }}</p>
|
||||
{{ else }}
|
||||
<time>{{ .Lastmod | time.Format (i18n "post.updated") }}</time>
|
||||
<p>{{ .Lastmod | time.Format (i18n "post.updated") }}</p>
|
||||
{{ end }} {{- end -}}
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue