diff options
Diffstat (limited to 'layouts/partials/recent_posts.html')
-rw-r--r-- | layouts/partials/recent_posts.html | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/layouts/partials/recent_posts.html b/layouts/partials/recent_posts.html index 660d61f..d60fb8c 100644 --- a/layouts/partials/recent_posts.html +++ b/layouts/partials/recent_posts.html @@ -5,7 +5,7 @@ <div class="col-md-12"> <div class="heading text-center"> - <h2>{{ .Site.Params.recent_posts.title }}</h2> + <h2>{{ .Site.Params.recent_posts.title | markdownify }}</h2> </div> <p class="lead"> @@ -15,23 +15,22 @@ <!-- *** BLOG HOMEPAGE *** --> <div class="row"> - - {{ $posts := .Paginate (where .Data.Pages "Type" "blog") }} + {{ $posts := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range first 4 $posts.Pages }} <div class="col-md-3 col-sm-6"> <div class="box-image-text blog"> <div class="top"> <div class="image" style="overflow:hidden"> {{ if isset .Params "banner" }} - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="" > + <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" > {{ else }} - <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> + <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt=""> {{ end }} </div> <div class="bg"></div> <div class="text"> <p class="buttons"> - <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> {{ i18n "readMore" }}</a> + <a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fas fa-link"></i> {{ i18n "readMore" }}</a> </p> </div> </div> @@ -39,15 +38,17 @@ <div class="content"> <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4> <p class="author-category"> - {{ with .Params.author }} - {{ i18n "authorBy" }} <a href="#">{{ . }}</a> + {{ if isset .Params "authors" }} + {{ i18n "authorBy" }} {{ range $index, $author := .Params.authors }}{{ if $index }}, {{ end }}<a href="{{ (printf "%s/%s" ("authors" | relURL) ($author | urlize)) }}">{{ $author }}</a>{{ end }} {{ end }} {{ i18n "publishedOn" }} {{ .Date.Format .Site.Params.date_format }} </p> + {{ if not .Site.Params.recent_posts.hide_summary }} <p class="intro">{{ .Summary }}</p> <p class="read-more"> <a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a> </p> + {{ end }} </div> </div> <!-- /.box-image-text --> |