59 lines
No EOL
1.3 KiB
HTML
59 lines
No EOL
1.3 KiB
HTML
{{ define "body" }}
|
|
<body class="wiki layout-wiki-list">
|
|
{{ $currentFolderName := or $.File.ContentBaseName "index" }}
|
|
{{ partial "kb/site-header.html" .}}
|
|
{{ partial "kb/breadcrumbs.html" .}}
|
|
<main>
|
|
<section class="section list">
|
|
<div class="container">
|
|
<header class="section-header">
|
|
{{ if .IsHome }}
|
|
<h1 class="section-title">{{.Site.Title}}</h1>
|
|
{{ else }}
|
|
<h1 class="section-title">{{or .Title .File.Dir}}</h1>
|
|
{{ end }}
|
|
{{ if isset .Params "summary" }}
|
|
{{ .Summary }}
|
|
{{ end }}
|
|
</header>
|
|
<div class="content hugo-content">
|
|
{{.Content}}
|
|
</div>
|
|
{{ with sort .Sections "File.BaseFileName" }}
|
|
<nav>
|
|
<h2 class="subsections-title">Sub-sections of {{ $currentFolderName }}</h2>
|
|
<ul class="subsections">
|
|
{{ range where . "Section" "not in" (slice "search" "sitemap") }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">
|
|
{{ path.Base (path.Split .File.Path).Dir }}/
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
{{ end }}
|
|
{{ with sort .RegularPages "File.BaseFileName" }}
|
|
<nav>
|
|
<h2 class="subpages-title">Pages within {{ $currentFolderName }}</h2>
|
|
<ul class="subpages">
|
|
{{ range . }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">
|
|
{{ $firstH1 := partial "firstH1.html" . }}
|
|
{{ if .Site.Params.use_titles_in_section_lists}}
|
|
{{ or .Title $firstH1 .File.BaseFileName }}
|
|
{{ else }}
|
|
{{ .File.LogicalName }}
|
|
{{ end }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
{{ end }}
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
{{ end }} |