summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-01-21 13:08:20 -0500
committerSam Anthony <sam@samanthony.xyz>2026-01-21 13:08:20 -0500
commit97d154d31a018290c35a8c42ae5ed7cad7bb6381 (patch)
treed15b7790a97785f007593386aa50829e1c4121de /layouts
parente19da24b0484af874b838b21c8a8c644a609f635 (diff)
downloadsamanthony.xyz-97d154d31a018290c35a8c42ae5ed7cad7bb6381.zip
move automotive spreadsheets to articles section
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/articles/header.html8
-rw-r--r--layouts/_partials/footer.html2
-rw-r--r--layouts/articles/automotive-spreadsheets.html6
-rw-r--r--layouts/articles/page.html8
-rw-r--r--layouts/auto/page.html6
-rw-r--r--layouts/list.html4
6 files changed, 17 insertions, 17 deletions
diff --git a/layouts/_partials/articles/header.html b/layouts/_partials/articles/header.html
new file mode 100644
index 0000000..e415b89
--- /dev/null
+++ b/layouts/_partials/articles/header.html
@@ -0,0 +1,8 @@
+<h1 class="title">{{ .Title }}</h1>
+<p>
+ {{- partial "date.html" .Date -}}
+ {{- if gt .Lastmod .Date -}}
+ &mdash; modified {{ partial "date.html" .Lastmod }}
+ {{- end -}}
+</p>
+<hr>
diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html
index 32249a9..882c3f8 100644
--- a/layouts/_partials/footer.html
+++ b/layouts/_partials/footer.html
@@ -13,6 +13,6 @@
{{- $commitUrl := printf "%s?id=%s" $baseUrl .Hash }}
Last modified {{ .CommitDate.Format "2006-01-02" }}:
<a href="{{ $commitUrl }}">{{ .AbbreviatedHash }}</a>.
- <a href="{{ $repoUrl }}">Source&nbsp;code&nbsp;→</a>
{{- end }}
+ <a href="{{ $repoUrl }}">Source&nbsp;code&nbsp;→</a>
</p>
diff --git a/layouts/articles/automotive-spreadsheets.html b/layouts/articles/automotive-spreadsheets.html
new file mode 100644
index 0000000..b2e27ab
--- /dev/null
+++ b/layouts/articles/automotive-spreadsheets.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+ {{ partial "articles/header.html" . }}
+ {{ .Content }}
+ {{ partial "asset-table.html" (resources.Match "auto/*.ods") }}
+ {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
+{{ end }}
diff --git a/layouts/articles/page.html b/layouts/articles/page.html
index 8b8eb16..e15623e 100644
--- a/layouts/articles/page.html
+++ b/layouts/articles/page.html
@@ -1,11 +1,5 @@
{{ define "main" }}
- {{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" -}}
- {{- $dateHuman := .Date | time.Format "2006-01-02" -}}
- <div>
- <h1 class="title">{{ .Title }}</h1>
- <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
- </div>
-
+ {{ partial "articles/header.html" . }}
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}
diff --git a/layouts/auto/page.html b/layouts/auto/page.html
deleted file mode 100644
index f51c292..0000000
--- a/layouts/auto/page.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{{ define "main" }}
- <h1 class="title">{{ .Title }}</h1>
- {{ .Content }}
- <h1>Spreadsheets</h1>
- {{- partial "asset-table.html" (resources.Match "auto/*.ods") }}
-{{ end }}
diff --git a/layouts/list.html b/layouts/list.html
index edee471..8c2a19f 100644
--- a/layouts/list.html
+++ b/layouts/list.html
@@ -9,10 +9,8 @@
</thead>
<tbody>
{{ range .Pages }}
- {{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" -}}
- {{- $dateHuman := .Date | time.Format "2006-01-02" -}}
<tr>
- <td><time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time></td>
+ <td>{{ partial "date.html" .Date -}}</td>
<td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td>
</tr>
{{ end }}