From d294ffed41f7e64102fc631548ec8b3f6ef1c7c5 Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 16 Nov 2022 10:47:40 -0500 Subject: themes/default/layouts/partials/function-content: Make block quotes easier to write Remove footer since it's no longer needed --- themes/default/layouts/partials/function-content.html | 19 +++++++++++++++++++ themes/default/layouts/shortcodes/footer.html | 7 ------- themes/default/layouts/shortcodes/version.html | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) delete mode 100644 themes/default/layouts/shortcodes/footer.html (limited to 'themes') diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index de68946..bc90549 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -10,6 +10,25 @@ replaceRE "

" "" | -}} +{{- $blockquoteFooterEnDash := delimit (findRE `\n

–.*

` .Content 1) "" -}} +{{- $blockquoteFooterEmDash := delimit (findRE `\n

—.*

` .Content 1) "" -}} + +{{- $blockquoteFooterFixedEnDash := $blockquoteFooterEnDash | + replaceRE "\n

" "

" | +-}} + +{{- $blockquoteFooterFixedEmDash := $blockquoteFooterEmDash | + replaceRE "\n

" "

" | +-}} + +{{- + $content = $content | + replaceRE $blockquoteFooterEnDash $blockquoteFooterFixedEnDash | + replaceRE $blockquoteFooterEmDash $blockquoteFooterFixedEmDash | +-}} + {{- if $empty -}} {{- $content = "This message contains no content." -}} {{- end -}} diff --git a/themes/default/layouts/shortcodes/footer.html b/themes/default/layouts/shortcodes/footer.html deleted file mode 100644 index 579913d..0000000 --- a/themes/default/layouts/shortcodes/footer.html +++ /dev/null @@ -1,7 +0,0 @@ -{{- $text := default "Block Quote" (.Get "text" | default (.Get 0)) -}} - -{{- if gt (len .Inner) 1 -}} - {{ $text = .Inner }} -{{- end -}} - -{{ $text | markdownify }} diff --git a/themes/default/layouts/shortcodes/version.html b/themes/default/layouts/shortcodes/version.html index 10e29c5..c34a53d 100644 --- a/themes/default/layouts/shortcodes/version.html +++ b/themes/default/layouts/shortcodes/version.html @@ -1,4 +1,4 @@ -{{- $version := "0.11.5" -}} +{{- $version := "0.11.6" -}} {{- $number := default false (.Get "number" | default (.Get 0)) -}} {{- $clone := default false (.Get "clone" | default (.Get 1)) -}} -- cgit v1.2.3