{{/* Hugo Blox: Hero */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }}
{{ with $block.content.announcement }} {{end}}
{{ with $block.content.title }}

{{ . | markdownify }}

{{end}} {{ with $block.content.text }}

{{ . | $page.RenderString | emojify }}

{{end}} {{ if $block.content.primary_action.url }} {{ $pack := or $block.content.primary_action.icon_pack "fas" }} {{ $pack_prefix := $pack }} {{ if in (slice "fab" "fas" "far" "fal") $pack }} {{ $pack_prefix = "fa" }} {{ end }} {{ $link := $block.content.primary_action.url }} {{ $scheme := (urls.Parse $link).Scheme }} {{ $target := "" }} {{ if not $scheme }} {{ $link = $link | relLangURL }} {{ else if in (slice "http" "https") $scheme }} {{ $target = "target=\"_blank\" rel=\"noopener\"" }} {{ end }}
{{ $block.content.primary_action.text | markdownify | emojify }} {{ with $block.content.primary_action.icon }} {{ partial "functions/get_icon" (dict "name" . "attributes" "style=\"height: 1em\" class='inline-block pl-2'") }} {{ end }} {{end}} {{ if $block.content.secondary_action.url }} {{ $link_alt := $block.content.secondary_action.url }} {{ $scheme_alt := (urls.Parse $link_alt).Scheme }} {{ $target_alt := "" }} {{ if not $scheme_alt }} {{ $link_alt = $link_alt | relLangURL }} {{ else if in (slice "http" "https") $scheme_alt }} {{ $target_alt = "target=\"_blank\" rel=\"noopener\"" }} {{ end }} {{ $block.content.secondary_action.text | markdownify | emojify }} {{end}}
{{ end }}