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/_default/summary.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/_default/summary.html')
-rw-r--r-- | themes/default/layouts/_default/summary.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html index e1e6f73..356d0d9 100644 --- a/themes/default/layouts/_default/summary.html +++ b/themes/default/layouts/_default/summary.html @@ -1,5 +1,7 @@ -{{- $limit := gt .WordCount 75 -}} -{{- $content := partial "function-content.html" .Content | safeHTML -}} +{{- $wordLimit := gt .WordCount 75 -}} +{{- $content := partial "function-content.html" . | safeHTML -}} +{{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}} +{{- $limit := and $wordLimit (not $expired) -}} {{- if $limit -}} <input hidden type="checkbox" id="expand-{{ partial "card-id.html" . }}" /> |