{{/* Hugo Blox: Contact Info Block */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/kit/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{/* Enable Alpine.js for copy-to-clipboard functionality */}} {{ $page.Store.Set "has_alpine" true }} {{ $title := $block.content.title | default (i18n "block_contact_title" | default "Contact Us") | emojify | $page.RenderString }} {{ $subtitle := $block.content.subtitle | emojify | $page.RenderString }} {{/* Check if Visit Us card has content */}} {{ $has_visit_content := or $block.content.address $block.content.office_hours $block.content.map_url }} {{/* Check if Connect card has content - fallback to author profile if no email/social */}} {{ $author := $block.content.username | default "me" }} {{ $profile := partial "functions/get_author_profile" $author }} {{ $email := $block.content.email | default $profile.email }} {{ $phone := $block.content.phone }} {{ $social := $block.content.social | default $profile.links }} {{ $has_connect_content := or $email $phone $social $block.content.prospective }} {{/* Determine grid layout - single column centered if only one card */}} {{ $grid_class := "grid-cols-1 lg:grid-cols-2" }} {{ $card_max_width := "" }} {{ $is_single_card := false }} {{ if and $has_visit_content (not $has_connect_content) }} {{ $grid_class = "grid-cols-1" }} {{ $card_max_width = "max-w-3xl mx-auto" }} {{ $is_single_card = true }} {{ else if and $has_connect_content (not $has_visit_content) }} {{ $grid_class = "grid-cols-1" }} {{ $card_max_width = "max-w-3xl mx-auto" }} {{ $is_single_card = true }} {{ end }}
{{ . }}
{{ end }}{{ . }}
{{ end }}{{ . }}
{{ end }}{{ $block.content.text | default "I'm always open to discussing new projects, opportunities, or just having a chat." }}
Call me
{{ . }}
{{ . }}
Phone
{{ . }}
{{ .text }}
{{ with .button }} {{ partial "functions/get_icon" (dict "name" "hero/user-plus" "attributes" "class=\"w-5 h-5 mr-2\"") }} {{ .text }} {{ end }}