LoveIt/layouts/_default/summary.html

67 lines
3 KiB
HTML
Raw Normal View History

{{- $params := .Params | merge .Site.Params.page -}}
2020-02-13 18:30:33 +01:00
<article class="single summary" itemscope itemtype="http://schema.org/Article">
{{- /* Featured image */ -}}
{{- with $params.featuredimagepreview | default $params.featuredimage -}}
2020-02-13 18:30:33 +01:00
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}">
{{- dict "src" . "alt" $.Description "large" true | partial "plugin/image.html" -}}
</a>
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 .Site.Home.RelPermalink -}}
<span class="post-author">
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
{{- partial "plugin/link.html" $options -}}
</span>
2020-05-18 10:10:24 +02:00
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
&nbsp;<span class="post-publish">
{{- printf `<time datetime="%v">%v</time>` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
</span>
{{- end -}}
2020-05-18 10:10:24 +02:00
{{- $categories := slice -}}
{{- range .Params.categories -}}
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
2020-05-18 10:10:24 +02:00
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}}
{{- end -}}
{{- with delimit $categories "&nbsp;" -}}
&nbsp;<span class="post-category">
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
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 -}}
{{- dict "content" . "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- 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-04-28 06:53:06 +02:00
{{- with .Params.tags -}}
2019-08-18 19:36:52 +02:00
<div class="post-tags">
<i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}}
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
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>
</article>