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 | |
parent | c35943c3ed36fb178c09c0185c5d363b9bf4116f (diff) | |
download | canory-c00dc361b7d3924df8abca4a32427d0a1232dc0b.tar.gz canory-c00dc361b7d3924df8abca4a32427d0a1232dc0b.tar.bz2 canory-c00dc361b7d3924df8abca4a32427d0a1232dc0b.zip |
config: Overwrite and build expired0.11.5
Remove xkcd from content security policy, no longer needed.
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r-- | themes/default/layouts/_default/index.json | 2 | ||||
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 2 | ||||
-rw-r--r-- | themes/default/layouts/_default/single.plain.txt | 2 | ||||
-rw-r--r-- | themes/default/layouts/_default/summary.html | 6 |
4 files changed, 7 insertions, 5 deletions
diff --git a/themes/default/layouts/_default/index.json b/themes/default/layouts/_default/index.json index 1e672fd..86be455 100644 --- a/themes/default/layouts/_default/index.json +++ b/themes/default/layouts/_default/index.json @@ -32,7 +32,7 @@ {{- end -}} ], "content_text": {{ $data.Plain | jsonify }}, - "content_html": {{ partial "function-content.html" $data.Content | jsonify }} + "content_html": {{ partial "function-content.html" $data | jsonify }} } {{- end -}} {{ end }} diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index beda119..3eee035 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -75,7 +75,7 @@ <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <guid>{{ .Permalink }}</guid> <description> - {{- partial "function-content.html" .Content | html -}} + {{- partial "function-content.html" . | html -}} {{- print "<br>" | html -}} {{- partial "rss-tags.html" . | html -}} </description> diff --git a/themes/default/layouts/_default/single.plain.txt b/themes/default/layouts/_default/single.plain.txt index d110b5e..6b97968 100644 --- a/themes/default/layouts/_default/single.plain.txt +++ b/themes/default/layouts/_default/single.plain.txt @@ -1 +1 @@ -{{- .Content | plainify | htmlUnescape -}} +{{- partial "function-content.html" . | plainify | htmlUnescape -}} 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" . }}" /> |