Blog: Fix categories, blog single page template
This commit is contained in:
parent
e8eff8de55
commit
ad72231459
17 changed files with 157 additions and 43 deletions
|
@ -5,29 +5,27 @@
|
|||
{{ with .Params.subtitle }}
|
||||
<span class="subtitle">{{ . }}</span>
|
||||
{{ end }}
|
||||
|
||||
<div class="nav-aside">
|
||||
Filter nach Kategorie:
|
||||
<ul class="aside">
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<li>
|
||||
<a href="{{ .Page.Permalink }}">[{{ .Page.Title }}]</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<!-- TODO: Content summary -->
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }} | {{ .Title }}</a>
|
||||
<a href="{{ .Permalink }}"><span style="font-variant-numeric: tabular-nums;">{{ .Date.Format "2006-01-02" }}</span> | {{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ range .Pages.GroupByParam "kind" }}
|
||||
<h3>{{ .Key }}</h3>
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }} | {{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<!-- TODO: Pagination: see https://gohugo.io/templates/pagination/ -->
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
35
themes/ccchh/layouts/blog/single.html
Normal file
35
themes/ccchh/layouts/blog/single.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{ define "main" }}
|
||||
<main class="container" aria-role="main">
|
||||
<header class="header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- with .Params.subtitle }}
|
||||
<span class="subtitle">{{ . }}</span>
|
||||
{{- end }}
|
||||
|
||||
<div class="infos">
|
||||
<i class="fa-regular fa-calendar-xmark"></i> {{ .Date.Format "2006-01-02 15:04" }}
|
||||
{{- with .Params.location }},
|
||||
<i class="fa-solid fa-location-dot"></i> {{ . }}
|
||||
{{- end }}
|
||||
<br>
|
||||
{{- if .Params.authors }}
|
||||
<i class="fa-regular fa-user"></i>
|
||||
{{ range .Params.authors }}<span class="li-comma">{{ . }}</span>{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
|
||||
<div class="meta">
|
||||
{{- with .Params.publishDate }}
|
||||
<small class="li-comma">Veröffentlicht: {{ .Format "2006-01-02 15:04" }}</small>
|
||||
{{- end }}
|
||||
{{- with .Params.lastmod }}
|
||||
<small class="li-comma">letzte Änderung: {{ .Format "2006-01-02 15:04" }}</small>
|
||||
{{- end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue