aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/function-content.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-07-10 05:40:39 -0400
committertdro <tdro@noreply.example.com>2022-07-10 05:40:39 -0400
commit4c028d71711aa50c112d05d10e31ab62359dda5d (patch)
tree88e6ee509b56b9ce12db9b0b19cddbfc8333716b /themes/default/layouts/partials/function-content.html
parent28f63d959f5c0c6ff5282a4c25e5da6f11435c8a (diff)
downloadcanory-4c028d71711aa50c112d05d10e31ab62359dda5d.tar.gz
canory-4c028d71711aa50c112d05d10e31ab62359dda5d.tar.bz2
canory-4c028d71711aa50c112d05d10e31ab62359dda5d.zip
themes/default/layouts/partials/function-content: Collect content
Ensure that content is congruent across all output types. Set default state for when content is empty.
Diffstat (limited to 'themes/default/layouts/partials/function-content.html')
-rw-r--r--themes/default/layouts/partials/function-content.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html
new file mode 100644
index 0000000..be33ba0
--- /dev/null
+++ b/themes/default/layouts/partials/function-content.html
@@ -0,0 +1,14 @@
+{{- $content := . -}}
+
+{{-
+ $content = $content |
+ replaceRE "<p><figure>" "<figure>" |
+ replaceRE "<p>\n<figure>" "<figure>" |
+ replaceRE "</figure></p>" "</figure>" |
+-}}
+
+{{- if eq (len $content) 0 -}}
+ {{- $content = partial "function-strings.html" "messageNoContent" -}}
+{{- end -}}
+
+{{- return $content -}}