summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker
diff options
context:
space:
mode:
Diffstat (limited to 'themes/danix-xyz-hacker')
-rw-r--r--themes/danix-xyz-hacker/layouts/shortcodes/actions.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/actions.html b/themes/danix-xyz-hacker/layouts/shortcodes/actions.html
new file mode 100644
index 0000000..7badab3
--- /dev/null
+++ b/themes/danix-xyz-hacker/layouts/shortcodes/actions.html
@@ -0,0 +1,19 @@
+{{- $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 -}}