summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-01-26 14:00:48 -0500
committerSam Anthony <sam@samanthony.xyz>2026-01-26 14:00:48 -0500
commitbe4365f71e48ed8752fe1cb1fcb516280d2866a8 (patch)
tree0c09d61f9993cd3e2f7138988e04269a3baa32d8 /layouts
parent71fc39ec0d5c5ea5508e12a7bbbc1d09164802b7 (diff)
downloadsamanthony.xyz-be4365f71e48ed8752fe1cb1fcb516280d2866a8.zip
add uni transcript to resume page
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_partials/asset-table.html3
-rw-r--r--layouts/_partials/assets.html12
-rw-r--r--layouts/_shortcodes/asset-table.html12
-rw-r--r--layouts/_shortcodes/preview.html3
-rw-r--r--layouts/articles/page.html1
-rw-r--r--layouts/resume/page.html8
6 files changed, 18 insertions, 21 deletions
diff --git a/layouts/_partials/asset-table.html b/layouts/_partials/asset-table.html
index df47501..edc0b01 100644
--- a/layouts/_partials/asset-table.html
+++ b/layouts/_partials/asset-table.html
@@ -22,8 +22,9 @@ the modification times of files when the repository is cloned.
{{- range . }}
<tr>
<td>
+ {{- $dateFmt := "2006-01-02" -}}
{{- with resources.Get (printf "%s.moddate" .Name) -}}
- {{- chomp .Content | time | dateFormat "2006-01-02" -}}
+ {{- chomp .Content | time | dateFormat $dateFmt -}}
{{- end -}}
</td>
<td><a href="{{ .RelPermalink }}">{{ path.Base .Name }}</a></td>
diff --git a/layouts/_partials/assets.html b/layouts/_partials/assets.html
deleted file mode 100644
index 8bb5d2a..0000000
--- a/layouts/_partials/assets.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{{- /*
-Render a list of tables of assets.
-
-@context {dict} . Mapping from section titles to asset glob patterns.
-
-@examle: {{ partial "assets.html" (dict "Spreadsheets" "auto/*.ods") }}
-*/}}
-
-{{- range $title, $pattern := . -}}
- <h1>{{ strings.FirstUpper $title }}</h1>
- {{ partial "asset-table.html" (resources.Match $pattern) }}
-{{- end -}}
diff --git a/layouts/_shortcodes/asset-table.html b/layouts/_shortcodes/asset-table.html
new file mode 100644
index 0000000..82849fd
--- /dev/null
+++ b/layouts/_shortcodes/asset-table.html
@@ -0,0 +1,12 @@
+{{- $patterns := slice -}}
+{{- range split (.Get "patterns") "," }}
+ {{- $pattern := strings.TrimSpace . -}}
+ {{- $patterns = $patterns | append $pattern -}}
+{{- end -}}
+
+{{- $assets := slice -}}
+{{- range $patterns }}
+ {{- $assets = union $assets (resources.Match .) -}}
+{{- end -}}
+
+{{ partial "asset-table.html" $assets }}
diff --git a/layouts/_shortcodes/preview.html b/layouts/_shortcodes/preview.html
new file mode 100644
index 0000000..450b57e
--- /dev/null
+++ b/layouts/_shortcodes/preview.html
@@ -0,0 +1,3 @@
+{{- $src := .Get "src" -}}
+<h1>Preview of <a href="{{ $src }}"><span class="mono">{{ path.Base $src }}</span></a></h1>
+<iframe src="{{ $src }}"></iframe>
diff --git a/layouts/articles/page.html b/layouts/articles/page.html
index 357cc9f..6465f71 100644
--- a/layouts/articles/page.html
+++ b/layouts/articles/page.html
@@ -12,5 +12,4 @@
</p>
<hr>
{{ .Content }}
- {{ partial "assets" .Params.Assets }}
{{ end }}
diff --git a/layouts/resume/page.html b/layouts/resume/page.html
index b2613c6..e0e8308 100644
--- a/layouts/resume/page.html
+++ b/layouts/resume/page.html
@@ -1,9 +1,3 @@
{{ define "main" }}
- <h1 class="title">Résumé</h1>
- <ul>
- <li><a href="/resume.pdf">PDF →</a></li>
- <li><a href="/resume/resume.html">HTML →</a></li>
- </ul>
- <h1>Preview</h1>
- <iframe src="/resume/resume.html"></iframe>
+ {{ .Content }}
{{ end }}