aboutsummaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-10-15 22:18:48 +0200
committerOscar Najera <hi@oscarnajera.com>2023-10-15 22:18:48 +0200
commit7624fe7007c75a4074b7a257a44cb58f44e03752 (patch)
treee415981da78826c5ae69167f014b88fe2774bcff /layouts
parent0ec36ee8242364847305df19e5f7f47f8b99125c (diff)
downloadhugo-minimalist-theme-7624fe7007c75a4074b7a257a44cb58f44e03752.tar.gz
hugo-minimalist-theme-7624fe7007c75a4074b7a257a44cb58f44e03752.tar.bz2
hugo-minimalist-theme-7624fe7007c75a4074b7a257a44cb58f44e03752.zip
Publication with resource button metadata
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/about.html10
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/metadata.html22
-rw-r--r--layouts/partials/post.html2
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 @@
<div class="stripe-dark"></div>
{{ range .Paginator.Pages }}
<div class="stripe-dark">
- <div class="mw7 center pv2 lh-copy f4-ns main-content ph1">
+ <div class="mw7 center pv2 lh-copy f4-ns ph1">
<h2 class="athelas lh-title f2">
{{ .Title }}
</h2>
- {{ .Content }}
+ {{ with .Content }}
+ <div class="main-content">{{ . }}</div>
+ {{ end }}
+
+ {{ range where site.RegularPages "Type" "eq" .Params.subsection }}
+ {{ partial "post.html" . }}
+ {{ end }}
</div>
</div>
{{ 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 @@
<h3 class="f3 baskerville mv3 pa1">{{ . }}</h3>
{{ 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 @@
<a class="link underline near-black" href="{{ $href }}">{{ . }}</a>
{{ end }}
{{ end }}
+
+
+ <br />
+ {{ 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 }}
+ <a
+ class="f6 link br3 ba ma2 ph2 pv1 dib near-white bg-green"
+ href="{{ . }}"
+ target="_blank"
+ rel="noopener"
+ >
+ {{ $key }}
+ </a>
+ {{ end }}
+ {{ end }}
+
</p>
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 @@
</div>
</div>
</a>
- {{ if in (slice "post" "talk") .Section }}
+ {{ if in (slice "post" "talk" "publication") .Section }}
{{ partial "metadata.html" . }}
{{ end }}
</article>