mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
f14301c395
* feat: improve configuration * fix: fix partials/footer.html error
66 lines
2.7 KiB
HTML
66 lines
2.7 KiB
HTML
{{- $params := .Params | merge .Site.Params.page -}}
|
|
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
|
{{- /* Featured image */ -}}
|
|
{{- with $params.featuredimage -}}
|
|
<div class="featured-image-preview">
|
|
{{- $image := $params.featuredimagepreview | default . -}}
|
|
{{- partial "plugin/image.html" (dict "src" $image "alt" $.Description "large" true) -}}
|
|
</div>
|
|
{{- end -}}
|
|
|
|
{{- /* Title */ -}}
|
|
<h1 class="single-title" itemprop="name headline">
|
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
</h1>
|
|
|
|
{{- /* Meta */ -}}
|
|
<div class="post-meta">
|
|
{{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
|
|
{{- $authorLink := $params.authorlink | default .Site.Author.link | default (relLangURL "/") -}}
|
|
<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>
|
|
|
|
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}}
|
|
<span class="post-publish">
|
|
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
|
</span>
|
|
|
|
{{- with $params.categories -}}
|
|
|
|
<span class="post-category">
|
|
{{- T "included" -}}
|
|
{{- range $index, $value := . -}}
|
|
{{- if gt $index 0 }} {{ end -}}
|
|
<a href="{{ `/categories/` | relLangURL }}{{ urlize $value }}">
|
|
<i class="far fa-folder fa-fw"></i>{{ $value | humanize }}
|
|
</a>
|
|
{{- end -}}
|
|
</span>
|
|
{{- end -}}
|
|
</div>
|
|
|
|
{{- /* Summary content */ -}}
|
|
<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 -}}
|
|
</div>
|
|
|
|
{{- /* Footer */ -}}
|
|
<div class="post-footer">
|
|
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
|
|
{{- with $params.tags -}}
|
|
<div class="post-tags">
|
|
<i class="fas fa-tags fa-fw"></i>
|
|
{{- range $index, $value := . -}}
|
|
{{- if gt $index 0 }}, {{ end -}}
|
|
<a href="{{ `/tags/` | relLangURL }}{{ urlize $value }}">{{ $value }}</a>
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|
|
</div>
|
|
</article>
|