summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/actions.html23
1 files changed, 16 insertions, 7 deletions
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 -}}
-<div class="my-6 {{ $outclass }}">
+<div class="cta-block {{ $outclass }}">
+ {{- with $caption -}}
+ <p class="cta-block__caption">{{ . }}</p>
+ {{- end -}}
<a
href="{{ $url }}"
- class="inline-flex items-center gap-2 px-4 py-2 rounded border border-accent/30 text-accent font-medium hover:border-accent/50 hover:bg-accent/10 transition-colors {{ $inclass }}"
- download
+ class="btn btn-primary {{ $inclass }}"
+ {{- if $isDownload }} download{{- end }}
>
- <i data-feather="download" class="w-4 h-4"></i>
+ <i data-feather="{{ $icon }}" class="w-5 h-5" aria-hidden="true"></i>
{{ $desc }}
</a>
</div>