mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-23 15:26:20 +01:00
64 lines
No EOL
2.5 KiB
HTML
64 lines
No EOL
2.5 KiB
HTML
<article class="post" itemscope itemtype="http://schema.org/Article">
|
|
{{- /* Featured image */ -}}
|
|
{{- with .Params.featured_image -}}
|
|
<div class="post-featured-image-preview">
|
|
{{- $image := $.Params.featured_image_preview | default . -}}
|
|
{{- partial "image" $image -}}
|
|
</div>
|
|
{{- end -}}
|
|
|
|
{{- /* Title */ -}}
|
|
<h1 class="post-title post-list-title" itemprop="name headline">
|
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
|
</h1>
|
|
|
|
{{- /* Meta */ -}}
|
|
<div class="post-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>
|
|
|
|
{{- 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 fa-fw"></i>
|
|
<a href="{{ .Permalink }}">{{ $name | humanize }}</a>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</span>
|
|
{{- end -}}
|
|
</div>
|
|
|
|
{{- /* Summary content */ -}}
|
|
<div class="post-content">
|
|
{{- if .Params.description_as_summary -}}
|
|
<p>
|
|
{{- .Params.description -}}
|
|
</p>
|
|
{{- else -}}
|
|
{{- partial "hook/content.html" .Summary | safeHTML -}}
|
|
{{- end -}}
|
|
</div>
|
|
|
|
{{- /* Footer */ -}}
|
|
<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 fa-fw"></i> {{ . }}</a>
|
|
</span>
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|
|
</div>
|
|
</article> |