From 7624fe7007c75a4074b7a257a44cb58f44e03752 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sun, 15 Oct 2023 22:18:48 +0200 Subject: Publication with resource button metadata --- layouts/_default/about.html | 10 ++++++++-- layouts/_default/single.html | 2 +- layouts/partials/metadata.html | 22 ++++++++++++++++++++++ layouts/partials/post.html | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/layouts/_default/about.html b/layouts/_default/about.html index 3fa1090..9c4ca2f 100644 --- a/layouts/_default/about.html +++ b/layouts/_default/about.html @@ -7,11 +7,17 @@
{{ range .Paginator.Pages }}
-
+

{{ .Title }}

- {{ .Content }} + {{ with .Content }} +
{{ . }}
+ {{ end }} + + {{ range where site.RegularPages "Type" "eq" .Params.subsection }} + {{ partial "post.html" . }} + {{ end }}
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5405e4a..fe5115e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,7 +8,7 @@

{{ . }}

{{ end }} - {{ if in (slice "post" "talk") .Section }} + {{ if in (slice "post" "talk" "publication") .Section }} {{ partial "metadata.html" . }} {{ end }} diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 211e9d4..5ad92e3 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -38,4 +38,26 @@ {{ . }} {{ end }} {{ end }} + + +
+ {{ range $key, $val := (dict "DOI" .Params.doi + "PDF" .Params.url_pdf + "Slides" .Params.url_slides + "Video" .Params.url_video + "Code" .Params.url_code + ) + }} + {{ with $val }} + + {{ $key }} + + {{ end }} + {{ end }} +

diff --git a/layouts/partials/post.html b/layouts/partials/post.html index 08583cb..1c42c00 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -27,7 +27,7 @@
- {{ if in (slice "post" "talk") .Section }} + {{ if in (slice "post" "talk" "publication") .Section }} {{ partial "metadata.html" . }} {{ end }} -- cgit v1.2.3