From 03d596db3dc1e90fcd63ac5f203326773de75e28 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 10 Jan 2026 18:42:34 -0500 Subject: automotive spreadsheets --- layouts/_partials/asset_table.html | 32 ++++++++++++++++++++++++++++++++ layouts/auto/page.html | 6 ++++++ layouts/list.html | 2 +- layouts/term.html | 7 ------- 4 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 layouts/_partials/asset_table.html create mode 100644 layouts/auto/page.html delete mode 100644 layouts/term.html (limited to 'layouts') diff --git a/layouts/_partials/asset_table.html b/layouts/_partials/asset_table.html new file mode 100644 index 0000000..116b22d --- /dev/null +++ b/layouts/_partials/asset_table.html @@ -0,0 +1,32 @@ +{{- /* +For a given collection of global resources, render a table with +the modification date of each resource and a link to the resource. +The resources must be from the assets/ directory in order to get their +modification times. + +@context {,} resource.Resources + +@example: {{ partial "asset_table.html" (resources.Match "spreadsheets/*.ods") }} +*/}} + + + + + + + + + + {{ range . }} + {{- $fpath := printf "assets/%s" .Name -}} + + + + + {{- end }} + +
Mod. dateFile
+ {{- with os.Stat $fpath -}} + {{- .ModTime | time.Format "2006-01-02" -}} + {{- end -}} + {{ path.Base .Name }}
diff --git a/layouts/auto/page.html b/layouts/auto/page.html new file mode 100644 index 0000000..eaa06d7 --- /dev/null +++ b/layouts/auto/page.html @@ -0,0 +1,6 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +

Spreadsheets

+ {{- partial "asset_table.html" (resources.Match "auto/*.ods") }} +{{ end }} diff --git a/layouts/list.html b/layouts/list.html index cc6c7be..edee471 100644 --- a/layouts/list.html +++ b/layouts/list.html @@ -1,5 +1,5 @@ {{ define "main" }} -

{{ .Title }}

+

{{ .Title }}

diff --git a/layouts/term.html b/layouts/term.html deleted file mode 100644 index c2e7875..0000000 --- a/layouts/term.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ define "main" }} -

{{ .Title }}

- {{ .Content }} - {{ range .Pages }} -

{{ .LinkTitle }}

- {{ end }} -{{ end }} -- cgit v1.2.3