diff options
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 -}} |