From 46779476a570346661a2741607265caed42829b2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 18 Apr 2026 18:19:47 +0200 Subject: consolidated duplicated shortcodes. Initial fix of the content files. Manual review needed --- .../danix-xyz-hacker/layouts/shortcodes/image.html | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'themes/danix-xyz-hacker/layouts/shortcodes/image.html') diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/image.html b/themes/danix-xyz-hacker/layouts/shortcodes/image.html index 0209b7e..84dec3f 100644 --- a/themes/danix-xyz-hacker/layouts/shortcodes/image.html +++ b/themes/danix-xyz-hacker/layouts/shortcodes/image.html @@ -1,22 +1,23 @@ {{- $src := .Get "src" -}} {{- $alt := .Get "alt" | default "Image" -}} {{- $caption := .Get "caption" -}} -{{- $class := .Get "class" | default "w-full h-auto rounded-lg border border-border/30" -}} +{{- $class := .Get "class" | default "w-full h-auto rounded-lg border border-border" -}} +{{- $link := .Get "link" -}} +{{- $figureClass := .Get "figure-class" -}} -{{- if $src -}} -
- {{ $alt }} +{{- if or $src .Inner -}} +
+ {{- if .Inner -}} + {{- .Inner -}} + {{- else -}} + {{- if $link -}}{{- end -}} + {{ $alt }} + {{- if $link -}}{{- end -}} + {{- end -}} {{- if $caption -}} -
- {{ $caption }} -
+
{{ $caption }}
{{- end -}}
{{- else -}} - {{- errorf "image shortcode: 'src' parameter is required" -}} + {{- errorf "image shortcode: 'src' parameter or inner content is required" -}} {{- end -}} -- cgit v1.2.3