diff options
Diffstat (limited to 'layouts/docs')
-rw-r--r-- | layouts/docs/baseof.html | 11 | ||||
-rw-r--r-- | layouts/docs/list.html | 34 | ||||
-rw-r--r-- | layouts/docs/single.html | 24 |
3 files changed, 69 insertions, 0 deletions
diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html new file mode 100644 index 0000000..2e4e23a --- /dev/null +++ b/layouts/docs/baseof.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + {{- partial "head.html" . -}} + <body> + {{- partial "nav.html" "docs" -}} + <main> + {{- block "main" . }}{{- end }} + </main> + {{- partial "footer.html" . -}} + </body> +</html> diff --git a/layouts/docs/list.html b/layouts/docs/list.html new file mode 100644 index 0000000..f8d665a --- /dev/null +++ b/layouts/docs/list.html @@ -0,0 +1,34 @@ +{{ define "main" }} + <div> + <h1 class="title" style="{{ if eq (len .Pages) 0 }}text-align: center;{{ end }}"> + {{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }} + </h1> + <p>{{ .Description }}</p> + + {{ .Content }} + + <ul class="range"> + {{ if ne (len .Sections) 0}} + {{ range .Sections }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + <ul class="range"> + <!-- Show pages under this section (but not subsections) --> + {{ range (union .Sections .Pages).ByWeight }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + </li> + {{ end }} + </ul> + </li> + {{ end }} + {{ else }} + {{ range .RegularPages.ByWeight }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + </li> + {{ end }} + {{ end }} + </ul> + </div> +{{ end }} diff --git a/layouts/docs/single.html b/layouts/docs/single.html new file mode 100644 index 0000000..64a74e4 --- /dev/null +++ b/layouts/docs/single.html @@ -0,0 +1,24 @@ +{{ define "main" }} +{{ $wrappedTable := printf "<div class='table-wrapper'> ${1} </div>" }} +<div> + <h1 style="text-align: center;" class="title">{{ .Title }}</h1> + <!--p style="text-align: center;">{{ .Summary }}</p--> + {{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }} + + <!-- For some reason prevpage shows next and vice versa --> + <div class="page-nav"> + <span> + {{ if .NextInSection }} + <a href="{{ .NextInSection.Permalink }}">Previous: {{ .NextInSection.Title }}</a> + {{ end }} + </span> + + <span> + {{ if .PrevInSection }} + <a href="{{ .PrevInSection.Permalink }}">Next: {{ .PrevInSection.Title }}</a> + {{ end }} + </span> + </div> + +</div> +{{ end }} |