From: Danilo M. Date: Wed, 15 Apr 2026 13:52:15 +0000 (+0200) Subject: feat: create gallery shortcode with responsive columns X-Git-Tag: release_22042026-1342~261 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=a8fbf11234c612d246840c66467066475d17b6e5;p=danix.xyz-2.git feat: create gallery shortcode with responsive columns --- 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 -}} +