{{/* Hugo Blox: Biography 3 */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $author := $block.content.username | default "me" }} {{ $profile := partial "functions/get_author_profile" $author }} {{ $avatar := $profile.avatar }} {{/* Avatar customization parameters */}} {{ $avatar_size := $block.design.avatar.size | default "large" }} {{ $avatar_shape := $block.design.avatar.shape | default "circle" }} {{/* Profile name typography */}} {{ $name_size := $block.design.name.size | default "lg" }} {{ $name_class_map := dict "xs" "text-xl sm:text-2xl lg:text-3xl" "sm" "text-2xl sm:text-3xl lg:text-4xl" "md" "text-3xl sm:text-4xl lg:text-5xl" "lg" "text-4xl sm:text-5xl lg:text-6xl" "xl" "text-5xl sm:text-6xl lg:text-7xl" }} {{ $name_class := index $name_class_map $name_size | default (index $name_class_map "lg") }} {{/* Size mappings optimized for 2025 standards: display_size -> [display_px, generation_px] */}} {{ $size_map := dict "small" (slice "150" "300") "medium" (slice "200" "400") "large" (slice "320" "640") "xl" (slice "400" "800") "xxl" (slice "500" "1000") }} {{ $size_config := index $size_map $avatar_size | default (index $size_map "large") }} {{ $display_size := index $size_config 0 }} {{ $generation_size := index $size_config 1 }} {{/* Shape class mappings */}} {{ $shape_classes := dict "circle" "rounded-full" "square" "rounded-none" "rounded" "rounded-lg" }} {{ $shape_class := index $shape_classes $avatar_shape | default "rounded-full" }}
{{/* Add subtle top gradient for navbar transition */}}
{{/* Left Column: Flexible span */}}
{{/* Banner Image */}} {{ $img := "" }} {{with $block.design.banner.filename}} {{- $img = resources.Get (path.Join "media" .) -}} {{ if $img }}
{{ if ne $img.MediaType.SubType "gif" }} {{ $responsive := partial "functions/process_responsive_image.html" (dict "image" $img "mode" "fill" "aspect_ratio" "16:9" "sizes" (slice 768 1024 1366 1920 2560) ) }} {{ else }} {{- $img = $img.Process "webp" -}} {{ end }}
{{ end }} {{ end }} {{/* Avatar */}} {{ if $avatar }}
{{ $avatar_image := $avatar.Fill (printf "%sx%s Center" $generation_size $generation_size) }} {{$profile.title}} {{with $profile.status.icon}}{{.|emojify}}{{end}}
{{ end }} {{/* Name and Role - Centered */}}

{{ $profile.title }}

{{- with $profile.pronouns -}}

({{ . }})

{{- end -}} {{ with $profile.role }}

{{ . | markdownify | emojify }}

{{ end }} {{ range $profile.affiliations }}

{{ with .url }}{{ end }} {{ .name }} {{ if .url }}{{ end }}

{{ end }}
{{/* Social Icons */}}
{{ range $profile.links }} {{ $link := .url | default .link }} {{ $scheme := (urls.Parse $link).Scheme }} {{ $target := "" }} {{ if not $scheme }} {{ $link = (.url | default .link) | relLangURL }} {{ if eq (path.Ext $link) ".pdf" }}{{ $target = "target=\"_blank\" rel=\"noopener\"" }}{{ end }} {{ else if in (slice "http" "https") $scheme }} {{ $target = "target=\"_blank\" rel=\"noopener\"" }} {{ end }} {{ partial "functions/get_icon" (dict "name" .icon "attributes" "class=\"w-6 h-6\"") }} {{ end }}
{{/* Right Column: Flexible span */}}
{{/* Bio Section */}} {{ $bio_content := ($block.content.text | emojify | $page.RenderString) | default $profile.bio }} {{ with $bio_content }}
{{ partial "functions/get_icon" (dict "name" "identification" "attributes" "class='w-6 h-6 text-primary-600 dark:text-primary-400'") }}
{{ $i18n_about := i18n "about_me" }} {{ $about_default := cond (eq $i18n_about "about_me") "Professional Summary" $i18n_about }} {{ $about_heading := $block.content.headings.about | default $about_default }}

{{ $about_heading }}

{{ . }}
{{ end }} {{/* CV Download Button */}} {{ with $block.content.button }} {{ end }} {{/* Education Section */}} {{ with $profile.education }}
{{ partial "functions/get_icon" (dict "name" "academic-cap" "attributes" "class='w-6 h-6 text-primary-600 dark:text-primary-400'") }}
{{ $education_heading := $block.content.headings.education | default (i18n "education") }}

{{ $education_heading | markdownify }}

{{ range . }}
{{ if .icon }} {{ partial "functions/get_icon" (dict "name" .icon "attributes" "class='w-6 h-6 text-primary-600 dark:text-primary-400'") }} {{else}} {{ partial "functions/get_icon" (dict "name" "academic-cap" "attributes" "class='w-6 h-6 text-primary-600 dark:text-primary-400'") }} {{end}}
{{ $degree := .degree | default .area }}

{{ $degree }}

{{ if .year }}

{{ .year }}

{{ else if .start }}

{{ .start }} {{ if .end }}
{{ .end }}{{ end }}

{{ end }}

{{ .institution }}

{{ end }}
{{ end }} {{/* Interests Section */}} {{ with $profile.interests }}
{{ partial "functions/get_icon" (dict "name" "sparkles" "attributes" "class='w-6 h-6 text-primary-600 dark:text-primary-400'") }}
{{ $interests_heading := $block.content.headings.interests | default (i18n "interests") }}

{{ $interests_heading | markdownify }}

{{ range . }} {{ . | markdownify | emojify }} {{ end }}
{{ end }}