diff options
Diffstat (limited to 'themes/default/layouts/_default/home.sources.html')
-rw-r--r-- | themes/default/layouts/_default/home.sources.html | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/themes/default/layouts/_default/home.sources.html b/themes/default/layouts/_default/home.sources.html index 4d485e7..42b6cc3 100644 --- a/themes/default/layouts/_default/home.sources.html +++ b/themes/default/layouts/_default/home.sources.html @@ -1,48 +1,53 @@ -{{ define "title" }}Sources — {{ end }} -{{ define "description" }}This page contains a list of all source files — {{ end }} -{{ define "styles" }} +{{- define "title" -}}Sources — {{ end -}} +{{- define "description" -}}A list of all sources — {{ end -}} +{{- define "styles" -}} <style> - {{ partial "styles-navigator.html" (dict "Link" "/sources/") | safeCSS }} + {{ 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") + "Subtitle" (print $fileCount " " "Total") "Icon" "arrow-left" "IconLabel" "Back" "Href" "/" "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" }} {{ if not .IsDir }} <li> - <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/_default/{{ .Name }}"> + <a download="true" title="{{ .Name }}" href="{{ "" | absURL }}/sources/files/_default/{{ .Name }}"> <span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span> <span><code>{{ .Name }}</code></span> <span><code>{{ .Size -}}</code></span> @@ -57,7 +62,7 @@ {{ range sort $_markup ".ModTime" "desc" }} {{ if not .IsDir }} <li> - <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/_default/_markup/{{ .Name }}"> + <a download="true" title="{{ .Name }}" href="{{ "" | absURL }}/sources/files/_default/_markup/{{ .Name }}"> <span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span> <span><code>{{ .Name }}</code></span> <span><code>{{ .Size -}}</code></span> @@ -72,7 +77,7 @@ {{ range sort $partials ".ModTime" "desc" }} {{ if not .IsDir }} <li> - <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/partials/{{ .Name }}"> + <a download="true" title="{{ .Name }}" href="{{ "" | absURL }}/sources/files/partials/{{ .Name }}"> <span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span> <span><code>{{ .Name }}</code></span> <span><code>{{ .Size -}}</code></span> @@ -87,7 +92,7 @@ {{ range sort $shortcodes ".ModTime" "desc" }} {{ if not .IsDir }} <li> - <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/shortcodes/{{ .Name }}"> + <a download="true" title="{{ .Name }}" href="{{ "" | absURL }}/sources/files/shortcodes/{{ .Name }}"> <span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span> <span><code>{{ .Name }}</code></span> <span><code>{{ .Size -}}</code></span> @@ -101,19 +106,17 @@ <footer> <p> Canory Version: {{ "{{% version number %}}" | markdownify }} - · Dictionary Access by Paul Lutus: <a href="https://arachnoid.com/javascript/dictionary_access.js">GPLv2+ License</a> - · Feather Icons by Cole Bemis: <a href="https://github.com/feathericons/feather/blob/8b5d6802fa8fd1eb3924b465ff718d2fa8d61efe/LICENSE">MIT License</a> - · Tabler Icons by PaweÅ‚ Kuna: <a href="https://github.com/tabler/tabler-icons/blob/60f39297d0f785f2e8635faca6857b2260b2d164/LICENSE">MIT License</a> - · Instant Page by Alexandre Dieulot: <a href="https://github.com/instantpage/instant.page/blob/729e97d5b3245552e41d8f92ed03d08f1d62ea46/LICENSE">MIT License</a> - · Fixed Search by Heracles Papatheodorou: <a href="https://gist.github.com/Arty2/8b0c43581013753438a3d35c15091a9f#file-license-md">MIT License</a> - · Fuzzy Sort by Stephen Kamenar: <a href="https://github.com/farzher/fuzzysort/blob/e7f484a124f09bf3cb9a4db366a95457d962dbed/LICENSE">MIT License</a> + · Dictionary Access by Paul Lutus: <a href="https://arachnoid.com/javascript/dictionary_access.js">GPLv2+ Licence</a> + · Feather Icons by Cole Bemis: <a href="https://github.com/feathericons/feather/blob/8b5d6802fa8fd1eb3924b465ff718d2fa8d61efe/Licence">MIT Licence</a> + · Tabler Icons by PaweÅ‚ Kuna: <a href="https://github.com/tabler/tabler-icons/blob/60f39297d0f785f2e8635faca6857b2260b2d164/Licence">MIT Licence</a> + · Instant Page by Alexandre Dieulot: <a href="https://github.com/instantpage/instant.page/blob/729e97d5b3245552e41d8f92ed03d08f1d62ea46/Licence">MIT Licence</a> + · Fixed Search by Heracles Papatheodorou: <a href="https://gist.github.com/Arty2/8b0c43581013753438a3d35c15091a9f#file-Licence-md">MIT Licence</a> + · Fuzzy Sort by Stephen Kamenar: <a href="https://github.com/farzher/fuzzysort/blob/e7f484a124f09bf3cb9a4db366a95457d962dbed/Licence">MIT Licence</a> </p> </footer> - </source-files> +{{- end -}} -{{ end }} - -{{ define "right" }} +{{- define "right" -}} {{- partial "navigator-right.html" . -}} -{{ end }} +{{- end -}} |