hugo-theme-next/layouts/partials/post/post_header.html

42 lines
1.9 KiB
HTML
Raw Normal View History

<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">
<h2 class="post-title" itemprop="name headline">
{{- if and (isset .Params "sticky") (gt .Params.Sticky 0) }}
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
<i class="fa fa-thumbtack"></i>
</span>
{{- end }}
{{- 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 }}
</h2>
{{/* TODO IsHome */}}
{{ print "Get IsHome value in pages loop: " ($.Scratch.Get "IsHome") }}
<div class="post-meta-container">
{{ partial "post/post_meta/created_date.html" . }}
{{ partial "post/post_meta/update_date.html" . }}
{{ partial "post/post_meta/categories.html" . }}
{{- if not (.Scratch.Get "IsHome") }}
{{ partial "post/post_meta/words.html" . }}
{{ partial "post/post_meta/readtime.html" . }}
{{ partial "post/post_meta/views.html" . }}
{{ end }}
</div>
</header>