diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8c79f98..1df40b7 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,84 +8,7 @@ {{ range .Pages }} -
- {{ partial "category-button" . }} - - {{ with .Param "fa-thumbnail" }} -
-
- - {{- partial "fa.html" . -}} - -
-
- {{ end }} - - {{/* Thumbnail images should be stored as 'thumbnail'.* in the page bundle, but - historically they might have been referenced as 'thumbnail' in the front - matter, or (even more historically) as 'cardImage'. Use scratch to - normalize all these different systems. - */}} - {{ $bundleGlob := "thumbnail.*" }} - {{ $frontThumbGlob := print "images/" (.Params.thumbnail) ".*" }} - {{ $frontCardGlob := print "images/" (.Params.cardImage) ".jpg" }} - {{ $allThumbnailGlob := print "{" $frontThumbGlob "," $frontCardGlob "," $bundleGlob "}" }} - {{ with .Resources.GetMatch $allThumbnailGlob }} - {{ $thumbnail := . }} - {{ $thumbnailResized := $thumbnail.Resize "600x" }} - - -
- Thumbnail of {{ .Title }} -
- {{ end }} - - -
- {{/* Prefer full-text links over local ones */}} -
- {{ $link := default .RelPermalink (index .Params "link") }} -

{{ .Title }}

-
- -
- {{ dateFormat "02 Jan 2006" .Date }} -
- - {{ range (.GetTerms "people") }} - {{- partial "fa.html" "user" }} {{ .LinkTitle }} - {{ end }} - - -

- {{ .Summary }} - Read more » -

- - -
-
- + {{ partial "itemcard.html" . }} {{ end }} {{ end }} diff --git a/layouts/partials/itemcard.html b/layouts/partials/itemcard.html new file mode 100644 index 0000000..b8ad039 --- /dev/null +++ b/layouts/partials/itemcard.html @@ -0,0 +1,78 @@ +
+ {{ partial "category-button" . }} + + {{ with .Param "fa-thumbnail" }} +
+
+ + {{- partial "fa.html" . -}} + +
+
+ {{ end }} + + {{/* Thumbnail images should be stored as 'thumbnail'.* in the page bundle, but + historically they might have been referenced as 'thumbnail' in the front + matter, or (even more historically) as 'cardImage'. Use scratch to + normalize all these different systems. + */}} + {{ $bundleGlob := "thumbnail.*" }} + {{ $frontThumbGlob := print "images/" (.Params.thumbnail) ".*" }} + {{ $frontCardGlob := print "images/" (.Params.cardImage) ".jpg" }} + {{ $allThumbnailGlob := print "{" $frontThumbGlob "," $frontCardGlob "," $bundleGlob "}" }} + {{ with .Resources.GetMatch $allThumbnailGlob }} + {{ $thumbnail := . }} + {{ $thumbnailResized := $thumbnail.Resize "600x" }} + + +
+ Thumbnail of {{ .Title }} +
+ {{ end }} + + +
+ {{/* Prefer full-text links over local ones */}} +
+ {{ $link := default .RelPermalink (index .Params "link") }} +

{{ .Title }}

+
+ +
+ {{ dateFormat "02 Jan 2006" .Date }} +
+ + {{ range (.GetTerms "people") }} + {{- partial "fa.html" "user" }} {{ .LinkTitle }} + {{ end }} + + +

+ {{ .Summary }} + Read more » +

+ + +
+
+