From 8262f1fc40e2d60d2269fca66100bdfc0ff2499e Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Wed, 15 Mar 2023 12:29:41 +0100 Subject: [PATCH] paper authors wip --- assets/sass/_theme/sections/volumes.sass | 2 ++ layouts/partials/papers/paper.html | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/assets/sass/_theme/sections/volumes.sass b/assets/sass/_theme/sections/volumes.sass index 51681cc5..80b7be73 100644 --- a/assets/sass/_theme/sections/volumes.sass +++ b/assets/sass/_theme/sections/volumes.sass @@ -20,6 +20,8 @@ .content @include media-breakpoint-up(desktop) grid-column: 1 / 8 + h2 + @include meta > div margin-bottom: $spacing1 @include media-breakpoint-up(desktop) diff --git a/layouts/partials/papers/paper.html b/layouts/partials/papers/paper.html index 3019c669..b3ba77b9 100644 --- a/layouts/partials/papers/paper.html +++ b/layouts/partials/papers/paper.html @@ -9,13 +9,21 @@ <span itemprop="name">{{ partial "PrepareHTML" .Title }}</span> </a> </h3> - {{- range $index, $authors := .Params.Researchers -}} - {{- $author := site.GetPage (printf "/persons/%s" .) -}} - {{- if ne $index 0 -}},{{ end }} - <span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="{{ $author.Permalink }}" itemprop="url"><span itemprop="name">{{ trim $author.Title "\n" }}</span></a></span> - {{- end -}} + <div class="paper-authors"> + {{- range $index, $authors := .Params.Researchers -}} + {{- $author := site.GetPage (printf "/persons/%s" .) -}} + {{ if $author }} + {{- if ne $index 0 -}},{{ end }} + <span itemprop="author" itemscope itemtype="https://schema.org/Person"> + <a href="{{ $author.Permalink }}" itemprop="url"> + <span itemprop="name">{{ trim $author.Title "\n" }}</span> + </a> + </span> + {{- end -}} + {{- end -}} + </div> <p class="paper-volume"> - <span>Article</span> + <span>{{ .Params.paper_kind }}</span> {{ if not $inside_volume }} {{ range .Params.Volumes }} {{ $volume := site.GetPage (printf "/volumes/%s" .) }} -- GitLab