theme-blog-ewen/layouts/index.html

57 lines
1.6 KiB
HTML
Raw Normal View History

2022-02-22 19:21:32 +00:00
{{ define "main" }}
<!-- recent post -->
<section class="section-sm">
2020-04-12 08:16:04 +00:00
<div class="container">
2022-02-22 19:21:32 +00:00
<div class="row">
<div class="col-lg-8 mb-100 mb-lg-0">
<h3>Pennadoù diwezhañ</h3>
{{ range first 5 (where .Site.RegularPages "Type" "blog") }}
<article class="card featured-post">
<div class="row mb-20">
{{ if .Params.Image }}
{{ $article := .Permalink | relURL }}
{{ $image := .Params.Image | relURL }}
<div class="col-md-4">
<img src="{{ print $article $image }}" class="card-img" alt="{{ .Title | markdownify }}">
</div>
<div class="col-md-7">
{{ else }}
<div class="col-md-10">
{{ end }}
<div class="card-body pt-0">
{{ range .Params.Categories }}
<a href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}" class="text-primary">{{ . | title
| humanize }}</a>
{{ end }}
<a href="{{ .Permalink }}" class="h3 my-3 pt-0">{{ .Title | markdownify }}</a>
<div class="mb-3 post-meta">
{{ if not .Params.HideDate }}
<span>{{ .Date.Format "02 January 2006" }}</span>
{{ end }}
</div>
<p class="card-text">{{ .Summary }}</p>
<div class="d-flex justify-content-end">
<a href="{{ .Permalink }}" class="btn btn-outline-primary">read more</a>
</div>
</div>
</div>
</div>
</article>
2020-04-12 08:16:04 +00:00
{{ end }}
</div>
2022-02-22 19:21:32 +00:00
<!-- sidebar -->
{{ partial "sidebar.html" . }}
</div>
2020-04-12 08:16:04 +00:00
</div>
{{ template "_internal/pagination.html" . }}
</section>
2022-02-22 19:21:32 +00:00
<!-- pagination -->
{{ end }}