2019-08-18 19:36:52 +02:00
|
|
|
<article class="post" itemscope itemtype="http://schema.org/Article">
|
|
|
|
{{ $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
|
|
|
{{ $author := .Site.Author.name }}
|
|
|
|
{{ if isset .Params "author" }}
|
|
|
|
{{ $author = .Site.Author.name }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<!--featured_image-->
|
|
|
|
{{ with .Params.featured_image }}
|
|
|
|
{{ $image := $.Params.featured_image_preview | default . }}
|
2019-08-22 20:01:22 +02:00
|
|
|
<div class="post-featured-image-preview">
|
2019-08-18 19:36:52 +02:00
|
|
|
<img src=/images/loading.svg data-sizes=auto data-src={{ $image }} alt="featured image" class="lazyload">
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
<!-- end featured_image-->
|
2019-08-24 13:32:41 +02:00
|
|
|
<h1 class="post-title post-list-title" itemprop="name headline">
|
|
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
|
|
</h1>
|
|
|
|
|
2019-08-18 19:36:52 +02:00
|
|
|
<div class="post-meta">
|
2019-08-26 09:17:21 +02:00
|
|
|
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i>{{ $author }} </a>
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ T "publish" }}<span class="post-time"> <time datetime={{ $publish_date }}>{{ $publish_date }}</time> </span>
|
|
|
|
{{ with .Params.categories -}}
|
|
|
|
<span class="post-category">
|
|
|
|
{{ T "included" }}
|
|
|
|
{{ range . }}
|
|
|
|
{{- $name := . -}}
|
|
|
|
{{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
|
2019-08-26 09:17:21 +02:00
|
|
|
<i class="far fa-folder"></i><a href="{{ .Permalink }}">{{ $name }}</a>
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ end -}}
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
|
|
|
</div>
|
|
|
|
<div class="post-content">
|
|
|
|
{{ if .Params.show_description }}
|
2019-08-25 20:25:56 +02:00
|
|
|
<p>{{ .Params.description }}</p>
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ else }}
|
2019-08-19 15:14:15 +02:00
|
|
|
{{ $summary := .Summary }}
|
|
|
|
{{ $REin := `:\(([\w- ]+?)\):` }}
|
|
|
|
{{ $REout := `<i class="inline-icon $1"></i>` }}
|
|
|
|
{{ $summary = replaceRE $REin $REout $summary }}
|
|
|
|
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
|
|
|
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
|
|
|
{{ $summary = replaceRE $REin $REout $summary }}
|
|
|
|
{{ $summary | safeHTML }}
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="post-footer">
|
|
|
|
<a href="{{ .Permalink }}">{{ T "readmore" }}</a>
|
|
|
|
{{ with .Params.tags }}
|
|
|
|
<div class="post-tags">
|
|
|
|
{{ range . }}
|
2019-08-26 09:17:21 +02:00
|
|
|
<span class="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}/"><i class="fas fa-tag"></i>{{ . }}</a></span>
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</article>
|