From 02b4ce0e6813a8e3837abd715ccdd060646f1e00 Mon Sep 17 00:00:00 2001 From: Bertrand Thierry <5602767+Bertbk@users.noreply.github.com> Date: Tue, 1 Oct 2019 20:19:47 +0200 Subject: [PATCH] fix: no users appear in People widget Bug caused by search/replace during last People widget update in #1323 . Also: - Fix closing div placement - Hide group if empty Fix #1360 Close #1372 --- exampleSite/content/home/people.md | 2 +- layouts/partials/widgets/people.html | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) 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}}
{{ delimit . ", " | markdownify | emojify }}
{{ end }} - {{ end }} + {{ if and $show_interests .Params.interests }}{{ delimit .Params.interests ", " | markdownify | emojify }}
{{ end }} - + {{ end }} {{ end }}