diff --git a/exampleSite/content/home/people.md b/exampleSite/content/home/people.md index 31d2dffd..40885577 100644 --- a/exampleSite/content/home/people.md +++ b/exampleSite/content/home/people.md @@ -26,7 +26,7 @@ subtitle = "" # Show user's interests? (true/false) show_interests = true - + [design.background] # Apply a background color, gradient, or image. # Uncomment (by removing `#`) an option to apply it. diff --git a/layouts/partials/widgets/people.html b/layouts/partials/widgets/people.html index 9e479c87..d5cde9d3 100644 --- a/layouts/partials/widgets/people.html +++ b/layouts/partials/widgets/people.html @@ -21,13 +21,15 @@ {{ end }} {{ range $page.Params.content.user_groups }} + {{ $query := where (where site.Pages "Section" "authors") ".Params.user_groups" "intersect" (slice .) }} + + {{if $query}}

{{ . | markdownify }}

+ {{end}} - {{ $query := where (where site.Pages "Section" "authors") ".Params.content.user_groups" "intersect" (slice .) }} {{ range $query }} - {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{/* Get link to user's profile page. */}} {{ $link := "" }} @@ -50,10 +52,9 @@

{{with $link}}{{end}}{{ .Params.name }}{{if $link}}{{end}}

{{ with .Params.role }}

{{ . | markdownify | emojify }}

{{ end }} {{ if $show_social }}{{ partial "social_links" . }}{{ end }} - {{ if and $show_interests .Params.interests }}

{{ delimit . ", " | markdownify | emojify }}

{{ end }} - {{ end }} + {{ if and $show_interests .Params.interests }}

{{ delimit .Params.interests ", " | markdownify | emojify }}

{{ end }} - + {{ end }} {{ end }}