summaryrefslogtreecommitdiffstats
path: root/layouts/index.html
blob: f0f88ae410ca8e3bcfa970d23408338772aa6339 (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
{{ define "main" }}
{{- with .Content }}
    <div class="introduction">
        {{ . }}
    </div>
    <hr>
    <div class="toc">
        {{/* TODO: Translate me */}}
        <h2>Latest Publications</h2>
        <ul class="texts">
            {{ range first 10 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections) }}
                <li class="text-title">
                    <a href="{{ .Permalink }}">{{ .Title }}</a>
                </li>
            {{ end }}
        </ul>
    </div>
{{- else }}
    {{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
    <div class="articles">
        {{ with .Title }}<h1 class="page-title">{{ . }}</h1>{{ end }}
        {{ range $paginator.Pages }}{{- .Render "teaser" }}{{ end }}
    </div>
{{- end }}
{{- end }}