diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/hero.html | 18 | ||||
-rw-r--r-- | layouts/partials/metadata.html | 16 |
2 files changed, 19 insertions, 15 deletions
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html index 3008ef2..1654b5d 100644 --- a/layouts/partials/hero.html +++ b/layouts/partials/hero.html @@ -6,7 +6,7 @@ {{ end }};" > <div class="mw7 center ph2 near-white lh-copy"> - {{ if eq .Type "about" }} + {{ if eq .Type "authors" }} {{ $avatar := index .Params.images 1 }} {{ if hasPrefix $avatar "http" }} {{ $avatar = resources.GetRemote $avatar }} @@ -17,14 +17,12 @@ <img src="{{ .RelPermalink }}" class="br-100 w5 db center" alt="" /> {{ end }} <h1 class="f1 tc mv1"> - {{ .Title }} + {{ .Params.Name }} </h1> - {{ if .Params.personal }} - <h2 class="f3 tc fw3 mv1"> - {{ .Site.Params.Author.role | markdownify }} - </h2> - {{ end }} + <h2 class="f3 tc fw3 mv1"> + {{ .Params.role | markdownify }} + </h2> {{ with .Params.Subtitle }} <h2 class="f3 tc fw3 mv1"> @@ -34,11 +32,7 @@ <div class="f2 mt3 tc"> - {{ if .Params.personal }} - {{ partial "social_links" .Site.Params.Author }} - {{ else }} - {{ partial "social_links" .Site.Params }} - {{ end }} + {{ partial "social_links" .Params }} </div> {{ else }} diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index b2136bc..28dc5b4 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,9 +1,19 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} <div class="f6 lh-copy mv0 ph4 pv2"> - By - {{ with .Params.author }} - <span class="author"> — {{ delimit . ", " }} </span> + By — + {{ range .Params.authors }} + {{ $name := . }} + {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }} + {{ with $.GetPage $path }} + {{ if isset .Params "name" }} + <a class="link underline color-inherit" href="{{ .RelPermalink }}"> + {{- default $name .Params.name -}} + </a> + {{ else }} + {{ $name }} + {{ end }} + {{ end }} {{ end }} |