diff options
author | tdro <tdro@noreply.example.com> | 2023-09-09 19:12:32 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-09-09 19:12:32 -0400 |
commit | 14fca032762fc1c92c3e6798aa1c628b1151d443 (patch) | |
tree | 8a0c52b33d5087d035cb777f6fe234a8cc276a5c /themes/default/layouts/_default/home.sources.html | |
parent | a625a207790a7d95357f8f16bb936e82464674d6 (diff) | |
download | canory-14fca032762fc1c92c3e6798aa1c628b1151d443.tar.gz canory-14fca032762fc1c92c3e6798aa1c628b1151d443.tar.bz2 canory-14fca032762fc1c92c3e6798aa1c628b1151d443.zip |
themes/default/layouts/_default/baseof: More granularity with header
Diffstat (limited to 'themes/default/layouts/_default/home.sources.html')
-rw-r--r-- | themes/default/layouts/_default/home.sources.html | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/themes/default/layouts/_default/home.sources.html b/themes/default/layouts/_default/home.sources.html index b498f4a..cea3826 100644 --- a/themes/default/layouts/_default/home.sources.html +++ b/themes/default/layouts/_default/home.sources.html @@ -1,28 +1,27 @@ -{{ define "title" }}Sources — {{ end }} -{{ define "description" }}This page contains a list of all source files — {{ end }} -{{ define "styles" }} +{{- define "title" -}}Sources — {{- end -}} +{{- define "description" -}}This page contains a list of all source files — {{- end -}} +{{- define "styles" -}} <style> {{ partial "navigator.css.html" (dict "Link" "/sources/") | safeCSS }} </style> -{{ end }} +{{- end -}} -{{ define "middle" }} +{{- define "header" -}} + {{- $_default := readDir (print "/themes/default/layouts/_default") -}} + {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}} + {{- $partials := readDir (print "/themes/default/layouts/partials") -}} + {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}} - {{ $_default := readDir (print "/themes/default/layouts/_default") }} - {{ $_markup := readDir (print "/themes/default/layouts/_default/_markup") }} - {{ $partials := readDir (print "/themes/default/layouts/partials") }} - {{ $shortcodes := readDir (print "/themes/default/layouts/shortcodes") }} - - {{ $fileCount := add + {{- $fileCount := add (add (sub (len $_default) 1) (len $_markup)) (add (len $partials) (len $shortcodes)) - }} + -}} - {{ partial "navigator-middle.html" + {{- partial "navigator-middle.html" (dict "Title" "Sources" "Subtitle" (print $fileCount " " "Files") @@ -32,11 +31,17 @@ "Id" "back" "Context" . ) - }} + -}} +{{- end -}} + +{{- define "middle" -}} + {{- $_default := readDir (print "/themes/default/layouts/_default") -}} + {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}} + {{- $partials := readDir (print "/themes/default/layouts/partials") -}} + {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}} <source-files> <item-list> - <h1>Defaults</h1> <ul> {{ range sort $_default ".ModTime" "desc" }} @@ -109,11 +114,9 @@ · Fuzzy Sort by Stephen Kamenar: <a href="https://github.com/farzher/fuzzysort/blob/e7f484a124f09bf3cb9a4db366a95457d962dbed/LICENSE">MIT License</a> </p> </footer> - </source-files> +{{- end -}} -{{ end }} - -{{ define "right" }} +{{- define "right" -}} {{- partial "navigator-right.html" . -}} -{{ end }} +{{- end -}} |