2022-06-03 22:37:33 +08:00
|
|
|
{{ with .ctx }}
|
2022-06-02 12:13:16 +08:00
|
|
|
<link itemprop="mainEntityOfPage" href="{{ .Permalink }}">
|
|
|
|
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
|
|
|
<meta itemprop="image" content="{{ .Site.Params.avatar.url }}">
|
|
|
|
<meta itemprop="name" content="{{ .Params.author | default .Site.Params.author }}">
|
|
|
|
</span>
|
|
|
|
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
|
|
|
<meta itemprop="name" content="{{ .Site.Params.author }}">
|
|
|
|
<meta itemprop="description" content="{{ .Site.Params.description }}">
|
|
|
|
</span>
|
|
|
|
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
|
|
|
<meta itemprop="name" content="{{ .Title }}">
|
|
|
|
<meta itemprop="description" content="{{ .Description | default .Summary }}">
|
|
|
|
</span>
|
|
|
|
<header class="post-header">
|
2022-06-07 18:16:40 +08:00
|
|
|
{{- if $.IsHome }} <h2 {{ else }} <h1 {{ end -}} class="post-title" itemprop="name headline">
|
2022-06-03 22:37:33 +08:00
|
|
|
{{- if and .Weight (gt .Weight 0) }}
|
2022-06-02 12:13:16 +08:00
|
|
|
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
|
|
|
|
<i class="fa fa-thumbtack"></i>
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
2022-06-03 22:37:33 +08:00
|
|
|
{{- if $.IsHome }}
|
|
|
|
{{- if and (isset .Params "link") (ne .Params.Link "") }}
|
|
|
|
<a href="{{ .Params.Link }}" 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>
|
|
|
|
{{- else }}
|
|
|
|
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
|
|
|
|
{{- end }}
|
2022-06-02 12:13:16 +08:00
|
|
|
{{- else }}
|
2022-06-04 10:43:00 +08:00
|
|
|
{{- .Title }}
|
|
|
|
{{- if .Site.Params.postEdit.enable }}
|
|
|
|
{{- $editURL := printf "%s%s" .Site.Params.postEdit.url (path.Clean .File.Path) }}
|
|
|
|
<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>
|
|
|
|
{{- end }}
|
2022-06-02 12:13:16 +08:00
|
|
|
{{- end }}
|
2022-06-07 18:16:40 +08:00
|
|
|
{{- if $.IsHome }} </h2> {{ else }} </h1> {{ end -}}
|
2022-06-02 12:13:16 +08:00
|
|
|
<div class="post-meta-container">
|
2022-06-06 21:30:39 +08:00
|
|
|
<div class="post-meta-items">
|
2022-06-07 18:16:40 +08:00
|
|
|
{{ partial "post/header_meta/created_date.html" . }}
|
|
|
|
{{ partial "post/header_meta/update_date.html" . }}
|
|
|
|
{{ partial "post/header_meta/categories.html" . }}
|
2022-06-06 21:30:39 +08:00
|
|
|
</div>
|
2022-06-03 22:37:33 +08:00
|
|
|
{{- if not $.IsHome }}
|
2022-06-06 21:30:39 +08:00
|
|
|
<div class="post-meta-items">
|
2022-06-07 18:16:40 +08:00
|
|
|
{{ partial "post/header_meta/words.html" . }}
|
|
|
|
{{ partial "post/header_meta/readtime.html" . }}
|
|
|
|
{{ partial "post/header_meta/views.html" . }}
|
2022-06-06 21:30:39 +08:00
|
|
|
</div>
|
2022-06-02 12:13:16 +08:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-06-03 22:37:33 +08:00
|
|
|
</header>
|
|
|
|
{{ end }}
|