aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-10-12 22:09:04 -0400
committertdro <tdro@noreply.example.com>2022-10-12 22:09:04 -0400
commitea2ea34bf15a70d3515dd9f0713d942faefb357d (patch)
tree6018e5299b01076fb62f0dbc110a829ae2359710 /themes/default/layouts/_default
parentda731cf02221e19d20fff906cabaaad4fd7d32a5 (diff)
downloadcanory-ea2ea34bf15a70d3515dd9f0713d942faefb357d.tar.gz
canory-ea2ea34bf15a70d3515dd9f0713d942faefb357d.tar.bz2
canory-ea2ea34bf15a70d3515dd9f0713d942faefb357d.zip
themes/default/layouts/_default/summary: Store content in variable
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r--themes/default/layouts/_default/summary.html16
1 files changed, 12 insertions, 4 deletions
diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html
index e5b1154..e1e6f73 100644
--- a/themes/default/layouts/_default/summary.html
+++ b/themes/default/layouts/_default/summary.html
@@ -1,5 +1,9 @@
{{- $limit := gt .WordCount 75 -}}
-{{- if $limit -}}<input hidden type="checkbox" id="expand-{{ partial "card-id.html" . }}" />{{- end -}}
+{{- $content := partial "function-content.html" .Content | safeHTML -}}
+
+{{- if $limit -}}
+ <input hidden type="checkbox" id="expand-{{ partial "card-id.html" . }}" />
+{{- end -}}
<micro-card
id="{{ partial "card-id.html" . }}"
@@ -23,9 +27,13 @@
<micro-metadata>
{{ partial "card-meta-header.html" . }}
</micro-metadata>
- {{ if .Params.unsafe }}{{ partial "card-unsafe.html" "begin" }}{{ end }}
- {{- partial "function-content.html" .Content | safeHTML -}}
- {{ if .Params.unsafe }}{{ partial "card-unsafe.html" "end" }}{{ end }}
+ {{ if .Params.unsafe }}
+ {{ partial "card-unsafe.html" "begin" }}
+ {{- $content -}}
+ {{ partial "card-unsafe.html" "end" }}
+ {{ else }}
+ {{- $content -}}
+ {{ end }}
<micro-tags>{{ partial "meta-tags.html" . }}</micro-tags>
</micro-content>
</micro-summary>