Merge branch 'master' into template-search
This commit is contained in:
@@ -2,24 +2,26 @@
|
||||
<div class="widget-icon">
|
||||
{{ partial "helper/icon" "infinity" }}
|
||||
</div>
|
||||
<h1 class="widget-title">{{ T "widgetArchivesTitle" }}</h1>
|
||||
<h2 class="widget-title section-title">{{ T "widgetArchivesTitle" }}</h2>
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $archives := $filtered.GroupByDate "2006" }}
|
||||
|
||||
{{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
|
||||
{{- $id := lower (replace $item.Key " " "-") -}}
|
||||
<div class="archives-year">
|
||||
<a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
|
||||
{{ if eq $index $.Site.Params.widgets.archives.limit }}
|
||||
<span class="year">{{ T "widgetArchivesMore" }}</span>
|
||||
{{ else }}
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<span class="count">{{ len $item.Pages }}</span>
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<div class="widget-archive--list">
|
||||
{{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
|
||||
{{- $id := lower (replace $item.Key " " "-") -}}
|
||||
<div class="archives-year">
|
||||
<a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
|
||||
{{ if eq $index $.Site.Params.widgets.archives.limit }}
|
||||
<span class="year">{{ T "widgetArchivesMore" }}</span>
|
||||
{{ else }}
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<span class="count">{{ len $item.Pages }}</span>
|
||||
{{ end }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="widget-icon">
|
||||
{{ partial "helper/icon" "tag" }}
|
||||
</div>
|
||||
<h1 class="widget-title">{{ T "widgetTagCloudTitle" }}</h1>
|
||||
<h2 class="widget-title section-title">{{ T "widgetTagCloudTitle" }}</h2>
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}
|
||||
|
||||
Reference in New Issue
Block a user