aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/project
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-10-20 16:06:53 +0200
committerOscar Najera <hi@oscarnajera.com>2023-10-20 16:32:48 +0200
commit19b9131073d1da80cc0193af397d5a1ab267f45d (patch)
tree6b248ec4b9a279c8d381cf5b2000c1f532652e82 /layouts/project
parent0b60f218c1cf0aac57473e0643aedfad1698b5e4 (diff)
downloadhugo-minimalist-theme-19b9131073d1da80cc0193af397d5a1ab267f45d.tar.gz
hugo-minimalist-theme-19b9131073d1da80cc0193af397d5a1ab267f45d.tar.bz2
hugo-minimalist-theme-19b9131073d1da80cc0193af397d5a1ab267f45d.zip
Project single page
Diffstat (limited to 'layouts/project')
-rw-r--r--layouts/project/single.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/layouts/project/single.html b/layouts/project/single.html
new file mode 100644
index 0000000..eacb6d1
--- /dev/null
+++ b/layouts/project/single.html
@@ -0,0 +1,50 @@
+{{- define "main" -}}
+ <header class="mw7 center">
+ <h2 class="baskerville f2 lh-title mv3 ph1">
+ {{ .Title }}
+ </h2>
+
+ {{ with .Params.subtitle }}
+ <h3 class="f3 baskerville mv3 pa1">{{ . }}</h3>
+ {{ end }}
+
+ {{ partial "meta_links.html" . }}
+ {{ partial "leading_image.html" . }}
+ </header>
+ <div class="main-content mw7 center lh-copy f5 f4-ns ph1">
+ {{ .Content }}
+ </div>
+
+ <div class="mw7 center ph1">
+ {{ $page := . }}
+ {{ $project := .File.ContentBaseName }}
+
+ {{ $items := where (where site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
+ {{ $count := len $items }}
+ {{ if ge $count 1 }}
+ <h2 class="f2 fw3 ma0">Related Posts</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+
+ {{ $items := where (where site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
+ {{ $pubs_len := len $items }}
+ {{ if ge $pubs_len 1 }}
+ <h2 class="f2 fw3 ma0">Related Publications</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+
+ {{ $items := where (where site.RegularPages "Type" "event") ".Params.projects" "intersect" (slice $project) }}
+ {{ $talks_len := len $items }}
+ {{ if ge $talks_len 1 }}
+ <h2 class="f2 fw3 ma0">Related Talks</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+ {{ partial "post_pager" . }}
+ </div>
+{{- end -}}