forked from CCCHH/ccchh-website
Blog: List page with summary and pagination
This commit is contained in:
parent
a80cb42a34
commit
171fa015f1
14 changed files with 282 additions and 53 deletions
37
themes/ccchh/layouts/partials/blog-header.html
Normal file
37
themes/ccchh/layouts/partials/blog-header.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
{{- $page := .page -}}
|
||||
{{- $isMain := not .subitem -}}
|
||||
|
||||
{{ with $page }}
|
||||
<header>
|
||||
{{- if $isMain }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- else }}
|
||||
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
|
||||
{{- end }}
|
||||
{{- with .Params.subtitle }}
|
||||
<span class="subtitle">{{ . }}</span>
|
||||
{{- end }}
|
||||
|
||||
<div class="infos">
|
||||
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date.Format "2006-01-02 15:04" }}</span>
|
||||
{{- with .Params.location }}
|
||||
<span class="li-space"><i class="fa-solid fa-location-dot"></i> {{ . }}</span>
|
||||
{{- end }}
|
||||
{{- with .Page.GetTerms "tags" }}
|
||||
<span class="li-space"><i class="fa-solid fa-tag"></i>
|
||||
{{- range . }}
|
||||
<span class="li-comma"><a href="{{ .Permalink }}">{{ .Title }}</a></span>
|
||||
{{- end }}
|
||||
</span>
|
||||
{{- end }}
|
||||
<br>
|
||||
{{- with .Page.GetTerms "authors" }}
|
||||
<span class="li-space"><i class="fa-regular fa-user"></i>
|
||||
{{- range . }}
|
||||
<span class="li-comma"><a href="{{ .Permalink }}">{{ .Title }}</a></span>
|
||||
{{- end }}
|
||||
</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
</header>
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue