From f6911c4fd2dd412cf98209e30a71213a17d1cfd0 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sun, 21 Jul 2024 00:59:05 +0800 Subject: [PATCH] :sparkles: Feat: add open and center params for details shortcode --- layouts/shortcodes/details.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html index bc89c371..25ba543d 100644 --- a/layouts/shortcodes/details.html +++ b/layouts/shortcodes/details.html @@ -1,5 +1,12 @@ -
- {{ .Get "summary" | default (.Get 0) | .Page.RenderString }} +{{- $summary := .Get "summary" | default (.Get 0) -}} +{{- $open := .Get "open" | default (.Get 1) | default false -}} +{{- $center := .Get "center" | default (.Get 2) | default false -}} +
+ {{ $summary | .Page.RenderString }} {{ .Inner | .Page.RenderString }}
-{{- /* EOF */ -}} +{{- /* EOF */ -}} \ No newline at end of file