blob: 7dde6ebe340a7413e99de82f121b59d194a6cefe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{{ define "main" }}
{{- $mainSections := site.Params.mainSections | default (slice "post") }}
{{- with .Content }}
<div class="introduction">
{{ . }}
</div>
{{- $section := where site.RegularPages "Section" "in" $mainSections }}
{{- $section_count := len $section }}
{{- if ge $section_count 1 }}
<hr>
<div class="toc">
{{/* TODO: Translate me */}}
<h2>Latest Publications</h2>
<ul class="texts">
{{ range first 10 $section }}
<li class="text-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{- else }}
{{ $paginator := .Paginate (where site.RegularPages "Section" "in" $mainSections) }}
<div class="articles">
{{ with .Title }}<h1 class="page-title">{{ . }}</h1>{{ end }}
{{ range $paginator.Pages }}{{- .Render "teaser" }}{{ end }}
</div>
{{- end }}
{{- end }}
|