From 2565f372d16405753954bacb413d6241af6184a3 Mon Sep 17 00:00:00 2001 From: Xin Date: Mon, 14 Oct 2024 23:03:22 +0100 Subject: [PATCH] feat: make cards as partial (#474) --- layouts/partials/shortcodes/cards.html | 6 ++++++ layouts/shortcodes/cards.html | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 layouts/partials/shortcodes/cards.html diff --git a/layouts/partials/shortcodes/cards.html b/layouts/partials/shortcodes/cards.html new file mode 100644 index 00000000..b70ff7f6 --- /dev/null +++ b/layouts/partials/shortcodes/cards.html @@ -0,0 +1,6 @@ +{{- $cols := .cols | default 3 -}} +{{- $content := .content -}} + +
+ {{- $content -}} +
diff --git a/layouts/shortcodes/cards.html b/layouts/shortcodes/cards.html index 46a58c6e..9230128c 100644 --- a/layouts/shortcodes/cards.html +++ b/layouts/shortcodes/cards.html @@ -1,5 +1,3 @@ {{- $cols := .Get "cols" | default 3 -}} -
- {{- .Inner -}} -
+{{- partial "shortcodes/cards" (dict "cols" $cols "content" .Inner) -}}