mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 00:16:31 +00:00
feat: make users' roles optional in People widget (#1971)
Add `show_role` option to People widget to hide/show users' roles.
This commit is contained in:
1 parent
fe49f96267
commit
c9c3e5f51a
1 file changed
+2
-1
@@ -6,6 +6,7 @@
|
||||
{{ $show_social := $page.Params.design.show_social | default false }}
|
||||
{{ $show_interests := $page.Params.design.show_interests | default true }}
|
||||
{{ $show_organizations := $page.Params.design.show_organizations | default false }}
|
||||
{{ $show_role := $page.Params.design.show_role | default true }}
|
||||
|
||||
<div class="row justify-content-center people-widget">
|
||||
{{ with $page.Title }}
|
||||
@@ -53,7 +54,7 @@
|
||||
<div class="portrait-title">
|
||||
<h2>{{with $link}}<a href="{{.}}">{{end}}{{ .Title }}{{if $link}}</a>{{end}}</h2>
|
||||
{{ if and $show_organizations .Params.organizations }}{{ range .Params.organizations }}<h3>{{ .name }}</h3>{{ end }}{{ end }}
|
||||
{{ with .Params.role }}<h3>{{ . | markdownify | emojify }}</h3>{{ end }}
|
||||
{{ if and $show_role .Params.role }}<h3>{{ .Params.role | markdownify | emojify }}</h3>{{ end }}
|
||||
{{ if $show_social }}{{ partial "social_links" . }}{{ end }}
|
||||
{{ if and $show_interests .Params.interests }}<p class="people-interests">{{ delimit .Params.interests ", " | markdownify | emojify }}</p>{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user