aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts
diff options
context:
space:
mode:
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 -}}