website/layouts/partials/article_card.html

31 lines
1.1 KiB
HTML
Raw Normal View History

<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<div>
<h2>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h2>
<p class="date">
<span title="Date"></span>
{{ .Date.Format "2006-01-02" }}
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
| <!-- Pipe character as visual separator between date and tags-->
<span title="Tags"></span>
{{ range sort .Params.tags }}
<a href="/tags/{{ . | urlize }}">#{{ . }}</a>
{{ end }}
{{ end }}
</p>
{{ if .Site.Params.imageInArticlePreview }}
{{ if .Params.Image }}
<img src="{{ .Params.Image }}" />
{{ end }}
{{end}}
2021-06-09 13:54:12 -05:00
{{ if (site.Params.articleSummary | default true) }}
<div class="articlePreview">
<p>{{ .Summary }}</p>
<p><a href="{{ .Permalink }}">Continue reading </a></p>
</div>
{{ end }}
</div>
<hr />
</article>