diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d3ae4d90..d97fce16 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,6 +12,7 @@ {{ partial "tags.html" . }} + {{ partial "page_author.html" . }} {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }} diff --git a/layouts/partials/css/academic.css b/layouts/partials/css/academic.css index 550c9dcb..47faa039 100644 --- a/layouts/partials/css/academic.css +++ b/layouts/partials/css/academic.css @@ -540,25 +540,28 @@ a[data-fancybox] img { margin: 0px 0 10px 0; } -#profile ul.network-icon { +ul.network-icon { display: inline-flex; flex-direction: row; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; +} + +#profile .network-icon { margin-top: 30px; } -#profile .network-icon li { +.network-icon li { margin-right: 10px; } -#profile .network-icon li:last-of-type { +.network-icon li:last-of-type { margin-right: 0; } -#profile .network-icon li:hover { +.network-icon li:hover { transform: scale(1.2) } @@ -869,6 +872,69 @@ article .article-metadata { } } +/************************************************* + * Author profile card + **************************************************/ + +.author-card { + margin-top: 1rem; + padding-top: 1rem; + border-top: 1px solid rgba(0,0,0,.05); +} + +.dark .author-card { + border-top: 1px solid rgba(255,255,255,.05); +} + +.author-card .portrait { + width: 60px; + height: 60px; + margin: 0 auto; + border-radius: 50%; + object-fit: cover; +} + +.author-card .card-title { + margin-top: 0; + margin-bottom: 15px; + font-weight: 600; + color: rgba(0, 0, 0, 0.84); +} + +.author-card .card-title a { + color: rgba(0, 0, 0, 0.84); +} + +.dark .author-card .card-title, +.dark .author-card .card-title a { + color: rgba(255, 255, 255, 0.84); +} + +.author-card p { + margin-bottom: 5px; +} + +.author-card .card-subtitle { + font-weight: 300; + font-size: 0.8rem; + color: rgba(0, 0, 0, 0.54); + margin-bottom: 7px; +} + +.dark .author-card .card-subtitle { + color: rgba(255, 255, 255, 0.54); +} + +.author-card .card-text { + color: rgba(0, 0, 0, 0.76); + font-size: 0.8rem; + margin-bottom: 4px; +} + +.dark .author-card .card-text { + color: rgba(255, 255, 255, 0.76); +} + /************************************************* * Publications **************************************************/ diff --git a/layouts/partials/page_author.html b/layouts/partials/page_author.html new file mode 100644 index 00000000..010a380f --- /dev/null +++ b/layouts/partials/page_author.html @@ -0,0 +1,37 @@ +{{ if not (or (eq .Site.Params.profile false) (eq .Params.profile false)) }} + +{{ $author := "" }} +{{ if .Params.authors }} + {{ $author = index .Params.authors 0 }} +{{ end }} + +{{/* Display site author if page authors not explicitly specified or if first page author is site author. */}} +{{ if or (not .Params.authors) (eq $author $.Site.Params.name) }} +
+{{end}} +{{end}} diff --git a/layouts/partials/page_metadata.html b/layouts/partials/page_metadata.html index 6ee51405..cbeabf52 100644 --- a/layouts/partials/page_metadata.html +++ b/layouts/partials/page_metadata.html @@ -6,7 +6,7 @@ {{ if $.Params.authors }} {{ $authorLen := len $.Params.authors }}