{{- $profile := .Site.Params.home.profile -}}
{{- $avatar := $profile.avatarURL -}} {{- $gravatar := .Site.Params.gravatar -}} {{- if $gravatar.enable | and $profile.gravatarEmail -}} {{- with $gravatar -}} {{- $avatar = printf "https://%v/avatar/%v?s=240&d=%v" (path.Clean .Host | default "www.gravatar.com") (md5 $profile.gravatarEmail) (.Style | default "mp") -}} {{- end -}} {{- end -}} {{- if $avatar -}}
{{- $menus := $.Site.Menus.main | default slice -}} {{- $optim := slice (dict "Process" "fill center 96x96 webp q75" "descriptor" "96w") (dict "Process" "fill center 144x144 webp q75" "descriptor" "144w") (dict "Process" "fill center 192x192 webp q75" "descriptor" "192w") -}} {{- $avatarMenuIndex := 0 -}} {{- if $profile.avatarMenu -}} {{- range $index, $menu := $menus -}} {{- if eq $menu.Identifier $profile.avatarMenu -}} {{- $avatarMenuIndex = $index -}} {{- end -}} {{- end -}} {{- end -}} {{- with index $menus $avatarMenuIndex -}} {{- $url := .URL | relLangURL -}} {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} {{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}} {{- else -}} {{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}} {{- end -}}
{{- end -}}

{{- with $profile.title -}} {{- . | safeHTML -}} {{- end -}}

{{- with $profile.subtitle -}}

{{- if $profile.typeit -}} {{ . }} {{- $.Store.Set "hasTyped" true -}} {{- else -}} {{- . | safeHTML -}} {{- end -}}

{{- end -}} {{- if $profile.social -}} {{- end -}} {{- with $profile.disclaimer -}}

{{- . | safeHTML -}}

{{- end -}} {{- /* Custom Profile */ -}} {{- block "custom-profile" . }}{{ end -}}