diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5e52b60..e08da36 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,38 +9,7 @@ {{ end }}
{{ range .Paginator.Pages }} -
- -

{{ .Title }}

- - {{ if .Params.subtitle }} -

- {{ .Params.subtitle }} -

- {{ end }} -
- - -
- {{ if .Truncated }} - {{ .Summary }} - [{{ i18n "readMore" }}] - {{ else }} - {{ .Content }} - {{ end }} -
- - {{ if .Params.tags }} -
- {{ range .Params.tags }} - {{ . }}  - {{ end }} -
- {{ end }} - -
+ {{ partial "post_preview.html" .}} {{ end }}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} diff --git a/layouts/index.html b/layouts/index.html index d72364a..cc15000 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,40 +11,7 @@
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $pag.Pages }} -
- -

{{ .Title }}

- {{ if .Params.subtitle }} -

- {{ .Params.subtitle }} -

- {{ end }} - {{ if .Params.image }} - {{ .Title }} - {{ end }} - {{ if .Params.video }} -
- - {{ partial "post_meta.html" . }} -
- {{ if .Truncated }} - {{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }} - [{{ i18n "readMore" }}] - {{ else }} - {{ .Content }} - {{ end }} -
- - {{ if .Params.tags }} -
- {{ range .Params.tags }} - {{ . }}  - {{ end }} -
- {{ end }} -
+ {{ partial "post_preview" . }} {{ end }}
diff --git a/layouts/partials/post_preview.html b/layouts/partials/post_preview.html new file mode 100644 index 0000000..0a7c0a7 --- /dev/null +++ b/layouts/partials/post_preview.html @@ -0,0 +1,34 @@ +
+ +

{{ .Title }}

+ {{ if .Params.subtitle }} +

+ {{ .Params.subtitle }} +

+ {{ end }} + {{ if .Params.image }} + {{ .Title }} + {{ end }} +
+ +

+ {{ partial "post_meta.html" . }} +

+
+ {{ if .Truncated }} + {{ .Summary }} + [{{ i18n "readMore" }}] + {{ else }} + {{ .Content }} + {{ end }} +
+ + {{ if .Params.tags }} +
+ {{ range .Params.tags }} + {{ . }}  + {{ end }} +
+ {{ end }} + +
\ No newline at end of file