chore(style): update code style and add an i18n word

This commit is contained in:
Dillon
2020-02-03 18:38:10 +08:00
parent 8aba226290
commit 52c7ad29a6
23 changed files with 270 additions and 155 deletions

View File

@@ -1,26 +1,28 @@
<article class="post" itemscope itemtype="http://schema.org/Article">
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
{{- $author := .Params.author | default .Site.Author.name -}}
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
<!--featured_image-->
{{- /* Featured image */ -}}
{{- with .Params.featured_image -}}
<div class="post-featured-image-preview">
{{- $image := $.Params.featured_image_preview | default . -}}
{{- partial "image" $image -}}
</div>
{{- end -}}
<!-- end featured_image-->
{{- /* 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 }}&nbsp;
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
</a>
{{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
{{- with .Params.categories -}}
<span class="post-category">
{{- T "included" -}}&nbsp;
@@ -34,6 +36,8 @@
</span>
{{- end -}}
</div>
{{- /* Content */ -}}
<div class="post-content">
{{- if .Params.show_description -}}
<p>
@@ -43,6 +47,8 @@
{{- partial "hook/content.html" .Summary | safeHTML -}}
{{- end -}}
</div>
{{- /* Footer */ -}}
<div class="post-footer">
<a href="{{ .Permalink }}">{{ T "readMore" }}</a>
{{- with .Params.tags -}}