{{/* Hugo Blox: Dev Hero */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{/* Enable animations if typewriter or scroll animations are configured */}} {{ $typewriter := $block.content.typewriter | default dict }} {{ $has_animations := or $typewriter.enable $block.design.animations }} {{ if $has_animations }} {{ $page.Store.Set "has_animations" true }} {{ $page.Store.Set "has_alpine" true }} {{ end }} {{/* Get author data from YAML */}} {{ $username := $block.content.username | default "me" }} {{ $author := partial "functions/get_author_profile" $username }} {{/* Get avatar */}} {{ $avatar := "" }} {{ $avatar_shape := $block.design.avatar_shape | default "circle" }} {{ with $author.avatar }} {{ $avatar = .Fill "300x300 webp Center" }} {{ end }} {{/* Layout style */}} {{ $style := $block.design.style | default "centered" }}
{{/* Background Effects - only visible in dark mode */}} {{/* Light mode subtle background */}}
{{ if eq $style "split" }} {{/* Split layout with avatar on side */}}
{{/* Avatar */}} {{ with $avatar }}
{{ $author.title }}
{{/* Status emoji badge */}} {{ if $block.content.show_status }} {{ with $author.status.icon }} {{ . | emojify }} {{ end }} {{ end }} {{/* Decorative ring */}}
{{ end }} {{/* Content */}}
{{/* Greeting */}} {{ with $block.content.greeting }}

{{ . }}

{{ end }} {{/* Name */}}

{{ with $block.content.name_prefix }}{{ . }} {{ end }} {{ $author.title | default $block.content.title | default (i18n "developer" | default "Developer") }}

{{/* Role/Tagline with optional typewriter */}} {{ $role := $author.role | default $block.content.tagline }} {{ if and $typewriter.enable $typewriter.strings }}

{{ with $typewriter.prefix }}{{ . }} {{ end }}

{{ else if $role }}

{{ $role | $page.RenderString }}

{{ end }} {{/* Bio */}} {{ with $author.bio | default $block.content.bio }}

{{ . | $page.RenderString }}

{{ end }} {{/* Social Links */}} {{ $links := $author.links | default $block.content.links }} {{ with $links }}
{{ range . }} {{ $icon := .icon | default "link" }} {{ $url := .url }} {{ partial "functions/get_icon" (dict "name" $icon "attributes" "class=\"w-5 h-5\"") }} {{ end }}
{{ end }} {{/* CTA Buttons */}} {{ with $block.content.cta_buttons }} {{ end }}
{{ else }} {{/* Centered layout */}} {{/* Avatar */}} {{ with $avatar }}
{{ $author.title }}
{{/* Status emoji badge */}} {{ if $block.content.show_status }} {{ with $author.status.icon }} {{ . | emojify }} {{ end }} {{ end }}
{{ end }} {{/* Greeting */}} {{ with $block.content.greeting }}

{{ . }}

{{ end }} {{/* Name */}}

{{ with $block.content.name_prefix }}{{ . }} {{ end }} {{ $author.title | default $block.content.title | default (i18n "developer" | default "Developer") }}

{{/* Role/Tagline with optional typewriter */}} {{ $role := $author.role | default $block.content.tagline }} {{ if and $typewriter.enable $typewriter.strings }}

{{ with $typewriter.prefix }}{{ . }} {{ end }}

{{ else if $role }}

{{ $role | $page.RenderString }}

{{ end }} {{/* Bio */}} {{ with $author.bio | default $block.content.bio }}

{{ . | $page.RenderString }}

{{ end }} {{/* Social Links */}} {{ $links := $author.links | default $block.content.links }} {{ with $links }}
{{ range . }} {{ $icon := .icon | default "link" }} {{ $url := .url }} {{ partial "functions/get_icon" (dict "name" $icon "attributes" "class=\"w-5 h-5\"") }} {{ end }}
{{ end }} {{/* CTA Buttons */}} {{ with $block.content.cta_buttons }} {{ end }} {{ end }} {{/* Scroll indicator - clicks to scroll to next section */}} {{ if $block.content.show_scroll_indicator }} {{ $scroll_target := $block.content.scroll_target | default "#projects" }}
{{ end }}