From 5b66b809f891f39a2ddec6a80e72397c7692b64b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 4 May 2026 16:01:17 +0200 Subject: feat: upgrade actions shortcode to CTA block component Replaces the minimal inline download button with a visually distinctive CTA card. New `use` parameter drives icon and download attribute ("download", "site", "repo", "mail"). Optional `caption` param adds description text above the button. Button uses .btn.btn-primary for consistent styling. CSS adds .cta-block / .cta-block__caption with accent border, glow, and light mode overrides per THEMING-STANDARD.md. Co-Authored-By: Claude Sonnet 4.6 --- layouts/shortcodes/actions.html | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'layouts') diff --git a/layouts/shortcodes/actions.html b/layouts/shortcodes/actions.html index 7badab3..2c2b07e 100644 --- a/layouts/shortcodes/actions.html +++ b/layouts/shortcodes/actions.html @@ -1,16 +1,25 @@ -{{- $url := .Get "url" -}} -{{- $desc := .Get "desc" | default "Download" -}} +{{- $url := .Get "url" -}} +{{- $desc := .Get "desc" | default (i18n "actions_cta") -}} +{{- $caption := .Get "caption" | default "" -}} +{{- $use := .Get "use" | default "site" -}} {{- $outclass := .Get "outclass" | default "" -}} -{{- $inclass := .Get "inclass" | default "" -}} +{{- $inclass := .Get "inclass" | default "" -}} + +{{- $icons := dict "download" "download" "site" "external-link" "repo" "git-branch" "mail" "mail" -}} +{{- $icon := index $icons $use | default "external-link" -}} +{{- $isDownload := eq $use "download" -}} {{- if $url -}} -
+
+ {{- with $caption -}} +

{{ . }}

+ {{- end -}} - + {{ $desc }}
-- cgit v1.2.3