gmgsite/themes/hugo-casper3/layouts/partials/post-card.html

38 lines
1.2 KiB
HTML

<article class="post-card post
{{ if not (.context.Param "thumbnail") }} no-image
{{ else }}
{{ if (eq (mod .index 6) 0) }} post-card-large {{ end }}
{{ end }} ">
{{ if .context.Param "thumbnail" }}
<a class="post-card-image-link" href="{{ .context.RelPermalink }}">
<img class="post-card-image" src="{{ .context.Param "thumbnail" }}" alt="{{ .context.Title }}"/>
</a>
{{ end }}
<div class="post-card-content">
<a class="post-card-content-link" href="{{ .context.RelPermalink }}">
<header class="post-card-header">
<h2 class="post-card-title">{{ .context.Title }}</h2>
</header>
<section class="post-card-excerpt">
<p>{{ .context.Description }}</p>
</section>
</a>
<footer class="post-card-meta">
<span class="post-card-byline-date"><time datetime="{{ .context.Date.Format "2006-31-01" }}">{{ .context.Date.Format "2 January 2006" }}</time>
<span class="bull">&bull;</span> {{ .context.ReadingTime }} min read</span>
</footer>
</div>
</article>