diff --git a/modules/blox-tailwind/layouts/partials/blox/about.avatar.html b/modules/blox-tailwind/layouts/partials/blox/biography.html similarity index 97% rename from modules/blox-tailwind/layouts/partials/blox/about.avatar.html rename to modules/blox-tailwind/layouts/partials/blox/biography.html index e4d9a074..065bb87b 100644 --- a/modules/blox-tailwind/layouts/partials/blox/about.avatar.html +++ b/modules/blox-tailwind/layouts/partials/blox/biography.html @@ -77,11 +77,11 @@ {{ if in (slice "fab" "fas" "far" "fal") $pack }} {{ $pack_prefix = "fa" }} {{ end }} - {{ $link := .link }} + {{ $link := .url | default .link }} {{ $scheme := (urls.Parse $link).Scheme }} {{ $target := "" }} {{ if not $scheme }} - {{ $link = .link | relLangURL }} + {{ $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\"" }} @@ -107,7 +107,7 @@ {{.label}} + {{.text}} {{ end }} diff --git a/modules/blox-tailwind/layouts/partials/blox/buttons.html b/modules/blox-tailwind/layouts/partials/blox/cta-button-list.html similarity index 95% rename from modules/blox-tailwind/layouts/partials/blox/buttons.html rename to modules/blox-tailwind/layouts/partials/blox/cta-button-list.html index 7e1e81a5..ce1f1c7b 100644 --- a/modules/blox-tailwind/layouts/partials/blox/buttons.html +++ b/modules/blox-tailwind/layouts/partials/blox/cta-button-list.html @@ -17,7 +17,7 @@ {{ end }}
{{ . | $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 }} +