LoveIt/layouts/_default/summary.html

65 lines
2.4 KiB
HTML
Raw Normal View History

2020-02-13 18:30:33 +01:00
<article class="single summary" itemscope itemtype="http://schema.org/Article">
{{- /* Featured image */ -}}
2020-01-31 15:53:04 +01:00
{{- with .Params.featured_image -}}
2020-02-13 18:30:33 +01:00
<div class="featured-image-preview">
{{- $image := $.Params.featured_image_preview | default . -}}
2020-02-13 18:30:33 +01:00
{{- partial "hook/image" $image -}}
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">
2019-08-24 13:32:41 +02:00
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
{{- /* Meta */ -}}
2020-02-13 18:30:33 +01:00
<div class="meta">
{{- $author := .Params.author | default .Site.Author.name -}}
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
<a class="author" href="{{ $author_link }}" rel="author" target="_blank">
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
</a>
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
2020-01-31 15:53:04 +01:00
{{- with .Params.categories -}}
2019-08-18 19:36:52 +02:00
<span class="post-category">
{{- T "included" -}}&nbsp;
2020-01-31 15:53:04 +01:00
{{- range . -}}
2019-08-18 19:36:52 +02:00
{{- $name := . -}}
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
2020-01-31 15:53:04 +01:00
<i class="far fa-folder fa-fw"></i>
<a href="{{ .Permalink }}">{{ $name | humanize }}</a>
2020-01-31 15:53:04 +01:00
{{- end -}}
{{- 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">
{{- if .Params.description_as_summary -}}
2020-01-31 15:53:04 +01:00
<p>
{{- .Params.description -}}
</p>
{{- else -}}
{{- partial "hook/content.html" .Summary | safeHTML -}}
2020-01-31 15:53:04 +01:00
{{- end -}}
2019-08-18 19:36:52 +02:00
</div>
{{- /* Footer */ -}}
2019-08-18 19:36:52 +02:00
<div class="post-footer">
2020-01-30 06:17:42 +01:00
<a href="{{ .Permalink }}">{{ 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 . -}}
<span class="tag">
&nbsp;<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag fa-fw"></i>&nbsp;{{ . }}</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>