2020-04-21 16:55:06 +02:00
|
|
|
{{- $params := .Params | merge .Site.Params.page -}}
|
2020-05-28 11:05:37 +02:00
|
|
|
|
2020-02-13 18:30:33 +01:00
|
|
|
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Featured image */ -}}
|
2020-05-28 11:05:37 +02:00
|
|
|
{{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
|
|
|
|
{{- with .Resources.GetMatch "featured-image" -}}
|
|
|
|
{{- $image = .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- with .Resources.GetMatch "featured-image-preview" -}}
|
|
|
|
{{- $image = .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- with $image -}}
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="featured-image-preview">
|
2020-04-26 17:15:47 +02:00
|
|
|
<a href="{{ $.RelPermalink }}">
|
2020-05-28 11:05:37 +02:00
|
|
|
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
|
2020-04-26 17:15:47 +02:00
|
|
|
</a>
|
2019-08-18 19:36:52 +02:00
|
|
|
</div>
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- end -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Title */ -}}
|
2020-02-13 18:30:33 +01:00
|
|
|
<h1 class="single-title" itemprop="name headline">
|
2020-03-09 13:25:55 +01:00
|
|
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
2019-08-24 13:32:41 +02:00
|
|
|
</h1>
|
|
|
|
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Meta */ -}}
|
2020-02-21 05:49:55 +01:00
|
|
|
<div class="post-meta">
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
|
2020-04-22 15:34:38 +02:00
|
|
|
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
|
2020-02-21 05:49:55 +01:00
|
|
|
<span class="post-author">
|
2020-05-28 11:05:37 +02:00
|
|
|
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
|
2020-03-17 14:16:04 +01:00
|
|
|
{{- partial "plugin/link.html" $options -}}
|
2020-02-21 05:49:55 +01:00
|
|
|
</span>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
2020-05-18 10:10:24 +02:00
|
|
|
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
|
|
|
|
<span class="post-publish">
|
|
|
|
{{- printf `<time datetime="%v">%v</time>` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
|
|
|
|
</span>
|
|
|
|
{{- end -}}
|
2020-02-03 11:38:10 +01:00
|
|
|
|
2020-05-18 10:10:24 +02:00
|
|
|
{{- $categories := slice -}}
|
|
|
|
{{- range .Params.categories -}}
|
2020-05-18 11:30:37 +02:00
|
|
|
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
|
2022-05-06 19:54:31 +02:00
|
|
|
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw" aria-hidden="true"></i>%v</a>` $category.RelPermalink $category.Title) -}}
|
2020-05-18 10:10:24 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{- with delimit $categories " " -}}
|
|
|
|
<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>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
2020-02-03 16:27:54 +01:00
|
|
|
{{- /* Summary content */ -}}
|
2020-02-13 18:30:33 +01:00
|
|
|
<div class="content">
|
2020-02-21 18:14:01 +01:00
|
|
|
{{- with .Summary -}}
|
2020-05-18 15:30:33 +02:00
|
|
|
{{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
2020-02-21 18:14:01 +01:00
|
|
|
{{- else -}}
|
|
|
|
{{- .Description | safeHTML -}}
|
|
|
|
{{- end -}}
|
2019-08-18 19:36:52 +02:00
|
|
|
</div>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
|
|
|
{{- /* Footer */ -}}
|
2019-08-18 19:36:52 +02:00
|
|
|
<div class="post-footer">
|
2020-03-09 13:25:55 +01:00
|
|
|
<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">
|
2022-05-06 19:54:31 +02:00
|
|
|
<i class="fas fa-tags fa-fw" aria-hidden="true"></i>
|
2020-03-14 07:42:12 +01:00
|
|
|
{{- range $index, $value := . -}}
|
|
|
|
{{- if gt $index 0 }}, {{ end -}}
|
2020-05-18 11:30:37 +02:00
|
|
|
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
|
2020-04-22 19:22:29 +02:00
|
|
|
<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>
|
2020-05-18 11:30:37 +02:00
|
|
|
</article>
|