diff --git a/exampleSite/content/home/people.md b/exampleSite/content/home/people.md index 94a1b0ba..31d2dffd 100644 --- a/exampleSite/content/home/people.md +++ b/exampleSite/content/home/people.md @@ -1,19 +1,56 @@ +++ -# People widget. +# A "Meet the Team" section created with the People widget. +# This section displays people from `content/authors/` which belong to the `user_groups` below. + widget = "people" # See https://sourcethemes.com/academic/docs/page-builder/ headless = true # This file represents a page section. active = false # Activate this widget? true/false weight = 68 # Order that this section will appear. -title = "People" +title = "Meet the Team" subtitle = "" -# List user groups to display. -# Edit each user's `user_groups` to add them to one or more of these groups. -user_groups = ["Principal Investigators", - "Researchers", - "Grad Students", - "Administration", - "Visitors", - "Alumni"] +[content] + # Choose which groups/teams of users to display. + # Edit `user_groups` in each user's profile to add them to one or more of these groups. + user_groups = ["Principal Investigators", + "Researchers", + "Grad Students", + "Administration", + "Visitors", + "Alumni"] + +[design] + # Show user's social networking links? (true/false) + show_social = false + + # 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. + # Choose a light or dark text color by setting `text_color_light`. + # Any HTML color name or Hex value is valid. + + # Background color. + # color = "navy" + + # Background gradient. + # gradient_start = "DeepSkyBlue" + # gradient_end = "SkyBlue" + + # Background image. + # image = "background.jpg" # Name of image in `static/img/`. + # image_darken = 0.6 # Darken the image? Range 0-1 where 0 is transparent and 1 is opaque. + + # Text color (true=light or false=dark). + # text_color_light = true + +[advanced] + # Custom CSS. + css_style = "" + + # CSS class. + css_class = "" +++ diff --git a/layouts/partials/page_author.html b/layouts/partials/page_author.html index 309ba01f..74f8172e 100644 --- a/layouts/partials/page_author.html +++ b/layouts/partials/page_author.html @@ -38,28 +38,7 @@
{{. | markdownify | emojify}}
{{end}} - + {{ partial "social_links" . }} {{end}}{{/* Profile page block */}} diff --git a/layouts/partials/social_links.html b/layouts/partials/social_links.html new file mode 100644 index 00000000..78de30af --- /dev/null +++ b/layouts/partials/social_links.html @@ -0,0 +1,22 @@ + diff --git a/layouts/partials/widgets/people.html b/layouts/partials/widgets/people.html index bbb08ea1..36767c2e 100644 --- a/layouts/partials/widgets/people.html +++ b/layouts/partials/widgets/people.html @@ -1,5 +1,10 @@ +{{/* People Widget */}} + +{{/* Initialise */}} {{ $ := .root }} {{ $page := .page }} +{{ $show_social := $page.Params.design.show_social | default false }} +{{ $show_interests := $page.Params.design.show_interests | default true }} {{ end }} - {{ range $page.Params.user_groups }} + {{ range $page.Params.content.user_groups }}{{ delimit . ", " | markdownify | emojify }}
{{ end }} + {{ if $show_social }}{{ partial "social_links" . }}{{ end }} + {{ if and $show_interests .Params.interests }}{{ delimit . ", " | markdownify | emojify }}
{{ end }} + {{ end }}