diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 3279d609b46ac8eac1859f94bd1604071d5739a1..dc2cca4d9788a8827b2c07f5abbdde5b82fa7b6d 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -38,6 +38,36 @@ {{ end }} {{ end }} + + + {{ with $.Site.GetPage $dir }} + {{ range first $maxnum .Pages.ByDate.Reverse }} + {{$StatBanner := and (eq .Params.mkbanner false) (le now .Params.bannerEndDate) }} + {{ if eq $StatBanner true }} + {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }} + {{ if le ($.Scratch.Get "counter") $maxnum }} + {{ if .Params.bannerimg }} +
+ +
+ {{ else if .Params.image }} +
+

{{ .Title }}


+
Posted on {{dateFormat "2 Jan, 2006" .Params.date }}
+
+ + {{ else }} +
+

{{ .Title }}


+
Posted on {{dateFormat "2 Jan, 2006" .Params.date }}
+
+ {{ end }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} + +