chore: refactor code style
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
<article class="page post">
|
||||
<article class="page single">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="post-title animated flipInX">{{ .Title }}</h1>
|
||||
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
<div class="post-meta">
|
||||
<div class="post-meta-main">
|
||||
<div class="meta">
|
||||
<div class="meta-line">
|
||||
{{- $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">
|
||||
@@ -25,7 +25,7 @@
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-meta-other">
|
||||
<div class="meta-line">
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
|
||||
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with .Params.featured_image -}}
|
||||
<div class="post-featured-image">
|
||||
{{- partial "image" . -}}
|
||||
<div class="featured-image">
|
||||
{{- partial "hook/image" . -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="post-content">
|
||||
<div class="content">
|
||||
{{- partial "hook/content.html" .Content | safeHTML -}}
|
||||
</div>
|
||||
|
||||
@@ -80,9 +80,9 @@
|
||||
{{- partial "post/footer.html" . -}}
|
||||
|
||||
{{- /* Comment */ -}}
|
||||
<div class="post-comment">
|
||||
<div class="comment">
|
||||
{{- if ( .Params.comment | default true ) -}}
|
||||
{{- partial "comments.html" . -}}
|
||||
{{- partial "comment.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user