diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-15 15:52:15 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-15 15:52:15 +0200 |
| commit | a8fbf11234c612d246840c66467066475d17b6e5 (patch) | |
| tree | 4441cbdf57ddef20e9de356426385cc504a515c7 /themes/danix-xyz-hacker/shortcodes | |
| parent | 0848ab287f117f740977c1309365f6700e63aabc (diff) | |
| download | danixxyz-a8fbf11234c612d246840c66467066475d17b6e5.tar.gz danixxyz-a8fbf11234c612d246840c66467066475d17b6e5.zip | |
feat: create gallery shortcode with responsive columns
Diffstat (limited to 'themes/danix-xyz-hacker/shortcodes')
| -rw-r--r-- | themes/danix-xyz-hacker/shortcodes/gallery.html | 12 |
1 files changed, 12 insertions, 0 deletions
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" -}} + +<div class="my-8 grid gap-4" style="grid-template-columns: repeat({{ $cols }}, 1fr)"> + {{- range $line := strings.Split .Inner "\n" -}} + {{- if strings.Contains $line "