From 7209f91deba066899e5880d058e81ffb104d48bb Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 15 Oct 2021 00:36:50 -0400 Subject: themes/hugo-pt2021: add projects single, list, and partial --- themes/hugo-pt2021/layouts/projects/list.html | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 themes/hugo-pt2021/layouts/projects/list.html (limited to 'themes/hugo-pt2021/layouts/projects/list.html') diff --git a/themes/hugo-pt2021/layouts/projects/list.html b/themes/hugo-pt2021/layouts/projects/list.html new file mode 100644 index 0000000..0b5925b --- /dev/null +++ b/themes/hugo-pt2021/layouts/projects/list.html @@ -0,0 +1,46 @@ +{{- define "title" -}} + Projects +{{- end -}} + +{{- define "main" -}} +
+
+

+ Projects +

+ +
+ {{- $rows := union (where .Pages "Params.active" true) (where .Pages "Params.active" nil) -}} + {{- if len $rows -}} +

Current Projects

+ +
    + {{- range $rows.ByTitle -}} + {{- if (default true .Params.show) -}} + {{- partial "project_summary" . -}} + {{- end -}} + {{- end -}} +
+ {{- end -}} + + {{- $rows := where .Pages.ByTitle "Params.active" false -}} + {{- if len $rows -}} +

Old Projects

+ +
    + {{- range $rows.ByTitle -}} + {{- if (default true .Params.show) -}} + {{- partial "project_summary" . -}} + {{- end -}} + {{- end -}} +
+ {{- end -}} +
+
+
+{{- end -}} -- cgit v1.2.3