Initial commit

This commit is contained in:
Christian Aribaud 2025-05-09 10:37:43 +02:00
commit 4e10967600
40 changed files with 1650 additions and 0 deletions

33
layouts/page.html Normal file
View file

@ -0,0 +1,33 @@
{{ define "main" }}
{{- $next_page := .CurrentSection.Pages.Prev . }}
{{- $current := . }}
{{- range .Ancestors }}
{{ with .Pages.Prev $current }}
{{ $next_page = . }}
{{ break }}
{{ end }}
{{ $current = . }}
{{- end }}
{{- $prev_page := .CurrentSection.Pages.Next . }}
{{- $prev_section := .Parent }}
<h1>{{ .Title }}</h1>
<p class="subtitle">Reading time: about {{ .ReadingTime }} min</p>
<hr>
<nav class="page-nav">
{{ with or $prev_page $prev_section }}<a class="prev" title="Previous page" href="{{.RelPermalink}}">&lt; {{ .Title }}</a>{{ end }}
{{ with $next_page }}<a class="next" title="Next page" href="{{.RelPermalink}}">{{ .Title }} &gt;</a>{{ end }}
</nav>
<hr>
{{ .Summary }}
{{- if .Params.show_toc -}}
<hr>
{{ .TableOfContents }}
<hr>
{{- end }}
{{ .ContentWithoutSummary }}
<hr>
<nav class="page-nav">
{{ with or $prev_page $prev_section }}<a class="prev" title="Previous page" href="{{.RelPermalink}}">&lt; {{ .Title }}</a>{{ end }}
{{ with $next_page }}<a class="next" title="Next page" href="{{.RelPermalink}}">{{ .Title }} &gt;</a>{{ end }}
</nav>
{{ end }}