.
This commit is contained in:
parent
6623ee03f6
commit
44c8324063
120 changed files with 22842 additions and 4673 deletions
|
|
@ -4,6 +4,6 @@
|
|||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<main id="content">{{ block "main" . }}{{ end }}</main>
|
||||
{{ partial "footer.html" . }}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,20 @@
|
|||
{{ define "main" }} {{ range where site.RegularPages "Type" "in"
|
||||
site.Params.mainSections }}
|
||||
<a href="{{ .RelPermalink}}">{{ .Title }}</a>
|
||||
{{ end }} {{ end }}
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ $years := .Pages.GroupByDate "2006" }}
|
||||
<ul class="year-list">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<header id="post-header">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<div>
|
||||
{{- if isset .Params "date" -}} {{ if eq .Lastmod .Date }}
|
||||
<p>{{ .Date | time.Format (i18n "post.created") }}</p>
|
||||
{{ else }}
|
||||
<p>{{ .Lastmod | time.Format (i18n "post.updated") }}</p>
|
||||
{{ end }} {{- end -}}
|
||||
</div>
|
||||
<article class="post">
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
{{ with .Params.tags }}
|
||||
<div class="tags">
|
||||
{{ range . }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{- .Content -}}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
|
|||
11
layouts/_default/taxonomy.html
Normal file
11
layouts/_default/taxonomy.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{ define "main" }}
|
||||
<h1>Tags</h1>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
18
layouts/_default/term.html
Normal file
18
layouts/_default/term.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{ define "main" }}
|
||||
{{ $years := .Pages.GroupByDate "2006" }}
|
||||
<ul class="year-list">
|
||||
{{ range $years }}
|
||||
<li>
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<time>{{ .Date.Format "Jan 2 2006" }}</time>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue