From a8fbf11234c612d246840c66467066475d17b6e5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 15 Apr 2026 15:52:15 +0200 Subject: feat: create gallery shortcode with responsive columns --- themes/danix-xyz-hacker/shortcodes/gallery.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 themes/danix-xyz-hacker/shortcodes/gallery.html diff --git a/themes/danix-xyz-hacker/shortcodes/gallery.html b/themes/danix-xyz-hacker/shortcodes/gallery.html new file mode 100644 index 0000000..b66c327 --- /dev/null +++ b/themes/danix-xyz-hacker/shortcodes/gallery.html @@ -0,0 +1,12 @@ +{{- $cols := .Get "cols" | default "2" -}} + +
+ {{- range $line := strings.Split .Inner "\n" -}} + {{- if strings.Contains $line "![" -}} + {{- $image := strings.TrimSpace $line -}} + {{- if $image -}} + {{ $image | markdownify | safeHTML }} + {{- end -}} + {{- end -}} + {{- end -}} +
-- cgit v1.2.3