diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-28 11:12:09 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-28 11:12:09 +0200 |
| commit | b17ccbd2fa987395d42313a81b2227f5ec8d88ac (patch) | |
| tree | f37523bae5f862f849b88e5c9d52e6eca0106e5d /layouts/index.html | |
| parent | 7bc1c366a3c812a6e6e93d570896de29480e6015 (diff) | |
| download | gohugo-theme-ed-b17ccbd2fa987395d42313a81b2227f5ec8d88ac.tar.gz | |
Rework the "Latest Publications" section
Diffstat (limited to 'layouts/index.html')
| -rw-r--r-- | layouts/index.html | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/layouts/index.html b/layouts/index.html index 7dde6eb..d3091c7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,26 +1,13 @@ {{ 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 }} + {{- partial "mini-toc" . -}} {{- else }} + {{- $mainSections := site.Params.mainSections | default (slice "post") }} {{ $paginator := .Paginate (where site.RegularPages "Section" "in" $mainSections) }} <div class="articles"> {{ with .Title }}<h1 class="page-title">{{ . }}</h1>{{ end }} |
