diff --git a/themes/custom-wowchemy-theme/layouts/partials/widgets/authors.html b/themes/custom-wowchemy-theme/layouts/partials/widgets/authors.html new file mode 100644 index 0000000..6b211d4 --- /dev/null +++ b/themes/custom-wowchemy-theme/layouts/partials/widgets/authors.html @@ -0,0 +1,120 @@ +{{ $ := .root }} +{{ $page := .page }} + +{{ $author := "" }} +{{ if .author }} + {{ $author = .author }} +{{ else }} + {{ $author = $page.Params.author }} +{{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.avatar.shape | default "circle" }} + + +
+ +
+ +
+
+
+ + {{ if site.Params.avatar.gravatar }} + {{$person_page.Title}} + {{ else if $avatar }} + {{ $avatar_image := $avatar.Fill "270x270 Center" }} + {{$person_page.Title}} + {{ end }} + +
+

{{ $person_page.Title }}

+ {{ with $person.role }}

{{ . | markdownify | emojify }}

{{ end }} + + {{ range $person.organizations }} +

+ {{ with .url }}{{ end }} + {{ .name }} + {{ if .url }}{{ end }} +

+ {{ end }} +
+ + + +
+
+
+
+
+
+ + {{/* Only display widget title in explicit instances of about widget, not in author pages. */}} + {{ if and $page.Params.widget $page.Title }}

{{ $page.Title | markdownify | emojify }}

{{ end }} + +
+ {{ $person_page.Content }} + DOWNLOAD CV +
+ +
+ + {{ with $person.interests }} +
+
{{ i18n "interests" | markdownify }}
+
    + {{ range . }} +
  • {{ . | markdownify | emojify }}
  • + {{ end }} +
+
+ {{ end }} + + {{ with $person.education }} +
+
{{ i18n "education" | markdownify }}
+
    + {{ range .courses }} +
  • + +
    +

    {{ .course }}{{ with .year }}, {{ . }}{{ end }}

    +

    {{ .institution }}

    +
    +
  • + {{ end }} +
+
+ {{ end }} + +
+
+
+