diff options
author | tdro <tdro@noreply.example.com> | 2022-10-26 21:53:13 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-10-26 21:53:13 -0400 |
commit | c00dc361b7d3924df8abca4a32427d0a1232dc0b (patch) | |
tree | df53050fcf827de213516df2c5fe6d172982b9f1 /themes/default/layouts/partials/function-content.html | |
parent | c35943c3ed36fb178c09c0185c5d363b9bf4116f (diff) | |
download | canory-0.11.5.tar.gz canory-0.11.5.tar.bz2 canory-0.11.5.zip |
config: Overwrite and build expired0.11.5
Remove xkcd from content security policy, no longer needed.
Diffstat (limited to 'themes/default/layouts/partials/function-content.html')
-rw-r--r-- | themes/default/layouts/partials/function-content.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index be33ba0..de68946 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -1,4 +1,7 @@ -{{- $content := . -}} +{{- $context := . -}} +{{- $content := $context.Content -}} +{{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}} +{{- $empty := eq (len $content) 0 -}} {{- $content = $content | @@ -7,8 +10,12 @@ replaceRE "</figure></p>" "</figure>" | -}} -{{- if eq (len $content) 0 -}} - {{- $content = partial "function-strings.html" "messageNoContent" -}} +{{- if $empty -}} + {{- $content = "This message contains no content." -}} +{{- end -}} + +{{- if $expired -}} + {{- $content = "This message has expired." -}} {{- end -}} {{- return $content -}} |