2022-06-03 22:37:33 +08:00
|
|
|
{{ with .ctx }}
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ if $.IsHome }} <h2 {{ else }} <h1 {{ end }} class="post-title" itemprop="name headline">
|
|
|
|
{{ if and .Weight (gt .Weight 0) }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
|
|
|
|
<i class="fa fa-thumbtack"></i>
|
|
|
|
</span>
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ if $.IsHome }}
|
|
|
|
{{ if and (isset .Params "extlink") (ne .Params.Extlink "") }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<a href="{{ .Params.Extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external">
|
|
|
|
{{ .Title }}
|
|
|
|
<i class="fa fa-external-link-alt"></i>
|
|
|
|
</a>
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ else }}
|
2022-06-16 17:39:16 +08:00
|
|
|
<a href="{{ .RelPermalink | relLangURL }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
{{ .Title }}
|
|
|
|
{{ if .Site.Params.postEdit.enable }}
|
|
|
|
{{ $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<a href="{{ $editURL }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-edit-link" title="{{ T "PostEditTitle" }}"><i class="fa fa-pen-nib"></i></a>
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ if $.IsHome }} </h2> {{ else }} </h1> {{ end }}
|
2022-11-06 18:23:55 +08:00
|
|
|
{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<div class="post-meta-container">
|
|
|
|
<div class="post-meta-items">
|
|
|
|
{{ partial "post/header_meta/created_date.html" . }}
|
|
|
|
{{ partial "post/header_meta/update_date.html" . }}
|
|
|
|
{{ partial "post/header_meta/categories.html" . }}
|
2022-10-30 11:43:18 +08:00
|
|
|
{{ if and $.IsHome (not (isset .Params "extlink")) }}
|
|
|
|
<div class="post-meta-items">
|
2022-11-06 18:23:55 +08:00
|
|
|
{{ if .Site.Params.waline.pageView }}
|
2022-10-30 11:43:18 +08:00
|
|
|
{{ partial "post/header_meta/views.html" . }}
|
|
|
|
{{ end }}
|
2022-11-06 18:23:55 +08:00
|
|
|
{{ if $isComment }}
|
2022-10-30 11:43:18 +08:00
|
|
|
{{ partial "post/header_meta/comments.html" . }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2022-06-02 12:13:16 +08:00
|
|
|
</div>
|
2023-01-01 21:12:58 +08:00
|
|
|
{{ if not $.IsHome }}
|
2022-06-09 09:12:22 +08:00
|
|
|
<div class="post-meta-items">
|
|
|
|
{{ partial "post/header_meta/words.html" . }}
|
|
|
|
{{ partial "post/header_meta/readtime.html" . }}
|
|
|
|
{{ partial "post/header_meta/views.html" . }}
|
2022-11-06 18:23:55 +08:00
|
|
|
{{ if $isComment }}
|
2022-10-30 11:43:18 +08:00
|
|
|
{{ partial "post/header_meta/comments.html" . }}
|
|
|
|
{{ end }}
|
2022-06-09 09:12:22 +08:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-06-03 22:37:33 +08:00
|
|
|
{{ end }}
|