aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-15 00:36:50 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-15 00:36:50 -0400
commit7209f91deba066899e5880d058e81ffb104d48bb (patch)
tree950d2a1eb5703acea05ca96179c5367956633d53 /themes/hugo-pt2021/layouts
parent28f745c85e7cbaf2ddd7958433464b76fc4c6b2b (diff)
downloadpablotron.org-7209f91deba066899e5880d058e81ffb104d48bb.tar.bz2
pablotron.org-7209f91deba066899e5880d058e81ffb104d48bb.zip
themes/hugo-pt2021: add projects single, list, and partial
Diffstat (limited to 'themes/hugo-pt2021/layouts')
-rw-r--r--themes/hugo-pt2021/layouts/partials/project_summary.html5
-rw-r--r--themes/hugo-pt2021/layouts/projects/list.html46
-rw-r--r--themes/hugo-pt2021/layouts/projects/single.html17
3 files changed, 68 insertions, 0 deletions
diff --git a/themes/hugo-pt2021/layouts/partials/project_summary.html b/themes/hugo-pt2021/layouts/partials/project_summary.html
new file mode 100644
index 0000000..0aa9f89
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/partials/project_summary.html
@@ -0,0 +1,5 @@
+<li>
+ <a href='{{.Permalink}}' title='{{.Title}}' aria-label='{{.Title}}'>
+ {{- .Title -}}
+ </a>: {{.Params.text -}}
+</li>
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" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title' title='{{.Title}}' aria-label='{{.Title}}'>
+ Projects
+ </h1>
+
+ <div class='content'>
+ {{- $rows := union (where .Pages "Params.active" true) (where .Pages "Params.active" nil) -}}
+ {{- if len $rows -}}
+ <h3
+ title='Current projects that are actively maintained.'
+ >Current Projects</h3>
+
+ <ul>
+ {{- range $rows.ByTitle -}}
+ {{- if (default true .Params.show) -}}
+ {{- partial "project_summary" . -}}
+ {{- end -}}
+ {{- end -}}
+ </ul>
+ {{- end -}}
+
+ {{- $rows := where .Pages.ByTitle "Params.active" false -}}
+ {{- if len $rows -}}
+ <h3
+ title='Old projects that are no longer maintained.'
+ aria-label='Old projects that are no longer maintained.'
+ >Old Projects</h3>
+
+ <ul>
+ {{- range $rows.ByTitle -}}
+ {{- if (default true .Params.show) -}}
+ {{- partial "project_summary" . -}}
+ {{- end -}}
+ {{- end -}}
+ </ul>
+ {{- end -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- 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" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title' title='{{.Title}}' aria-label='{{.Title}}'>
+ {{- .Title -}}
+ </h1>
+
+ <div class='content'>
+ {{- .Content -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- end -}}