🎉 Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<section class="widget archive">
|
||||
<div class="widget-icon">
|
||||
{{ (resources.Get "icons/infinity.svg").Content | safeHTML }}
|
||||
</div>
|
||||
<h1 class="widget-title">Archive</h1>
|
||||
|
||||
{{ $v1 := where .Site.RegularPages "Section" "post" }}
|
||||
{{ $v2 := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := $v1 | intersect $v2 }}
|
||||
{{ range $filtered.GroupByDate "2006" }}
|
||||
{{ $id := lower (replace .Key " " "-") }}
|
||||
<div class="archive-year">
|
||||
<a href="{{ $.Site.BaseURL }}/archive#{{ $id }}">
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<span class="count">{{ len .Pages }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -0,0 +1,17 @@
|
||||
{{ $tags := .Site.Taxonomies.tags.ByCount }}
|
||||
{{ $v2 := where $tags "Term" "not in" (slice "hugo" "tag" "rss") }}
|
||||
|
||||
<section class="widget tagCloud">
|
||||
<div class="widget-icon">
|
||||
{{ (resources.Get "icons/tag.svg").Content | safeHTML }}
|
||||
</div>
|
||||
<h1 class="widget-title">Tags</h1>
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit $v2 }}
|
||||
<a href="{{ $.Site.BaseURL }}tags/{{ .Term | urlize }}/" class="font_size_{{ .Count }}">
|
||||
{{ .Term | humanize }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user