1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- {{ if isset .Site.Params "recent_posts" }}
- {{ if .Site.Params.recent_posts.enable }}
- <section class="bar background-white no-mb">
- <div class="container">
- <div class="col-md-12">
- <div class="heading text-center">
- <h2>{{ .Site.Params.recent_posts.title | markdownify }}</h2>
- </div>
- <p class="lead">
- {{ .Site.Params.recent_posts.subtitle | markdownify }}
- </p>
- <!-- *** BLOG HOMEPAGE *** -->
- <div class="row">
- {{ $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="{{ .Params.banner | relURL }}" class="img-responsive" alt="" >
- {{ else }}
- <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="fas fa-link"></i> {{ i18n "readMore" }}</a>
- </p>
- </div>
- </div>
- <div class="content">
- <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
- <p class="author-category">
- {{ with .Params.author }}
- {{ i18n "authorBy" }} <a href="#">{{ . }}</a>
- {{ end }}
- {{ i18n "publishedOn" }} {{ .Date.Format .Site.Params.date_format }}
- </p>
- <p class="intro">{{ .Summary }}</p>
- <p class="read-more">
- <a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
- </p>
- </div>
- </div>
- <!-- /.box-image-text -->
- </div>
- {{ end }}
- </div>
- <!-- /.row -->
- <!-- *** BLOG HOMEPAGE END *** -->
- </div>
- </div>
- <!-- /.container -->
- </section>
- <!-- /.bar -->
- {{ end }}
- {{ end }}
|