🔧 Add special list for archives articles show.
This commit is contained in:
@@ -1,29 +1,5 @@
|
||||
{{ range .Paginator.Pages.GroupByDate "2006" }}
|
||||
<div class="collection-year">
|
||||
<span class="collection-header">{{ .Key }}</span>
|
||||
</div>
|
||||
{{ range .Pages }}
|
||||
<article itemscope itemtype="http://schema.org/Article">
|
||||
<header class="post-header">
|
||||
<div class="post-meta-container">
|
||||
{{ $month := .Date.Format .Site.Params.monthFormat }}
|
||||
<time itemprop="dateCreated" datetime="{{ .Date.Format .Site.Params.timeFormat }}" content="{{ $month }}">
|
||||
{{ $month }}
|
||||
</time>
|
||||
</div>
|
||||
<div class="post-title">
|
||||
{{- if isset .Params "extlink" }}
|
||||
<a href="{{ .Params.extlink }}" rel="noopener external nofollow noreferrer" target="_blank" class="exturl post-title-link post-title-link-external" title="">
|
||||
<span itemprop="name">{{- .Title -}}</span>
|
||||
<i class="fa fa-external-link-alt"></i>
|
||||
</a>
|
||||
{{- else }}
|
||||
<a class="post-title-link" href="{{ .Permalink }}" itemprop="url">
|
||||
<span itemprop="name">{{ .Title }}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</header>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- if and .Page.IsSection (eq .Section "archives") }}
|
||||
{{ partial "list.html" ((.Paginator (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections)).Pages.GroupByDate "2006") }}
|
||||
{{- else }}
|
||||
{{ partial "list.html" (.Paginator.Pages.GroupByDate "2006") }}
|
||||
{{- end }}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<div class="collection-title">
|
||||
{{- $cheers := "Um" }}
|
||||
{{- $posts := .Scratch.Get "postsCount" }}
|
||||
{{- if and .Page.IsSection (ne .Section "archives") }}
|
||||
{{- $posts = .Scratch.Get .Section }}
|
||||
{{- end }}
|
||||
{{- if gt $posts 210 }}
|
||||
{{- $cheers = "Excellent" }}
|
||||
{{- else if gt $posts 130 }}
|
||||
|
||||
Reference in New Issue
Block a user