2022-05-21 17:47:26 +08:00
|
|
|
{{- define "main" }}
|
2022-05-31 17:10:01 +08:00
|
|
|
{{- $lang := .Scratch.Get "lang" }}
|
2022-06-01 17:06:27 +08:00
|
|
|
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
|
|
|
{{- range $paginator.Pages }}
|
2022-05-31 17:10:01 +08:00
|
|
|
<div class="post-block">
|
|
|
|
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="{{ $lang }}">
|
|
|
|
<link itemprop="mainEntityOfPage" href="{{ .Permalink }}">
|
|
|
|
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
2022-06-01 17:06:27 +08:00
|
|
|
<meta itemprop="image" content="{{ .Site.Params.avatar.url }}">
|
|
|
|
<meta itemprop="name" content="{{ .Site.Params.author }}">
|
2022-05-31 17:10:01 +08:00
|
|
|
</span>
|
|
|
|
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
|
|
|
<meta itemprop="name" content="{{ .Title }}">
|
|
|
|
<meta itemprop="description" content="{{ .Description }}">
|
|
|
|
</span>
|
|
|
|
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
|
|
|
<meta itemprop="name" content="{{ .Title }}">
|
|
|
|
<meta itemprop="description" content="{{ .Description }}">
|
|
|
|
</span>
|
|
|
|
<header class="post-header">
|
|
|
|
<h2 class="post-title" itemprop="name headline">
|
|
|
|
{{/*- with .Sticky }}
|
|
|
|
{{- if gt . 0 }}
|
|
|
|
<span class="post-sticky-flag" title="{{ T "PostStickyTitle" }}">
|
|
|
|
<i class="fa fa-thumbtack"></i>
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
|
|
|
{{- end */}}
|
|
|
|
{{/*- if not (eq .Link "") }}
|
|
|
|
<a href="{{ .Link }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external">{{ .Title }}</a>
|
|
|
|
{{- else */}}
|
|
|
|
<a href="{{ .Permalink }}" itemprop="url" class="post-title-link">{{ .Title }}</a>
|
|
|
|
{{/*- end */}}
|
|
|
|
</h2>
|
|
|
|
<div class="post-meta-container">
|
2022-06-01 17:06:27 +08:00
|
|
|
{{ partial "post_meta/created_date.html" . }}
|
|
|
|
{{ partial "post_meta/update_date.html" . }}
|
|
|
|
{{ partial "post_meta/categories.html" . }}
|
|
|
|
{{ partial "post_meta/words.html" . }}
|
2022-05-31 17:10:01 +08:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<!-- POST BODY -->
|
|
|
|
<div class="post-body" itemprop="articleBody">
|
|
|
|
{{/*- if .Expand }}
|
|
|
|
{{ .Content }}
|
|
|
|
{{ else */}}
|
|
|
|
{{ .Summary }}
|
|
|
|
{{/*- end */}}
|
|
|
|
</div>
|
|
|
|
<footer class="post-footer">
|
2022-06-01 17:06:27 +08:00
|
|
|
{{- if and .Site.Params.readMoreBtn }}
|
2022-05-31 17:10:01 +08:00
|
|
|
<div class="post-button">
|
|
|
|
<a class="btn" href="{{ .Permalink }}#more" rel="contents">
|
|
|
|
{{ T "PostReadMore" }} »
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
|
|
|
<div class="post-eof"></div>
|
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|
2022-06-01 21:01:15 +08:00
|
|
|
{{- partial "partials/pagination.html" . }}
|
2022-05-21 17:47:26 +08:00
|
|
|
{{- end }}
|