diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-15 22:30:46 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-15 22:30:46 +0200 |
| commit | 71b7e2558045896eaf5eb84a10006f10a5a61d8c (patch) | |
| tree | dffa4f147ff5133e6f075a3ec39b9cdde9010262 /themes/danix-xyz-hacker/layouts | |
| parent | f43663cf783f2daaf6c2b3f6529c8e9358a834f8 (diff) | |
| download | danixxyz-71b7e2558045896eaf5eb84a10006f10a5a61d8c.tar.gz danixxyz-71b7e2558045896eaf5eb84a10006f10a5a61d8c.zip | |
Fix article shortcode issues and add actions shortcode
- Fix gify-back-to-bash-scripting article: replace figure shortcode with image
- Add actions shortcode for download/action buttons with icon and styling
- Actions shortcode accepts: url (required), desc, outclass, inclass parameters
- Rendered as styled link with feather download icon
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes/danix-xyz-hacker/layouts')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/shortcodes/actions.html | 19 |
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 -}} |
