summaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/actions.html
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
committerDanilo M. <danix@danix.xyz>2026-04-22 12:42:56 +0200
commit631547a75142326a7c71bdf123e1475217a5ad73 (patch)
treef3cfef6b3c5b42bf626fc823ddcf63b8dcf4cdbb /layouts/shortcodes/actions.html
parent77ccbe72fad5a4870185fff374f75471c16a9043 (diff)
downloaddanixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.tar.gz
danixxyz-theme-631547a75142326a7c71bdf123e1475217a5ad73.zip
chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme)
Diffstat (limited to 'layouts/shortcodes/actions.html')
-rw-r--r--layouts/shortcodes/actions.html26
1 files changed, 19 insertions, 7 deletions
diff --git a/layouts/shortcodes/actions.html b/layouts/shortcodes/actions.html
index 296a211..7badab3 100644
--- a/layouts/shortcodes/actions.html
+++ b/layouts/shortcodes/actions.html
@@ -1,7 +1,19 @@
-{{ $link := .Get "url" }}
-{{ $desc := .Get "desc" }}
-{{ $outclass := .Get "outclass" }}
-{{ $inclass := .Get "inclass" }}
-<ul class="actions{{ with $outclass }} {{ . }}{{ end }}">
- <li><a href="{{ $link }}" class="button{{ with $inclass }} {{ . }}{{ end }}">{{ $desc }}</a></li>
-</ul>
+{{- $url := .Get "url" -}}
+{{- $desc := .Get "desc" | default "Download" -}}
+{{- $outclass := .Get "outclass" | default "" -}}
+{{- $inclass := .Get "inclass" | default "" -}}
+
+{{- if $url -}}
+<div class="my-6 {{ $outclass }}">
+ <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
+ >
+ <i data-feather="download" class="w-4 h-4"></i>
+ {{ $desc }}
+ </a>
+</div>
+{{- else -}}
+ {{- errorf "actions shortcode: 'url' parameter is required" -}}
+{{- end -}}