mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-15 03:16:30 +01:00
55 lines
2.3 KiB
HTML
55 lines
2.3 KiB
HTML
|
<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 . }}
|
||
|
<div class="featured_image_preview">
|
||
|
<img src=/images/loading.svg data-sizes=auto data-src={{ $image }} alt="featured image" class="lazyload">
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
<!-- end featured_image-->
|
||
|
<header class="post-header">
|
||
|
<h1 class="post-title post-list-title" itemprop="name headline">
|
||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||
|
</h1>
|
||
|
</header>
|
||
|
<div class="post-meta">
|
||
|
<a class="author" href="{{.Site.BaseURL }}" rel="author"><i class="fas fa-user-circle"></i> {{ $author }} </a>
|
||
|
{{ 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))) -}}
|
||
|
<i class="far fa-folder"></i> <a href="{{ .Permalink }}">{{ $name }}</a>
|
||
|
{{ end -}}
|
||
|
{{ end }}
|
||
|
</span>
|
||
|
{{- end }}
|
||
|
</div>
|
||
|
<div class="post-content">
|
||
|
{{ if .Params.show_description }}
|
||
|
<p>{{ . }}</p>
|
||
|
{{ else }}
|
||
|
{{ .Summary }}
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
<div class="post-footer">
|
||
|
<a href="{{ .Permalink }}">{{ T "readmore" }}</a>
|
||
|
{{ with .Params.tags }}
|
||
|
<div class="post-tags">
|
||
|
{{ range . }}
|
||
|
<span class="tag">
|
||
|
<a href="{{ "tags/" | absURL }}{{ . | urlize }}/"> <i class="fas fa-tag"></i> {{ . }}</a>
|
||
|
</span>
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
</article>
|