{{/* 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" }}
{{ . }}
{{ end }} {{/* Name */}}{{ 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 }}{{ . }}
{{ end }} {{/* Name */}}{{ 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 }}