diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 01ba752..ce07065 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -60,27 +60,8 @@ {{- $class = "post-entry tag-entry" }} {{- end }} -
- {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} - {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} -
-

- {{- .Title }} - {{- if .Draft }}  [draft]{{- end }} -

-
- {{- if (ne (.Param "hideSummary") true) }} -
-

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

-
- {{- end }} - {{- if not (.Param "hideMeta") }} - - {{- end }} - -
+{{- partial "list_item.html" (dict "cxt" . "ArticleClass" $class) }} + {{- end }} {{- if gt $paginator.TotalPages 1 }} diff --git a/layouts/partials/list_item.html b/layouts/partials/list_item.html new file mode 100644 index 0000000..3053deb --- /dev/null +++ b/layouts/partials/list_item.html @@ -0,0 +1,23 @@ +{{- with .cxt}} {{/* Apply proper context from dict */}} +
+ {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} + {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }} +
+

+ {{- .Title }} + {{- if .Draft }}  [draft]{{- end }} +

+
+ {{- if (ne (.Param "hideSummary") true) }} +
+

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

+
+ {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} + +
+{{- end -}}{{/* End context */ -}}