diff --git a/modules/wowchemy/assets/scss/wowchemy/widgets/_about.scss b/modules/wowchemy/assets/scss/wowchemy/widgets/_about.scss index 3f75c098..bab13970 100644 --- a/modules/wowchemy/assets/scss/wowchemy/widgets/_about.scss +++ b/modules/wowchemy/assets/scss/wowchemy/widgets/_about.scss @@ -56,7 +56,7 @@ ul.network-icon { } #profile .network-icon { - margin-top: 30px; + margin-top: 0.5rem; } .network-icon li { diff --git a/modules/wowchemy/layouts/partials/blocks/about.biography.html b/modules/wowchemy/layouts/partials/blocks/about.biography.html new file mode 100644 index 00000000..ea3d95bb --- /dev/null +++ b/modules/wowchemy/layouts/partials/blocks/about.biography.html @@ -0,0 +1,134 @@ +{{/* Wowchemy Blocks: About */}} +{{/* Documentation: https://wowchemy.com/blocks/ */}} +{{/* License: https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/LICENSE.md */}} + +{{/* Initialise */}} +{{ $page := .wcPage }} +{{ $block := .wcBlock }} + +{{ $author := "" }} +{{ if .author }} + {{ $author = .author }} +{{ else }} + {{ $author = $block.content.username }} +{{end}} + +{{ $person_page_path := (printf "/authors/%s" $author) }} +{{ $person_page := site.GetPage $person_page_path }} +{{ if not $person_page }} + {{ errorf "Could not find an author page at `%s`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist. See https://wowchemy.com/docs/page-builder/#about " $person_page_path }} +{{end}} +{{ $person := $person_page.Params }} +{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }} +{{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }} + + +
{{ .course }}{{ with .year }}, {{ . }}{{ end }}
+{{ .institution }}
+