hugo-theme-roland/layouts/partials/post_list.html

31 lines
1,020 B
HTML

<!-- post list -->
{{ range $index, $element := $.Paginator.Pages }}
<div class="post-preview my-4">
<a href="{{ .Permalink }}">
<h2 class="font-weight-bold h3 pb-1">
{{ .Title }}
</h2>
{{with .Params.subtitle }}
<p class="lead">
{{ . }}
</p>
{{ end }}
<div class="post-content-preview text-muted my-4">
{{ with .Description }}
{{ . }}
{{ else }}
{{ .Summary}}
{{ end }}
</div>
</a>
<p class="post-meta text-right">
{{ i18n "posted_by" }} {{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ i18n "on" }} {{ .Date.Format (i18n "date_fmt") }}
<!-- Don't show "Last Modified on" if update happened on the same day. -->
{{ if (and (not .Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" .Lastmod) (dateFormat "2006-01-02" .Date)))) }}
<br>{{ i18n "updated_on" }} {{ dateFormat (i18n "date_fmt") .Params.LastMod }}
{{ end }}
</p>
</div>
<hr>
{{ end }}