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 +++++++++++++++++++++++++ themes/hugo-pt2021/layouts/projects/single.html | 17 +++++++++ 2 files changed, 63 insertions(+) create mode 100644 themes/hugo-pt2021/layouts/projects/list.html create mode 100644 themes/hugo-pt2021/layouts/projects/single.html (limited to 'themes/hugo-pt2021/layouts/projects') 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 -}} diff --git a/themes/hugo-pt2021/layouts/projects/single.html b/themes/hugo-pt2021/layouts/projects/single.html new file mode 100644 index 0000000..769fc33 --- /dev/null +++ b/themes/hugo-pt2021/layouts/projects/single.html @@ -0,0 +1,17 @@ +{{- define "title" -}} + {{.Title}} +{{- end -}} + +{{- define "main" -}} +
+
+

+ {{- .Title -}} +

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