summaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-04-15 22:41:41 +0200
committerDanilo M. <danix@danix.xyz>2026-04-15 22:41:41 +0200
commitb14e1db1b6bd40b401387e90af4bdd2acde41ca7 (patch)
treea86dcfd1c721acba24b4f3f546d6142392255487 /themes
parent71b7e2558045896eaf5eb84a10006f10a5a61d8c (diff)
downloaddanixxyz-b14e1db1b6bd40b401387e90af4bdd2acde41ca7.tar.gz
danixxyz-b14e1db1b6bd40b401387e90af4bdd2acde41ca7.zip
Allow custom sizing in image shortcode
- Move w-full h-auto into default class parameter instead of hardcoding - Users can now override sizing with custom class parameter - Default still applies w-full h-auto if no class specified - Update SHORTCODES.md documentation with sizing examples - Add CSS class reference tables for common sizing patterns Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'themes')
-rw-r--r--themes/danix-xyz-hacker/layouts/shortcodes/image.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/danix-xyz-hacker/layouts/shortcodes/image.html b/themes/danix-xyz-hacker/layouts/shortcodes/image.html
index 07a698d..0209b7e 100644
--- a/themes/danix-xyz-hacker/layouts/shortcodes/image.html
+++ b/themes/danix-xyz-hacker/layouts/shortcodes/image.html
@@ -1,14 +1,14 @@
{{- $src := .Get "src" -}}
{{- $alt := .Get "alt" | default "Image" -}}
{{- $caption := .Get "caption" -}}
-{{- $class := .Get "class" | default "rounded-lg border border-border/30" -}}
+{{- $class := .Get "class" | default "w-full h-auto rounded-lg border border-border/30" -}}
{{- if $src -}}
<figure class="my-8">
<img
src="{{ $src }}"
alt="{{ $alt }}"
- class="{{ $class }} w-full h-auto"
+ class="{{ $class }}"
loading="lazy"
/>
{{- if $caption -}}