{{- $name := site.Params.name | default site.Title -}} {{- $tagline := site.Params.tagline -}} {{- $bio := site.Params.bio -}} {{- $links := site.Params.links -}} {{- $sections := site.Params.sections -}} {{- $layout := site.Params.layout | default "stack" -}} {{- $defaultLabel := i18n "nav_links_label" | default "Links" -}} {{- if and $sections $links -}} {{- warnf "bonsai: both params.sections and params.links set; sections win, flat links ignored" -}} {{- end -}}
{{ partial "avatar.html" . }}

{{ $name }}

{{- with $tagline }}

{{ . }}

{{- end }} {{- with $bio }}

{{ . | markdownify }}

{{- end }} {{- if $sections -}} {{- range $i, $section := $sections -}} {{- $secLinks := $section.links -}} {{- if $secLinks -}} {{- $secLayout := $section.layout | default $layout -}} {{- $secTitle := $section.title -}} {{- $slug := "" -}} {{- with $secTitle }}{{ $slug = . | urlize }}{{ end -}} {{- if not $slug }}{{ $slug = printf "section-%d" (add $i 1) }}{{ end -}}
{{- with $secTitle }}

{{ . }}

{{- end }} {{- with $section.description }}

{{ . | markdownify }}

{{- end }} {{ partial "link-group.html" (dict "links" $secLinks "layout" $secLayout "label" (or $secTitle $defaultLabel)) }}
{{- end -}} {{- end -}} {{- else if $links -}} {{ partial "link-group.html" (dict "links" $links "layout" $layout "label" $defaultLabel) }} {{- end -}} {{- if site.Params.share }} {{ partial "share-button.html" . }} {{- end }} {{- if site.Params.vcard }} {{ i18n "save_contact" | default "Save contact" }} {{- end }} {{ partial "qr-block.html" . }}