From a0152388341c9e4ebc2ee63ae33ecf29b290749d Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 9 Oct 2021 15:16:24 -0500 Subject: [PATCH] Use .Render for summary --- layouts/_default/list.html | 62 +---------------------------------- layouts/_default/summary.html | 61 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 61 deletions(-) create mode 100644 layouts/_default/summary.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0346a5f..3701847 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -33,67 +33,7 @@ {{ else }} {{ range .Paginator.Pages }} -
-

- {{ .Title | markdownify }} -

- - {{ if or .Date (.GetTerms "tags") }} - - {{ end }} - - {{ with .Resources.GetMatch "feature" }} - {{ if eq .MediaType.MainType "image" }} -
- {{ .Title }} -
- {{ else if eq .MediaType.MainType "video" }} -
- -
- {{ end }} - {{ end }} - -
- {{ if .Description }} - {{ .Description | markdownify }} - {{ else }} - {{ .Summary | markdownify }} - {{ end }} -
- - -
+ {{ .Render "summary" }} {{ else }}
No posts here! diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..3a395b2 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,61 @@ +
+

+ {{ .Title | markdownify }} +

+ + {{ if or .Date (.GetTerms "tags") }} + + {{ end }} + + {{ with .Resources.GetMatch "feature" }} + {{ if eq .MediaType.MainType "image" }} +
+ {{ .Title }} +
+ {{ else if eq .MediaType.MainType "video" }} +
+ +
+ {{ end }} + {{ end }} + +
+ {{ if .Description }} + {{ .Description | markdownify }} + {{ else }} + {{ .Summary | markdownify }} + {{ end }} +
+ + +