about summary refs log tree commit diff
path: root/layouts/_default/list.html
blob: 8a60cb43acbe5c0fb3bf763380b58ab86889921a (plain) (blame)
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
{{/*
SPDX-FileCopyrightText: 2022 Ngô Ngọc Đức Huy <huyngo@disroot.org>

SPDX-License-Identifier: MIT
*/}}

{{ define "main" }}
  <section class="index-content">
    {{ .Content }}
  </section>
  <section class="toc">
    <h1 class="post-title">{{ i18n .Title }}</h1>
    {{ $pages := where .Pages "Type" "in" site.Params.mainSections }}
    <ol>
      {{ range $pages }}
        <li class="post-short-list h-entry">
          <h2 class="p-name post-title{{ if .Params.draft }} draft{{end}}">
            <a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a>
          </h2>
          {{ partial "post-language-switcher.html" . }}
          {{ partial "post-info.html" . }}
        </li>
      {{ end }}
      <li>
  </section>
{{ end }}