From 2167e0cc09afdba7c0cc893ea7399e8345d9596f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 29 Apr 2026 15:53:55 +0200 Subject: feat: add callout shortcode (note/tip/info/warning/danger/success) - Single shortcode with type param, CSS-only variants - Left border + fading bottom border (::after gradient) - Colors mapped to existing theme tokens (--accent, --accent2, --type-link, --type-life) - --callout-danger: #ef4444 hardcoded exception (approved) - role=alert for danger, role=note for all others (WCAG AA) - aria-hidden on Feather icons, title overridable via param - EN/IT i18n keys Also fixes html.theme-light CSS vars to match THEMING-STANDARD.md: - --bg, --bg2, --surface, --border, --text, --text-dim, --muted - --accent (#7c3aed), --accent2 (#008f5a) --- layouts/shortcodes/callout.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 layouts/shortcodes/callout.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/callout.html b/layouts/shortcodes/callout.html new file mode 100644 index 0000000..b492267 --- /dev/null +++ b/layouts/shortcodes/callout.html @@ -0,0 +1,15 @@ +{{- $type := .Get "type" | default "note" -}} +{{- $title := .Get "title" | default (i18n (printf "callout_%s" $type)) -}} +{{- $role := cond (eq $type "danger") "alert" "note" -}} +{{- $icons := dict "note" "edit-2" "tip" "zap" "info" "info" "warning" "alert-triangle" "danger" "x-circle" "success" "check-circle" -}} +{{- $icon := index $icons $type | default "info" -}} + +
+
+ + {{ $title }} +
+
+ {{- .Inner | markdownify -}} +
+
-- cgit v1.2.3