LoveIt/layouts/_default/summary.html

72 lines
2.6 KiB
HTML
Raw Normal View History

2020-02-27 13:14:40 +01:00
{{- $scratch := .Scratch.Get "scratch" -}}
2020-02-13 18:30:33 +01:00
<article class="single summary" itemscope itemtype="http://schema.org/Article">
{{- /* Featured image */ -}}
{{- with .Params.featuredImage -}}
2020-02-13 18:30:33 +01:00
<div class="featured-image-preview">
{{- $image := $.Params.featuredImagePreview | default . -}}
2020-02-27 13:14:40 +01:00
{{- partial "plugin/image.html" (dict "src" $image "description" $.Description "scratch" $scratch) -}}
2019-08-18 19:36:52 +02:00
</div>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- /* Title */ -}}
2020-02-13 18:30:33 +01:00
<h1 class="single-title" itemprop="name headline">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
2019-08-24 13:32:41 +02:00
</h1>
{{- /* Meta */ -}}
<div class="post-meta">
{{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
<span class="post-author">
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
</a>
</span>
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
&nbsp;<span class="post-publish">
{{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>
</span>
2020-01-31 15:53:04 +01:00
{{- with .Params.categories -}}
&nbsp;<span class="post-category">
{{- T "included" -}}
2020-01-31 15:53:04 +01:00
{{- range . -}}
&nbsp;
<span>
<a href="{{ `/categories/` | relLangURL }}{{ urlize .}}">
<i class="far fa-folder fa-fw"></i>{{ . | humanize }}
</a>
</span>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-18 19:36:52 +02:00
</span>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-18 19:36:52 +02:00
</div>
{{- /* Summary content */ -}}
2020-02-13 18:30:33 +01:00
<div class="content">
{{- with .Summary -}}
{{- partial "single/content.html" . -}}
{{- else -}}
{{- .Description | safeHTML -}}
{{- end -}}
2019-08-18 19:36:52 +02:00
</div>
{{- /* Footer */ -}}
2019-08-18 19:36:52 +02:00
<div class="post-footer">
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
2020-01-31 15:53:04 +01:00
{{- with .Params.tags -}}
2019-08-18 19:36:52 +02:00
<div class="post-tags">
2020-01-31 15:53:04 +01:00
{{- range . -}}
&nbsp;<span>
<a href="{{ `/tags/` | relLangURL }}{{ urlize .}}">
<i class="fas fa-tag fa-fw"></i>{{ . }}
</a>
</span>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-18 19:36:52 +02:00
</div>
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-18 19:36:52 +02:00
</div>
2020-02-06 17:10:00 +01:00
</article>